| 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 command = "$cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{outp
ut}} /Fd$pdbname" |
| 78 depsformat = "msvc" | 78 depsformat = "msvc" |
| 79 description = "CC {{output}}" | 79 description = "CC {{output}}" |
| 80 outputs = [ | 80 outputs = [ |
| 81 "$object_subdir/{{source_name_part}}.obj", | 81 "$object_subdir/{{source_name_part}}.obj", |
| 82 ] | 82 ] |
| 83 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" | 83 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" |
| 84 } | 84 } |
| 85 | 85 |
| 86 tool("cxx") { | 86 tool("cxx") { |
| 87 rspfile = "{{output}}.rsp" | 87 rspfile = "{{output}}.rsp" |
| 88 precompiled_header_type = "msvc" | 88 precompiled_header_type = "msvc" |
| 89 | 89 |
| 90 # The PDB name needs to be different between C and C++ compiled files. | 90 # The PDB name needs to be different between C and C++ compiled files. |
| 91 pdbname = "{{target_out_dir}}/{{label_name}}_cc.pdb" | 91 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" | 92 command = "$cl /nologo /showIncludes /FC @$rspfile /c {{source}} /Fo{{outp
ut}} /Fd$pdbname" |
| 93 depsformat = "msvc" | 93 depsformat = "msvc" |
| 94 description = "CXX {{output}}" | 94 description = "CXX {{output}}" |
| 95 outputs = [ | 95 outputs = [ |
| 96 "$object_subdir/{{source_name_part}}.obj", | 96 "$object_subdir/{{source_name_part}}.obj", |
| 97 ] | 97 ] |
| 98 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" | 98 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" |
| 99 } | 99 } |
| 100 | 100 |
| 101 tool("rc") { | 101 tool("rc") { |
| 102 command = "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{
include_dirs}} /fo{{output}} {{source}}" | 102 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 | 360 |
| 361 msvc_toolchain("winrt_x64") { | 361 msvc_toolchain("winrt_x64") { |
| 362 environment = "environment.winrt_x64" | 362 environment = "environment.winrt_x64" |
| 363 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 363 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
| 364 is_clang = false | 364 is_clang = false |
| 365 | 365 |
| 366 toolchain_cpu = "x64" | 366 toolchain_cpu = "x64" |
| 367 toolchain_os = current_os | 367 toolchain_os = current_os |
| 368 } | 368 } |
| 369 } | 369 } |
| OLD | NEW |