| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 if (defined(invoker.is_clang)) { | 228 if (defined(invoker.is_clang)) { |
| 229 is_clang = invoker.is_clang | 229 is_clang = invoker.is_clang |
| 230 } | 230 } |
| 231 | 231 |
| 232 # This value needs to be passed through unchanged. | 232 # This value needs to be passed through unchanged. |
| 233 host_toolchain = host_toolchain | 233 host_toolchain = host_toolchain |
| 234 } | 234 } |
| 235 } | 235 } |
| 236 } | 236 } |
| 237 | 237 |
| 238 if (host_os == "win") { |
| 239 clang_cl = "clang-cl.exe" |
| 240 } else { |
| 241 clang_cl = "clang-cl" |
| 242 } |
| 243 |
| 238 # 32-bit toolchains. Only define these when the target architecture is 32-bit | 244 # 32-bit toolchains. Only define these when the target architecture is 32-bit |
| 239 # since we don't do any 32-bit cross compiles when targeting 64-bit (the | 245 # since we don't do any 32-bit cross compiles when targeting 64-bit (the |
| 240 # build does generate some 64-bit stuff from 32-bit target builds). | 246 # build does generate some 64-bit stuff from 32-bit target builds). |
| 241 if (target_cpu == "x86") { | 247 if (target_cpu == "x86") { |
| 242 x86_toolchain_data = exec_script("setup_toolchain.py", | 248 x86_toolchain_data = exec_script("setup_toolchain.py", |
| 243 [ | 249 [ |
| 244 visual_studio_path, | 250 visual_studio_path, |
| 245 gyp_win_tool_path, | 251 gyp_win_tool_path, |
| 246 windows_sdk_path, | 252 windows_sdk_path, |
| 247 visual_studio_runtime_dirs, | 253 visual_studio_runtime_dirs, |
| 248 "x86", | 254 "x86", |
| 249 ], | 255 ], |
| 250 "scope") | 256 "scope") |
| 251 | 257 |
| 252 msvc_toolchain("x86") { | 258 msvc_toolchain("x86") { |
| 253 environment = "environment.x86" | 259 environment = "environment.x86" |
| 254 toolchain_cpu = "x86" | 260 toolchain_cpu = "x86" |
| 255 cl = "${goma_prefix}\"${x86_toolchain_data.vc_bin_dir}/cl.exe\"" | 261 cl = "${goma_prefix}\"${x86_toolchain_data.vc_bin_dir}/cl.exe\"" |
| 256 is_clang = false | 262 is_clang = false |
| 257 } | 263 } |
| 258 | 264 |
| 259 msvc_toolchain("clang_x86") { | 265 msvc_toolchain("clang_x86") { |
| 260 environment = "environment.x86" | 266 environment = "environment.x86" |
| 261 toolchain_cpu = "x86" | 267 toolchain_cpu = "x86" |
| 262 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 268 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| 263 root_build_dir) | 269 root_build_dir) |
| 264 cl = "${goma_prefix}$prefix/clang-cl.exe" | 270 cl = "${goma_prefix}$prefix/${clang_cl}" |
| 265 toolchain_os = "win" | 271 toolchain_os = "win" |
| 266 is_clang = true | 272 is_clang = true |
| 267 } | 273 } |
| 268 } | 274 } |
| 269 | 275 |
| 270 # 64-bit toolchains. | 276 # 64-bit toolchains. |
| 271 x64_toolchain_data = exec_script("setup_toolchain.py", | 277 x64_toolchain_data = exec_script("setup_toolchain.py", |
| 272 [ | 278 [ |
| 273 visual_studio_path, | 279 visual_studio_path, |
| 274 gyp_win_tool_path, | 280 gyp_win_tool_path, |
| 275 windows_sdk_path, | 281 windows_sdk_path, |
| 276 visual_studio_runtime_dirs, | 282 visual_studio_runtime_dirs, |
| 277 "x64", | 283 "x64", |
| 278 ], | 284 ], |
| 279 "scope") | 285 "scope") |
| 280 | 286 |
| 281 msvc_toolchain("x64") { | 287 msvc_toolchain("x64") { |
| 282 environment = "environment.x64" | 288 environment = "environment.x64" |
| 283 toolchain_cpu = "x64" | 289 toolchain_cpu = "x64" |
| 284 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" | 290 cl = "${goma_prefix}\"${x64_toolchain_data.vc_bin_dir}/cl.exe\"" |
| 285 is_clang = false | 291 is_clang = false |
| 286 } | 292 } |
| 287 | 293 |
| 288 msvc_toolchain("clang_x64") { | 294 msvc_toolchain("clang_x64") { |
| 289 environment = "environment.x64" | 295 environment = "environment.x64" |
| 290 toolchain_cpu = "x64" | 296 toolchain_cpu = "x64" |
| 291 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", | 297 prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", |
| 292 root_build_dir) | 298 root_build_dir) |
| 293 cl = "${goma_prefix}$prefix/clang-cl.exe" | 299 cl = "${goma_prefix}$prefix/${clang_cl}" |
| 294 toolchain_os = "win" | 300 toolchain_os = "win" |
| 295 is_clang = true | 301 is_clang = true |
| 296 } | 302 } |
| 297 | 303 |
| 298 # WinRT toolchains. Only define these when targeting them. | 304 # WinRT toolchains. Only define these when targeting them. |
| 299 # | 305 # |
| 300 # NOTE: This is currently broken because it references vc_bin_dir. brettw@ | 306 # NOTE: This is currently broken because it references vc_bin_dir. brettw@ |
| 301 # changed this around a bit, and I don't know what this should be set to | 307 # changed this around a bit, and I don't know what this should be set to |
| 302 # in terms of what setup_toolchain returns for a certain CPU architecture. | 308 # in terms of what setup_toolchain returns for a certain CPU architecture. |
| 303 if (target_os == "winrt_81" || target_os == "winrt_81_phone" || | 309 if (target_os == "winrt_81" || target_os == "winrt_81_phone" || |
| 304 target_os == "winrt_10") { | 310 target_os == "winrt_10") { |
| 305 msvc_toolchain("winrt_x86") { | 311 msvc_toolchain("winrt_x86") { |
| 306 environment = "environment.winrt_x86" | 312 environment = "environment.winrt_x86" |
| 307 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 313 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
| 308 is_clang = false | 314 is_clang = false |
| 309 | 315 |
| 310 toolchain_cpu = "x86" | 316 toolchain_cpu = "x86" |
| 311 toolchain_os = current_os | 317 toolchain_os = current_os |
| 312 } | 318 } |
| 313 | 319 |
| 314 msvc_toolchain("winrt_x64") { | 320 msvc_toolchain("winrt_x64") { |
| 315 environment = "environment.winrt_x64" | 321 environment = "environment.winrt_x64" |
| 316 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 322 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
| 317 is_clang = false | 323 is_clang = false |
| 318 | 324 |
| 319 toolchain_cpu = "x64" | 325 toolchain_cpu = "x64" |
| 320 toolchain_os = current_os | 326 toolchain_os = current_os |
| 321 } | 327 } |
| 322 } | 328 } |
| OLD | NEW |