Home | History | Annotate | Download | only in chrome
      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
      3 # found in the LICENSE file.
      4 {
      5   'variables': {
      6     'dest_dir': '<(PRODUCT_DIR)/syzygy',
      7   },
      8   'conditions': [
      9     ['syzyasan==1', {
     10       'variables': {
     11         'syzygy_exe_dir': '<(DEPTH)/third_party/syzygy/binaries/exe',
     12       },
     13       # Copy the SyzyASan runtime and logger to the syzygy directory.
     14       'targets': [
     15         {
     16           'target_name': 'copy_syzyasan_binaries',
     17           'type': 'none',
     18           'outputs': [
     19             '<(dest_dir)/agent_logger.exe',
     20             '<(dest_dir)/syzyasan_rtl.dll',
     21             '<(dest_dir)/syzyasan_rtl.dll.pdb',
     22           ],
     23           'copies': [
     24             {
     25               'destination': '<(dest_dir)',
     26               'files': [
     27                 '<(syzygy_exe_dir)/agent_logger.exe',
     28                 '<(syzygy_exe_dir)/syzyasan_rtl.dll',
     29                 '<(syzygy_exe_dir)/syzyasan_rtl.dll.pdb',
     30               ],
     31             },
     32           ],
     33         },
     34       ],
     35     }],
     36     ['OS=="win" and fastbuild==0', {
     37       'conditions': [
     38         ['syzygy_optimize==1 or syzyasan==1', {
     39           'variables': {
     40             'dll_name': 'chrome',
     41           },
     42           'targets': [
     43             {
     44               'target_name': 'chrome_dll_syzygy',
     45               'type': 'none',
     46               'sources' : [],
     47               'includes': [
     48                 'chrome_syzygy.gypi',
     49               ],
     50             },
     51           ],
     52         }],
     53         ['chrome_multiple_dll==1', {
     54           'conditions': [
     55             ['syzyasan==1 or syzygy_optimize==1', {
     56               'variables': {
     57                 'dll_name': 'chrome_child',
     58               },
     59               'targets': [
     60                 {
     61                   'target_name': 'chrome_child_dll_syzygy',
     62                   'type': 'none',
     63                   # For the official SyzyASan builds just copy chrome_child.dll
     64                   # to the Syzygy directory.
     65                   'conditions': [
     66                     ['syzyasan==1 and buildtype=="Official"', {
     67                       'dependencies': [
     68                         'chrome_child_dll_syzygy_copy'
     69                       ],
     70                     }],
     71                   ],
     72                   # For the official SyzyASan builds also put an instrumented
     73                   # version of chrome_child.dll into syzygy/instrumented.
     74                   'variables': {
     75                     'conditions': [
     76                       ['syzyasan==1 and buildtype=="Official"', {
     77                         'dest_dir': '<(PRODUCT_DIR)/syzygy/instrumented',
     78                       }],
     79                     ],
     80                   },
     81                   'sources' : [],
     82                   'includes': [
     83                     'chrome_syzygy.gypi',
     84                   ],
     85                 },
     86               ],
     87             }],
     88             # For the official SyzyASan builds just copy chrome_child.dll to the
     89             # Syzygy directory.
     90             ['syzyasan==1 and buildtype=="Official"', {
     91               'targets': [
     92               {
     93                 'target_name': 'chrome_child_dll_syzygy_copy',
     94                 'type': 'none',
     95                 'inputs': [
     96                   '<(PRODUCT_DIR)/chrome_child.dll',
     97                   '<(PRODUCT_DIR)/chrome_child.dll.pdb',
     98                 ],
     99                 'outputs': [
    100                   '<(dest_dir)/chrome_child.dll',
    101                   '<(dest_dir)/chrome_child.dll.pdb',
    102                 ],
    103                 'copies': [
    104                   {
    105                     'destination': '<(dest_dir)',
    106                     'files': [
    107                       '<(PRODUCT_DIR)/chrome_child.dll',
    108                       '<(PRODUCT_DIR)/chrome_child.dll.pdb',
    109                     ],
    110                   },
    111                 ],
    112               }],
    113             }],
    114           ],
    115         }],
    116       ],
    117     }],
    118   ],
    119 }
    120