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