summaryrefslogtreecommitdiffstats
path: root/build/common.gypi
diff options
context:
space:
mode:
authorYukawa@chromium.org <Yukawa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 20:24:30 +0000
committerYukawa@chromium.org <Yukawa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-30 20:24:30 +0000
commit5d60b0b9ddbab9d3cfc66aaf31ba03a1154382c1 (patch)
treeea277dfe39ab8c6052c25b2a1e3bea2e2b225f2a /build/common.gypi
parent16f2ab1136cc0771dc57252c7542c9500355879c (diff)
downloadchromium_src-5d60b0b9ddbab9d3cfc66aaf31ba03a1154382c1.zip
chromium_src-5d60b0b9ddbab9d3cfc66aaf31ba03a1154382c1.tar.gz
chromium_src-5d60b0b9ddbab9d3cfc66aaf31ba03a1154382c1.tar.bz2
Embed compatibility manifest into all *.exe files
This CL introduces an automated and centralized way to embed compatibility manifest into all *.exe files. With this CL, a potential risk of behavioural inconsistency between production binaries and unit test binaries is resolved by enforcing the same compatibility context. This CL uses 'target_conditions' feature of gyp to inject manifest settings into each executable target. One tricky part is that some executables such as setup.exe and mini_installer.exe require external manifest file instead of embedded one when component build is enabled. See http://crbug.com/127233 for this. You can override the gyp variable 'win_exe_compatibility_manifest' locally for a given executable target to embed a custom compatibility manifest. BUG=260692 Review URL: https://chromiumcodereview.appspot.com/19275010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@214427 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/common.gypi')
-rw-r--r--build/common.gypi30
1 files changed, 30 insertions, 0 deletions
diff --git a/build/common.gypi b/build/common.gypi
index d67c5f1..f6a1967 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1789,6 +1789,17 @@
# See http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
'win_debug_disable_iterator_debugging%': '0',
+ # An application manifest fragment to declare compatibility settings for
+ # 'executable' targets. Ignored in other target type.
+ 'win_exe_compatibility_manifest%':
+ '<(DEPTH)\\build\\win\\compatibility.manifest',
+
+ # Set to 1 to generate external manifest instead of embedding it for
+ # 'executable' target. Does nothing for other target type. This flag is
+ # used to make mini_installer compatible with the component build.
+ # See http://crbug.com/127233
+ 'win_use_external_manifest%': 0,
+
'release_extra_cflags%': '',
'debug_extra_cflags%': '',
@@ -4471,6 +4482,25 @@
'<(SHARED_INTERMEDIATE_DIR)',
],
},
+ 'target_conditions': [
+ ['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
+ 'VCManifestTool': {
+ 'AdditionalManifestFiles': [
+ '>(win_exe_compatibility_manifest)',
+ ],
+ },
+ }],
+ ['_type=="executable" and >(win_use_external_manifest)==0', {
+ 'VCManifestTool': {
+ 'EmbedManifest': 'true',
+ }
+ }],
+ ['_type=="executable" and >(win_use_external_manifest)==1', {
+ 'VCManifestTool': {
+ 'EmbedManifest': 'false',
+ }
+ }],
+ ],
},
},
}],