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/win/visual_studio_version.gni") | 6 import("//build/config/win/visual_studio_version.gni") |
6 import("//build/toolchain/goma.gni") | 7 import("//build/toolchain/goma.gni") |
7 import("//build/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
8 | 9 |
9 # Should only be running on Windows. | 10 # Should only be running on Windows. |
10 assert(is_win) | 11 assert(is_win) |
11 | 12 |
12 # Setup the Visual Studio state. | 13 # Setup the Visual Studio state. |
13 # | 14 # |
14 # Its arguments are the VS path and the compiler wrapper tool. It will write | 15 # Its arguments are the VS path and the compiler wrapper tool. It will write |
15 # "environment.x86" and "environment.x64" to the build directory and return a | 16 # "environment.x86" and "environment.x64" to the build directory and return a |
16 # list to us. | 17 # list to us. |
17 gyp_win_tool_path = | 18 gyp_win_tool_path = |
18 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir) | 19 rebase_path("//tools/gyp/pylib/gyp/win_tool.py", root_build_dir) |
19 | 20 |
20 if (use_goma) { | 21 if (use_goma) { |
21 goma_prefix = "$goma_dir/gomacc.exe " | 22 goma_prefix = "$goma_dir/gomacc.exe " |
22 } else { | 23 } else { |
23 goma_prefix = "" | 24 goma_prefix = "" |
24 } | 25 } |
25 | 26 |
26 # This value will be inherited in the toolchain below. | 27 # This value will be inherited in the toolchain below. |
27 concurrent_links = exec_script("../get_concurrent_links.py", [], "value") | 28 if (is_cfi) { |
| 29 concurrent_links = |
| 30 exec_script("../get_concurrent_links.py", [ "--lto" ], "value") |
| 31 } else { |
| 32 concurrent_links = exec_script("../get_concurrent_links.py", [], "value") |
| 33 } |
28 | 34 |
29 # Copy the VS runtime DLL for the default toolchain to the root build directory | 35 # Copy the VS runtime DLL for the default toolchain to the root build directory |
30 # so things will run. | 36 # so things will run. |
31 if (current_toolchain == default_toolchain) { | 37 if (current_toolchain == default_toolchain) { |
32 if (is_debug) { | 38 if (is_debug) { |
33 configuration_name = "Debug" | 39 configuration_name = "Debug" |
34 } else { | 40 } else { |
35 configuration_name = "Release" | 41 configuration_name = "Release" |
36 } | 42 } |
37 exec_script("../../vs_toolchain.py", | 43 exec_script("../../vs_toolchain.py", |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 | 311 |
306 msvc_toolchain("winrt_x64") { | 312 msvc_toolchain("winrt_x64") { |
307 environment = "environment.winrt_x64" | 313 environment = "environment.winrt_x64" |
308 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" | 314 cl = "${goma_prefix}\"${vc_bin_dir}/cl.exe\"" |
309 is_clang = false | 315 is_clang = false |
310 | 316 |
311 current_cpu = "x64" | 317 current_cpu = "x64" |
312 current_os = current_os | 318 current_os = current_os |
313 } | 319 } |
314 } | 320 } |
OLD | NEW |