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 | 83 precompiled_header_type = "msvc" |
84 # TODO(brettw) enable this when GN support in the binary has been rolled. | |
85 #precompiled_header_type = "msvc" | |
86 pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb" | 84 pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb" |
87 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" | 85 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" |
88 depsformat = "msvc" | 86 depsformat = "msvc" |
89 description = "CC {{output}}" | 87 description = "CC {{output}}" |
90 outputs = [ | 88 outputs = [ |
91 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", | 89 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
92 ] | 90 ] |
93 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" | 91 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" |
94 } | 92 } |
95 | 93 |
96 tool("cxx") { | 94 tool("cxx") { |
97 rspfile = "{{output}}.rsp" | 95 rspfile = "{{output}}.rsp" |
98 | 96 precompiled_header_type = "msvc" |
99 # TODO(brettw) enable this when GN support in the binary has been rolled. | |
100 #precompiled_header_type = "msvc" | |
101 | 97 |
102 # The PDB name needs to be different between C and C++ compiled files. | 98 # The PDB name needs to be different between C and C++ compiled files. |
103 pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb" | 99 pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb" |
104 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" | 100 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" |
105 depsformat = "msvc" | 101 depsformat = "msvc" |
106 description = "CXX {{output}}" | 102 description = "CXX {{output}}" |
107 outputs = [ | 103 outputs = [ |
108 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", | 104 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
109 ] | 105 ] |
110 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" | 106 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 240 } |
245 msvc_toolchain("clang_x64") { | 241 msvc_toolchain("clang_x64") { |
246 environment = "environment.x64" | 242 environment = "environment.x64" |
247 current_cpu = "x64" | 243 current_cpu = "x64" |
248 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 244 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
249 root_build_dir) | 245 root_build_dir) |
250 cl = "${goma_prefix}$prefix/clang-cl.exe" | 246 cl = "${goma_prefix}$prefix/clang-cl.exe" |
251 is_clang = true | 247 is_clang = true |
252 } | 248 } |
253 } | 249 } |
OLD | NEW |