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.""" |