Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2083)

Unified Diff: pylib/gyp/msvs_emulation.py

Issue 97873002: ninja/win: Support VCLinkerTool.GenerateManifest (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/win/gyptest-link-generate-manifest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/msvs_emulation.py
===================================================================
--- pylib/gyp/msvs_emulation.py (revision 1801)
+++ pylib/gyp/msvs_emulation.py (working copy)
@@ -512,18 +512,26 @@
ldflags.append('/NXCOMPAT')
have_def_file = filter(lambda x: x.startswith('/DEF:'), ldflags)
- manifest_flags, intermediate_manifest_file = self._GetLdManifestFlags(
- config, manifest_base_name, is_executable and not have_def_file)
+ manifest_flags, manifest_files = self._GetLdManifestFlags(
+ config, manifest_base_name, gyp_to_build_path,
+ is_executable and not have_def_file)
ldflags.extend(manifest_flags)
- manifest_files = self._GetAdditionalManifestFiles(config, gyp_to_build_path)
- manifest_files.append(intermediate_manifest_file)
-
return ldflags, manifest_files
- def _GetLdManifestFlags(self, config, name, allow_isolation):
+ def _GetLdManifestFlags(self, config, name, gyp_to_build_path,
+ allow_isolation):
"""Returns the set of flags that need to be added to the link to generate
- a default manifest, as well as the name of the generated file."""
- # The manifest is generated by default.
+ a default manifest, as well as the list of all the manifest files to be
+ merged by the manifest tool."""
+ generate_manifest = self._Setting(('VCLinkerTool', 'GenerateManifest'),
+ config,
+ default='true')
+ if generate_manifest != 'true':
+ # This means not only that the linker should not generate the intermediate
+ # manifest but also that the manifest tool should do nothing even when
+ # additional manifests are specified.
+ return ['/MANIFEST:NO'], []
+
output_name = name + '.intermediate.manifest'
flags = [
'/MANIFEST',
@@ -551,8 +559,12 @@
if allow_isolation:
flags.append('/ALLOWISOLATION')
- return flags, output_name
+ manifest_files = [output_name]
+ manifest_files += self._GetAdditionalManifestFiles(config,
+ gyp_to_build_path)
+ return flags, manifest_files
+
def _GetAdditionalManifestFiles(self, config, gyp_to_build_path):
"""Gets additional manifest files that are added to the default one
generated by the linker."""
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/win/gyptest-link-generate-manifest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698