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 declare_args() { | 5 declare_args() { |
6 # Path to the directory containing the VC binaries for the right | 6 # Path to the directory containing the VC binaries for the right |
7 # combination of host and target architectures. Currently only the | 7 # combination of host and target architectures. Currently only the |
8 # 64-bit host toolchain is supported, with either 32-bit or 64-bit targets. | 8 # 64-bit host toolchain is supported, with either 32-bit or 64-bit targets. |
9 # If vc_bin_dir is not specified on the command line (and it normally | 9 # If vc_bin_dir is not specified on the command line (and it normally |
10 # isn't), we will dynamically determine the right value to use at runtime. | 10 # isn't), we will dynamically determine the right value to use at runtime. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 cl = invoker.cl | 74 cl = invoker.cl |
75 | 75 |
76 toolchain(target_name) { | 76 toolchain(target_name) { |
77 # Make these apply to all tools below. | 77 # Make these apply to all tools below. |
78 lib_switch = "" | 78 lib_switch = "" |
79 lib_dir_switch = "/LIBPATH:" | 79 lib_dir_switch = "/LIBPATH:" |
80 | 80 |
81 tool("cc") { | 81 tool("cc") { |
82 rspfile = "{{output}}.rsp" | 82 rspfile = "{{output}}.rsp" |
83 precompiled_header_type = "msvc" | 83 |
| 84 # TODO(brettw) enable this when GN support in the binary has been rolled. |
| 85 #precompiled_header_type = "msvc" |
84 pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb" | 86 pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb" |
85 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" | 87 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" |
86 depsformat = "msvc" | 88 depsformat = "msvc" |
87 description = "CC {{output}}" | 89 description = "CC {{output}}" |
88 outputs = [ | 90 outputs = [ |
89 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", | 91 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
90 ] | 92 ] |
91 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" | 93 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" |
92 } | 94 } |
93 | 95 |
94 tool("cxx") { | 96 tool("cxx") { |
95 rspfile = "{{output}}.rsp" | 97 rspfile = "{{output}}.rsp" |
96 precompiled_header_type = "msvc" | 98 |
| 99 # TODO(brettw) enable this when GN support in the binary has been rolled. |
| 100 #precompiled_header_type = "msvc" |
97 | 101 |
98 # The PDB name needs to be different between C and C++ compiled files. | 102 # The PDB name needs to be different between C and C++ compiled files. |
99 pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb" | 103 pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb" |
100 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" | 104 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" |
101 depsformat = "msvc" | 105 depsformat = "msvc" |
102 description = "CXX {{output}}" | 106 description = "CXX {{output}}" |
103 outputs = [ | 107 outputs = [ |
104 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", | 108 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
105 ] | 109 ] |
106 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" | 110 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 } | 244 } |
241 msvc_toolchain("clang_x64") { | 245 msvc_toolchain("clang_x64") { |
242 environment = "environment.x64" | 246 environment = "environment.x64" |
243 current_cpu = "x64" | 247 current_cpu = "x64" |
244 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 248 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
245 root_build_dir) | 249 root_build_dir) |
246 cl = "${goma_prefix}$prefix/clang-cl.exe" | 250 cl = "${goma_prefix}$prefix/clang-cl.exe" |
247 is_clang = true | 251 is_clang = true |
248 } | 252 } |
249 } | 253 } |
OLD | NEW |