Chromium Code Reviews| Index: pylib/gyp/generator/make.py |
| =================================================================== |
| --- pylib/gyp/generator/make.py (revision 1508) |
| +++ pylib/gyp/generator/make.py (working copy) |
| @@ -718,7 +718,7 @@ |
| self.output = self.output_binary = self.ComputeOutput(spec) |
| self._INSTALLABLE_TARGETS = ('executable', 'loadable_module', |
| - 'shared_library') |
| + 'shared_library', 'standalone_static_library') |
| if self.type in self._INSTALLABLE_TARGETS: |
| self.alias = os.path.basename(self.output) |
| install_path = self._InstallableTargetInstallPath() |
| @@ -785,7 +785,8 @@ |
| target_outputs[qualified_target] = install_path |
| # Update global list of link dependencies. |
| - if self.type in ('static_library', 'shared_library'): |
| + if self.type in ('static_library', 'standalone_static_library', |
| + 'shared_library'): |
| target_link_deps[qualified_target] = self.output_binary |
| # Currently any versions have the same effect, but in future the behavior |
| @@ -1287,13 +1288,14 @@ |
| assert not self.is_mac_bundle |
| if self.flavor == 'mac' and self.type in ( |
| - 'static_library', 'executable', 'shared_library', 'loadable_module'): |
| + 'static_library', 'executable', 'shared_library', 'loadable_module', |
| + 'standalone_static_library'): |
| return self.xcode_settings.GetExecutablePath() |
| target = spec['target_name'] |
| target_prefix = '' |
| target_ext = '' |
| - if self.type == 'static_library': |
| + if self.type in ('static_library', 'standalone_static_library'): |
| if target[:3] == 'lib': |
| target = target[3:] |
| target_prefix = 'lib' |
| @@ -1320,7 +1322,8 @@ |
| def _InstallImmediately(self): |
| return self.toolset == 'target' and self.flavor == 'mac' and self.type in ( |
| - 'static_library', 'executable', 'shared_library', 'loadable_module') |
| + 'static_library', 'standalone_static_library','executable', |
| + 'shared_library', 'loadable_module') |
| def ComputeOutput(self, spec): |
| @@ -1534,6 +1537,14 @@ |
| "Spaces in alink input filenames not supported (%s)" % link_dep) |
| self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all, |
| postbuilds=postbuilds) |
| + elif self.type == 'standalone_static_library': |
| + self.WriteLn( |
| + 'cmd_alink = rm -f $@ && $(AR.$(TOOLSET)) crs $@ $(filter %.o,$^)') |
| + for link_dep in link_deps: |
| + assert ' ' not in link_dep, ( |
| + "Spaces in alink input filenames not supported (%s)" % link_dep) |
| + self.WriteDoCmd([self.output_binary], link_deps, 'alink', part_of_all, |
| + postbuilds=postbuilds) |
|
borenet
2012/10/01 21:27:48
What should be the behavior when a standalone_stat
|
| elif self.type == 'shared_library': |
| self.WriteLn('%s: LD_INPUTS := %s' % ( |
| QuoteSpaces(self.output_binary), |
| @@ -1576,6 +1587,8 @@ |
| if self.type in self._INSTALLABLE_TARGETS: |
| if self.type == 'shared_library': |
| file_desc = 'shared library' |
| + elif self.type == 'standalone_static_library': |
| + file_desc = 'static library' |
| else: |
| file_desc = 'executable' |
| install_path = self._InstallableTargetInstallPath() |
| @@ -1719,7 +1732,8 @@ |
| link_deps: A list of link dependencies, which must be sorted in |
| the order from dependencies to dependents. |
| """ |
| - if self.type not in ('executable', 'shared_library', 'static_library'): |
| + if self.type not in ('executable', 'shared_library', 'static_library', |
| + 'standalone_static_library'): |
| return |
| self.WriteLn('# Variable definitions for Android applications') |
| @@ -1784,7 +1798,7 @@ |
| self.WriteLn('include $(BUILD_EXECUTABLE)') |
| elif self.type == 'shared_library': |
| self.WriteLn('include $(BUILD_SHARED_LIBRARY)') |
| - elif self.type == 'static_library': |
| + elif self.type in ('static_library', 'standalone_static_library'): |
| self.WriteLn('include $(BUILD_STATIC_LIBRARY)') |
| self.WriteLn() |