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', |
+ ], |
+ }, |
+ ], |
+ }], |
+ }], |
+ ], |
}], |
], |
}], |