| OLD | NEW |
| 1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. 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 import copy | 5 import copy |
| 6 import gyp | 6 import gyp |
| 7 import gyp.common | 7 import gyp.common |
| 8 import gyp.msvs_emulation | 8 import gyp.msvs_emulation |
| 9 import gyp.MSVSVersion | 9 import gyp.MSVSVersion |
| 10 import gyp.system_test | 10 import gyp.system_test |
| (...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 command=('$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_cc ' | 1298 command=('$cxx -MMD -MF $out.d $defines $includes $cflags $cflags_cc ' |
| 1299 '$cflags_pch_cc -c $in -o $out'), | 1299 '$cflags_pch_cc -c $in -o $out'), |
| 1300 depfile='$out.d') | 1300 depfile='$out.d') |
| 1301 else: | 1301 else: |
| 1302 # TODO(scottmg): Requires fork of ninja for dependency and linking | 1302 # TODO(scottmg): Requires fork of ninja for dependency and linking |
| 1303 # support: https://github.com/sgraham/ninja | 1303 # support: https://github.com/sgraham/ninja |
| 1304 # Template for compile commands mostly shared between compiling files | 1304 # Template for compile commands mostly shared between compiling files |
| 1305 # and generating PCH. In the case of PCH, the "output" is specified by /Fp | 1305 # and generating PCH. In the case of PCH, the "output" is specified by /Fp |
| 1306 # rather than /Fo (for object files), but we still need to specify an /Fo | 1306 # rather than /Fo (for object files), but we still need to specify an /Fo |
| 1307 # when compiling PCH. | 1307 # when compiling PCH. |
| 1308 cc_template = ('cmd /s /c "$cc /nologo /showIncludes ' | 1308 cc_template = ('cmd /s /c "$cc /nologo /showIncludes /FC ' |
| 1309 '@$out.rsp ' | 1309 '@$out.rsp ' |
| 1310 '$cflags_pch_c /c $in %(outspec)s /Fd$pdbname ' | 1310 '$cflags_pch_c /c $in %(outspec)s /Fd$pdbname ' |
| 1311 '| ninja-deplist-helper -r . -q -f cl -o $out.dl"') | 1311 '| ninja-deplist-helper -r . -q -f cl -o $out.dl"') |
| 1312 cxx_template = ('cmd /s /c "$cxx /nologo /showIncludes ' | 1312 cxx_template = ('cmd /s /c "$cxx /nologo /showIncludes /FC ' |
| 1313 '@$out.rsp ' | 1313 '@$out.rsp ' |
| 1314 '$cflags_pch_cc /c $in %(outspec)s $pchobj /Fd$pdbname ' | 1314 '$cflags_pch_cc /c $in %(outspec)s $pchobj /Fd$pdbname ' |
| 1315 '| ninja-deplist-helper -r . -q -f cl -o $out.dl"') | 1315 '| ninja-deplist-helper -r . -q -f cl -o $out.dl"') |
| 1316 master_ninja.rule( | 1316 master_ninja.rule( |
| 1317 'cc', | 1317 'cc', |
| 1318 description='CC $out', | 1318 description='CC $out', |
| 1319 command=cc_template % {'outspec': '/Fo$out'}, | 1319 command=cc_template % {'outspec': '/Fo$out'}, |
| 1320 deplist='$out.dl', | 1320 deplist='$out.dl', |
| 1321 rspfile='$out.rsp', | 1321 rspfile='$out.rsp', |
| 1322 rspfile_content='$defines $includes $cflags $cflags_c') | 1322 rspfile_content='$defines $includes $cflags $cflags_c') |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1542 | 1542 |
| 1543 user_config = params.get('generator_flags', {}).get('config', None) | 1543 user_config = params.get('generator_flags', {}).get('config', None) |
| 1544 if user_config: | 1544 if user_config: |
| 1545 GenerateOutputForConfig(target_list, target_dicts, data, params, | 1545 GenerateOutputForConfig(target_list, target_dicts, data, params, |
| 1546 user_config) | 1546 user_config) |
| 1547 else: | 1547 else: |
| 1548 config_names = target_dicts[target_list[0]]['configurations'].keys() | 1548 config_names = target_dicts[target_list[0]]['configurations'].keys() |
| 1549 for config_name in config_names: | 1549 for config_name in config_names: |
| 1550 GenerateOutputForConfig(target_list, target_dicts, data, params, | 1550 GenerateOutputForConfig(target_list, target_dicts, data, params, |
| 1551 config_name) | 1551 config_name) |
| OLD | NEW |