 +    self.WriteVariableList('ldflags', config.get('ldflags'))
 +    self.WriteVariableList('libs', spec.get('libraries'))
 +
-+    target = self.ComputeTarget(spec)
++    output = self.ComputeOutput(spec)
 +    if 'dependencies' in spec:
 +      for dep in spec['dependencies']:
 +        dep = self.linkable_outputs.get(dep)

+      target = target[3:]
+
+    if spec['type'] == 'static_library':
+      return 'lib%s.a' % target
+    elif spec['type'] in ('loadable_module', 'shared_library'):
+      return 'lib%s.so' % target
+    elif spec['type'] == 'none':
+      return '%s.stamp' % target
+    elif spec['type'] == 'settings':

+      'none':            'stamp',
+    }
+    command = command_map[spec['type']]
+    self.WriteEdge([output], command, link_deps)
+    return output
+
+  def ComputeOutputFileName(self, spec):
+    target = spec['target_name']
+
+    # Snip out an extra 'lib' if appropriate.
