Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 { | 4 { |
| 5 'conditions': [ | 5 'conditions': [ |
| 6 ['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
| |
| 7 # Prevents from setting both 'syzyasan' and 'syzygy_optimize' by adding a | |
| 8 # target with an invalid type, this will trigger an error in gyp. | |
| 9 'targets': [ | |
| 10 { | |
| 11 'target_name': 'syzygy_optimize_and_syzyasan_are_not_compatible', | |
| 12 'type': 'must_not_use_syzygy_optimize_and_syzyasan_together', | |
| 13 }, | |
| 14 ], | |
| 15 }], | |
| 6 ['syzyasan==1', { | 16 ['syzyasan==1', { |
| 7 'variables': { | 17 'variables': { |
| 8 'dest_dir': '<(PRODUCT_DIR)/syzygy', | 18 'dest_dir': '<(PRODUCT_DIR)/syzygy', |
| 9 'syzygy_exe_dir': '<(DEPTH)/third_party/syzygy/binaries/exe', | 19 'syzygy_exe_dir': '<(DEPTH)/third_party/syzygy/binaries/exe', |
| 10 }, | 20 }, |
| 11 # Copy the SyzyASan runtime and logger to the syzygy directory. | 21 # Copy the SyzyASan runtime and logger to the syzygy directory. |
| 12 'targets': [ | 22 'targets': [ |
| 13 { | 23 { |
| 14 'target_name': 'copy_syzyasan_binaries', | 24 'target_name': 'copy_syzyasan_binaries', |
| 15 'type': 'none', | 25 'type': 'none', |
| 16 'outputs': [ | 26 'outputs': [ |
| 17 '<(dest_dir)/agent_logger.exe', | 27 '<(dest_dir)/agent_logger.exe', |
| 18 '<(dest_dir)/syzyasan_rtl.dll', | 28 '<(dest_dir)/syzyasan_rtl.dll', |
| 19 '<(dest_dir)/syzyasan_rtl.dll.pdb', | 29 '<(dest_dir)/syzyasan_rtl.dll.pdb', |
| 20 ], | 30 ], |
| 21 'copies': [ | 31 'copies': [ |
| 22 { | 32 { |
| 23 'destination': '<(dest_dir)', | 33 'destination': '<(dest_dir)', |
| 24 'files': [ | 34 'files': [ |
| 25 '<(syzygy_exe_dir)/agent_logger.exe', | 35 '<(syzygy_exe_dir)/agent_logger.exe', |
| 26 '<(syzygy_exe_dir)/syzyasan_rtl.dll', | 36 '<(syzygy_exe_dir)/syzyasan_rtl.dll', |
| 27 '<(syzygy_exe_dir)/syzyasan_rtl.dll.pdb', | 37 '<(syzygy_exe_dir)/syzyasan_rtl.dll.pdb', |
| 28 ], | 38 ], |
| 29 }, | 39 }, |
| 30 ], | 40 ], |
| 31 }, | 41 }, |
| 32 ], | 42 ], |
| 33 }], | 43 }], |
| 34 ['OS=="win" and fastbuild==0', { | 44 ['OS=="win" and fastbuild==0', { |
| 35 'variables': { | 45 'conditions': [ |
| 36 'dll_name': 'chrome', | 46 ['syzygy_optimize==1 or syzyasan==1', { |
| 37 }, | 47 'variables': { |
| 38 'targets': [ | 48 'dll_name': 'chrome', |
| 39 { | 49 }, |
| 40 'target_name': 'chrome_dll_syzygy', | 50 'targets': [ |
| 41 'type': 'none', | 51 { |
| 42 'sources' : [], | 52 'target_name': 'chrome_dll_syzygy', |
| 43 'includes': [ | 53 'type': 'none', |
| 44 'chrome_syzygy.gypi', | 54 'sources' : [], |
| 55 'includes': [ | |
| 56 'chrome_syzygy.gypi', | |
| 57 ], | |
| 58 }, | |
| 45 ], | 59 ], |
| 46 }, | 60 }], |
| 47 ], | 61 ['chrome_multiple_dll==1', { |
| 48 }], | 62 'conditions': [ |
| 49 # Note, not else. | 63 # Prevent chrome_child.dll from being syzyasan-instrumented for the |
| 50 ['OS=="win" and fastbuild==0 and chrome_multiple_dll==1 and ' | 64 # official builds. |
| 51 '(syzyasan!=1 or buildtype!="Official")', { | 65 ['(syzyasan!=1 or buildtype!="Official") and ' |
| 52 'variables': { | 66 '(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
| |
| 53 'dll_name': 'chrome_child', | 67 'variables': { |
| 54 }, | 68 'dll_name': 'chrome_child', |
| 55 'targets': [ | 69 }, |
| 56 { | 70 'targets': [ |
| 57 'target_name': 'chrome_child_dll_syzygy', | 71 { |
| 58 'type': 'none', | 72 'target_name': 'chrome_child_dll_syzygy', |
| 59 'sources' : [], | 73 'type': 'none', |
| 60 'includes': [ | 74 'sources' : [], |
| 61 'chrome_syzygy.gypi', | 75 'includes': [ |
| 62 ], | 76 'chrome_syzygy.gypi', |
| 63 }, | 77 ], |
| 64 ], | 78 }, |
| 65 }, { | 79 ], |
| 66 'conditions': [ | 80 }], |
| 67 ['OS=="win" and fastbuild==0 and chrome_multiple_dll==1 and ' | 81 # For the official SyzyASan builds just copy chrome_child.dll to the |
| 68 'syzyasan==1 and buildtype=="Official"', { | 82 # Syzygy directory. |
| 69 'targets': [ | 83 ['syzyasan==1 and buildtype=="Official"', { |
| 70 { | 84 'targets': [ |
| 71 'target_name': 'chrome_child_dll_syzygy', | |
| 72 'type': 'none', | |
| 73 'inputs': [ | |
| 74 '<(PRODUCT_DIR)/chrome_child.dll', | |
| 75 '<(PRODUCT_DIR)/chrome_child.dll.pdb', | |
| 76 ], | |
| 77 'outputs': [ | |
| 78 '<(PRODUCT_DIR)/syzygy/chrome_child.dll', | |
| 79 '<(PRODUCT_DIR)/syzygy/chrome_child.dll.pdb', | |
| 80 ], | |
| 81 'copies': [ | |
| 82 { | 85 { |
| 83 'destination': '<(PRODUCT_DIR)/syzygy', | 86 'target_name': 'chrome_child_dll_syzygy', |
| 84 'files': [ | 87 'type': 'none', |
| 88 'inputs': [ | |
| 85 '<(PRODUCT_DIR)/chrome_child.dll', | 89 '<(PRODUCT_DIR)/chrome_child.dll', |
| 86 '<(PRODUCT_DIR)/chrome_child.dll.pdb', | 90 '<(PRODUCT_DIR)/chrome_child.dll.pdb', |
| 87 ], | 91 ], |
| 88 }, | 92 'outputs': [ |
| 89 ], | 93 '<(PRODUCT_DIR)/syzygy/chrome_child.dll', |
| 90 }], | 94 '<(PRODUCT_DIR)/syzygy/chrome_child.dll.pdb', |
| 95 ], | |
| 96 'copies': [ | |
| 97 { | |
| 98 'destination': '<(PRODUCT_DIR)/syzygy', | |
| 99 'files': [ | |
| 100 '<(PRODUCT_DIR)/chrome_child.dll', | |
| 101 '<(PRODUCT_DIR)/chrome_child.dll.pdb', | |
| 102 ], | |
| 103 }, | |
| 104 ], | |
| 105 }], | |
| 106 }], | |
| 107 ], | |
| 91 }], | 108 }], |
| 92 ], | 109 ], |
| 93 }], | 110 }], |
| 94 ], | 111 ], |
| 95 } | 112 } |
| OLD | NEW |