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 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 tool("cc") { | 81 tool("cc") { |
82 rspfile = "{{output}}.rsp" | 82 rspfile = "{{output}}.rsp" |
83 | 83 |
84 # TODO(brettw) enable this when GN support in the binary has been rolled. | 84 # TODO(brettw) enable this when GN support in the binary has been rolled. |
85 #precompiled_header_type = "msvc" | 85 #precompiled_header_type = "msvc" |
86 pdbname = "{{target_out_dir}}/{{target_output_name}}_c.pdb" | 86 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" | 87 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" |
88 depsformat = "msvc" | 88 depsformat = "msvc" |
89 description = "CC {{output}}" | 89 description = "CC {{output}}" |
90 outputs = [ | 90 outputs = [ |
91 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", | 91 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
92 ] | 92 ] |
93 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" | 93 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_c}}" |
94 } | 94 } |
95 | 95 |
96 tool("cxx") { | 96 tool("cxx") { |
97 rspfile = "{{output}}.rsp" | 97 rspfile = "{{output}}.rsp" |
98 | 98 |
99 # TODO(brettw) enable this when GN support in the binary has been rolled. | 99 # TODO(brettw) enable this when GN support in the binary has been rolled. |
100 #precompiled_header_type = "msvc" | 100 #precompiled_header_type = "msvc" |
101 | 101 |
102 # 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. |
103 pdbname = "{{target_out_dir}}/{{target_output_name}}_cc.pdb" | 103 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" | 104 command = "ninja -t msvc -e $env -- $cl /nologo /showIncludes /FC @$rspfil
e /c {{source}} /Fo{{output}} /Fd$pdbname" |
105 depsformat = "msvc" | 105 depsformat = "msvc" |
106 description = "CXX {{output}}" | 106 description = "CXX {{output}}" |
107 outputs = [ | 107 outputs = [ |
108 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", | 108 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
109 ] | 109 ] |
110 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" | 110 rspfile_content = "{{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}}" |
111 } | 111 } |
112 | 112 |
113 tool("rc") { | 113 tool("rc") { |
114 command = "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{
include_dirs}} /fo{{output}} {{source}}" | 114 command = "$python_path gyp-win-tool rc-wrapper $env rc.exe {{defines}} {{
include_dirs}} /fo{{output}} {{source}}" |
115 outputs = [ | 115 outputs = [ |
116 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.res", | 116 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.res", |
117 ] | 117 ] |
118 description = "RC {{output}}" | 118 description = "RC {{output}}" |
119 } | 119 } |
120 | 120 |
121 tool("asm") { | 121 tool("asm") { |
122 # TODO(brettw): "/safeseh" assembler argument is hardcoded here. Extract | 122 # TODO(brettw): "/safeseh" assembler argument is hardcoded here. Extract |
123 # assembler flags to a variable like cflags. crbug.com/418613 | 123 # assembler flags to a variable like cflags. crbug.com/418613 |
124 command = "$python_path gyp-win-tool asm-wrapper $env ml.exe {{defines}} {
{include_dirs}} /safeseh /c /Fo {{output}} {{source}}" | 124 command = "$python_path gyp-win-tool asm-wrapper $env ml.exe {{defines}} {
{include_dirs}} /safeseh /c /Fo {{output}} {{source}}" |
125 description = "ASM {{output}}" | 125 description = "ASM {{output}}" |
126 outputs = [ | 126 outputs = [ |
127 "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.obj", | 127 "{{target_out_dir}}/{{target_output_name}}/{{source_name_part}}.obj", |
128 ] | 128 ] |
129 } | 129 } |
130 | 130 |
131 tool("alink") { | 131 tool("alink") { |
132 rspfile = "{{output}}.rsp" | 132 rspfile = "{{output}}.rsp" |
133 command = "$python_path gyp-win-tool link-wrapper $env False lib.exe /nolo
go /ignore:4221 /OUT:{{output}} @$rspfile" | 133 command = "$python_path gyp-win-tool link-wrapper $env False lib.exe /nolo
go /ignore:4221 /OUT:{{output}} @$rspfile" |
134 description = "LIB {{output}}" | 134 description = "LIB {{output}}" |
135 outputs = [ | 135 outputs = [ |
136 # Ignore {{output_extension}} and always use .lib, there's no reason to | 136 # Ignore {{output_extension}} and always use .lib, there's no reason to |
137 # allow targets to override this extension on Windows. | 137 # allow targets to override this extension on Windows. |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
244 } | 244 } |
245 msvc_toolchain("clang_x64") { | 245 msvc_toolchain("clang_x64") { |
246 environment = "environment.x64" | 246 environment = "environment.x64" |
247 current_cpu = "x64" | 247 current_cpu = "x64" |
248 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 248 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
249 root_build_dir) | 249 root_build_dir) |
250 cl = "${goma_prefix}$prefix/clang-cl.exe" | 250 cl = "${goma_prefix}$prefix/clang-cl.exe" |
251 is_clang = true | 251 is_clang = true |
252 } | 252 } |
253 } | 253 } |
OLD | NEW |