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/nacl/config.gni") |
5 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
6 import("//build/toolchain/toolchain.gni") | 7 import("//build/toolchain/toolchain.gni") |
7 | 8 |
8 # This value will be inherited in the toolchain below. | 9 # This value will be inherited in the toolchain below. |
9 concurrent_links = exec_script("get_concurrent_links.py", [], "value") | 10 concurrent_links = exec_script("get_concurrent_links.py", [], "value") |
10 | 11 |
11 # This template defines a toolchain for something that works like gcc | 12 # This template defines a toolchain for something that works like gcc |
12 # (including clang). | 13 # (including clang). |
13 # | 14 # |
14 # It requires the following variables specifying the executables to run: | 15 # It requires the following variables specifying the executables to run: |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 # | 64 # |
64 # - clear_sanitizers | 65 # - clear_sanitizers |
65 # When set to true, is_asan, is_msan, etc.will all be set to false. Often | 66 # When set to true, is_asan, is_msan, etc.will all be set to false. Often |
66 # secondary toolchains do not want to run with sanitizers. | 67 # secondary toolchains do not want to run with sanitizers. |
67 # - is_clang | 68 # - is_clang |
68 # Whether to use clang instead of gcc. | 69 # Whether to use clang instead of gcc. |
69 # - is_component_build | 70 # - is_component_build |
70 # Whether to forcibly enable or disable component builds for this | 71 # Whether to forcibly enable or disable component builds for this |
71 # toolchain; if not specified, the toolchain will inherit the | 72 # toolchain; if not specified, the toolchain will inherit the |
72 # default setting. | 73 # default setting. |
| 74 # - is_nacl_glibc |
| 75 # Whether NaCl code is built using Glibc instead of Newlib. |
73 template("gcc_toolchain") { | 76 template("gcc_toolchain") { |
74 toolchain(target_name) { | 77 toolchain(target_name) { |
75 assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") | 78 assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") |
76 assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value") | 79 assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value") |
77 assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value") | 80 assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value") |
78 assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value") | 81 assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value") |
79 assert(defined(invoker.toolchain_cpu), | 82 assert(defined(invoker.toolchain_cpu), |
80 "gcc_toolchain() must specify a \"toolchain_cpu\"") | 83 "gcc_toolchain() must specify a \"toolchain_cpu\"") |
81 assert(defined(invoker.toolchain_os), | 84 assert(defined(invoker.toolchain_os), |
82 "gcc_toolchain() must specify a \"toolchain_os\"") | 85 "gcc_toolchain() must specify a \"toolchain_os\"") |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 current_os = invoker.toolchain_os | 316 current_os = invoker.toolchain_os |
314 | 317 |
315 # These values need to be passed through unchanged. | 318 # These values need to be passed through unchanged. |
316 target_os = target_os | 319 target_os = target_os |
317 target_cpu = target_cpu | 320 target_cpu = target_cpu |
318 | 321 |
319 forward_variables_from(invoker, | 322 forward_variables_from(invoker, |
320 [ | 323 [ |
321 "is_clang", | 324 "is_clang", |
322 "is_component_build", | 325 "is_component_build", |
| 326 "is_nacl_glibc", |
323 ]) | 327 ]) |
324 | 328 |
325 if (defined(invoker.clear_sanitizers) && invoker.clear_sanitizers) { | 329 if (defined(invoker.clear_sanitizers) && invoker.clear_sanitizers) { |
326 is_asan = false | 330 is_asan = false |
327 is_cfi = false | 331 is_cfi = false |
328 is_lsan = false | 332 is_lsan = false |
329 is_msan = false | 333 is_msan = false |
330 is_syzyasan = false | 334 is_syzyasan = false |
331 is_tsan = false | 335 is_tsan = false |
332 } | 336 } |
333 } | 337 } |
334 | 338 |
335 forward_variables_from(invoker, [ "deps" ]) | 339 forward_variables_from(invoker, [ "deps" ]) |
336 } | 340 } |
337 } | 341 } |
OLD | NEW |