Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import("//build/config/sanitizers/sanitizers.gni") | 5 import("//build/config/sanitizers/sanitizers.gni") |
| 6 import("//build/config/win/visual_studio_version.gni") | 6 import("//build/config/win/visual_studio_version.gni") |
| 7 import("//build/toolchain/goma.gni") | 7 import("//build/toolchain/goma.gni") |
| 8 import("//build/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
| 9 | 9 |
| 10 # Should only be running on Windows. | 10 # Should only be running on Windows. |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 lib_switch = "" | 67 lib_switch = "" |
| 68 lib_dir_switch = "/LIBPATH:" | 68 lib_dir_switch = "/LIBPATH:" |
| 69 | 69 |
| 70 # Object files go in this directory. | 70 # Object files go in this directory. |
| 71 object_subdir = "{{target_out_dir}}/{{label_name}}" | 71 object_subdir = "{{target_out_dir}}/{{label_name}}" |
| 72 | 72 |
| 73 tool("cc") { | 73 tool("cc") { |
| 74 rspfile = "{{output}}.rsp" | 74 rspfile = "{{output}}.rsp" |
| 75 precompiled_header_type = "msvc" | 75 precompiled_header_type = "msvc" |
| 76 pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb" | 76 pdbname = "{{target_out_dir}}/{{label_name}}_c.pdb" |
| 77 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil e /c {{source}} /Fo{{output}} /Fd$pdbname" | 77 |
| 78 # Label names may have spaces in them so the pdbname must be quoted. The | |
| 79 # source and output don't need to be quoted because GN knows they're a | |
| 80 # full file name and will quote automatically when necessary. | |
|
Dirk Pranke
2016/03/31 23:09:55
Ah. thank you.
| |
| 81 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil e /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" | |
| 78 depsformat = "msvc" | 82 depsformat = "msvc" |
| 79 description = "CC {{output}}" | 83 description = "CC {{output}}" |
| 80 outputs = [ | 84 outputs = [ |
| 81 "$object_subdir/{{source_name_part}}.obj", | 85 "$object_subdir/{{source_name_part}}.obj", |
| 82 ] | 86 ] |
| 83 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" | 87 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" |
| 84 } | 88 } |
| 85 | 89 |
| 86 tool("cxx") { | 90 tool("cxx") { |
| 87 rspfile = "{{output}}.rsp" | 91 rspfile = "{{output}}.rsp" |
| 88 precompiled_header_type = "msvc" | 92 precompiled_header_type = "msvc" |
| 89 | 93 |
| 90 # The PDB name needs to be different between C and C++ compiled files. | 94 # The PDB name needs to be different between C and C++ compiled files. |
| 91 pdbname = "{{target_out_dir}}/{{label_name}}_cc.pdb" | 95 pdbname = "{{target_out_dir}}/{{label_name}}_cc.pdb" |
| 92 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil e /c {{source}} /Fo{{output}} /Fd$pdbname" | 96 |
| 97 # See comment in CC tool about quoting. | |
| 98 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil e /c {{source}} /Fo{{output}} /Fd\"$pdbname\"" | |
| 93 depsformat = "msvc" | 99 depsformat = "msvc" |
| 94 description = "CXX {{output}}" | 100 description = "CXX {{output}}" |
| 95 outputs = [ | 101 outputs = [ |
| 96 "$object_subdir/{{source_name_part}}.obj", | 102 "$object_subdir/{{source_name_part}}.obj", |
| 97 ] | 103 ] |
| 98 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" | 104 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" |
| 99 } | 105 } |
| 100 | 106 |
| 101 tool("rc") { | 107 tool("rc") { |
| 102 command = "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{ include_dirs}} /fo{{output}} {{source}}" | 108 command = "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{ include_dirs}} /fo{{output}} {{source}}" |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 360 | 366 |
| 361 msvc_toolchain("winrt_x64") { | 367 msvc_toolchain("winrt_x64") { |
| 362 environment = "environment.winrt_x64" | 368 environment = "environment.winrt_x64" |
| 363 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 369 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
| 364 is_clang = false | 370 is_clang = false |
| 365 | 371 |
| 366 toolchain_cpu = "x64" | 372 toolchain_cpu = "x64" |
| 367 toolchain_os = current_os | 373 toolchain_os = current_os |
| 368 } | 374 } |
| 369 } | 375 } |
| OLD | NEW |