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

Unified Diff: chrome/chrome_syzygy.gyp

Issue 199633004: Put the syzygy targets behind a 'syzygy_optimize' flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Chris' comment. Created 6 years, 9 months 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
Index: chrome/chrome_syzygy.gyp
diff --git a/chrome/chrome_syzygy.gyp b/chrome/chrome_syzygy.gyp
index c2c81a1588dc211a72a6d858cc9c1aeb173eb360..2b340a20b987f82e364b6df3f6aaf6022cc7874b 100644
--- a/chrome/chrome_syzygy.gyp
+++ b/chrome/chrome_syzygy.gyp
@@ -3,6 +3,16 @@
# found in the LICENSE file.
{
'conditions': [
+ ['syzyasan==1 and syzygy_optimize==1', {
scottmg 2014/03/18 17:21:13 I don't think this block is necessary, we have man
Sébastien Marchand 2014/03/18 18:25:00 Removed, but it'll be nice to have some assertions
+ # Prevents from setting both 'syzyasan' and 'syzygy_optimize' by adding a
+ # target with an invalid type, this will trigger an error in gyp.
+ 'targets': [
+ {
+ 'target_name': 'syzygy_optimize_and_syzyasan_are_not_compatible',
+ 'type': 'must_not_use_syzygy_optimize_and_syzyasan_together',
+ },
+ ],
+ }],
['syzyasan==1', {
'variables': {
'dest_dir': '<(PRODUCT_DIR)/syzygy',
@@ -32,62 +42,69 @@
],
}],
['OS=="win" and fastbuild==0', {
- 'variables': {
- 'dll_name': 'chrome',
- },
- 'targets': [
- {
- 'target_name': 'chrome_dll_syzygy',
- 'type': 'none',
- 'sources' : [],
- 'includes': [
- 'chrome_syzygy.gypi',
- ],
- },
- ],
- }],
- # Note, not else.
- ['OS=="win" and fastbuild==0 and chrome_multiple_dll==1 and '
- '(syzyasan!=1 or buildtype!="Official")', {
- 'variables': {
- 'dll_name': 'chrome_child',
- },
- 'targets': [
- {
- 'target_name': 'chrome_child_dll_syzygy',
- 'type': 'none',
- 'sources' : [],
- 'includes': [
- 'chrome_syzygy.gypi',
- ],
- },
- ],
- }, {
'conditions': [
- ['OS=="win" and fastbuild==0 and chrome_multiple_dll==1 and '
- 'syzyasan==1 and buildtype=="Official"', {
+ ['syzygy_optimize==1 or syzyasan==1', {
+ 'variables': {
+ 'dll_name': 'chrome',
+ },
'targets': [
- {
- 'target_name': 'chrome_child_dll_syzygy',
- 'type': 'none',
- 'inputs': [
- '<(PRODUCT_DIR)/chrome_child.dll',
- '<(PRODUCT_DIR)/chrome_child.dll.pdb',
- ],
- 'outputs': [
- '<(PRODUCT_DIR)/syzygy/chrome_child.dll',
- '<(PRODUCT_DIR)/syzygy/chrome_child.dll.pdb',
- ],
- 'copies': [
+ {
+ 'target_name': 'chrome_dll_syzygy',
+ 'type': 'none',
+ 'sources' : [],
+ 'includes': [
+ 'chrome_syzygy.gypi',
+ ],
+ },
+ ],
+ }],
+ ['chrome_multiple_dll==1', {
+ 'conditions': [
+ # Prevent chrome_child.dll from being syzyasan-instrumented for the
+ # official builds.
+ ['(syzyasan!=1 or buildtype!="Official") and '
+ '(syzygy_optimize==1 or syzyasan==1)', {
scottmg 2014/03/18 17:21:13 Wow, I stared at that for a while. I think it's ok
Sébastien Marchand 2014/03/18 18:25:00 Yeah... It's pretty complex, I've added the truth
+ 'variables': {
+ 'dll_name': 'chrome_child',
+ },
+ 'targets': [
+ {
+ 'target_name': 'chrome_child_dll_syzygy',
+ 'type': 'none',
+ 'sources' : [],
+ 'includes': [
+ 'chrome_syzygy.gypi',
+ ],
+ },
+ ],
+ }],
+ # For the official SyzyASan builds just copy chrome_child.dll to the
+ # Syzygy directory.
+ ['syzyasan==1 and buildtype=="Official"', {
+ 'targets': [
{
- 'destination': '<(PRODUCT_DIR)/syzygy',
- 'files': [
+ 'target_name': 'chrome_child_dll_syzygy',
+ 'type': 'none',
+ 'inputs': [
'<(PRODUCT_DIR)/chrome_child.dll',
'<(PRODUCT_DIR)/chrome_child.dll.pdb',
],
- },
- ],
- }],
+ 'outputs': [
+ '<(PRODUCT_DIR)/syzygy/chrome_child.dll',
+ '<(PRODUCT_DIR)/syzygy/chrome_child.dll.pdb',
+ ],
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)/syzygy',
+ 'files': [
+ '<(PRODUCT_DIR)/chrome_child.dll',
+ '<(PRODUCT_DIR)/chrome_child.dll.pdb',
+ ],
+ },
+ ],
+ }],
+ }],
+ ],
}],
],
}],

Powered by Google App Engine
This is Rietveld 408576698