| 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/clang/clang.gni") | 5 import("//build/config/clang/clang.gni") |
| 6 import("//build/config/nacl/config.gni") | 6 import("//build/config/nacl/config.gni") |
| 7 import("//build/config/sanitizers/sanitizers.gni") | 7 import("//build/config/sanitizers/sanitizers.gni") |
| 8 import("//build/toolchain/cc_wrapper.gni") | 8 import("//build/toolchain/cc_wrapper.gni") |
| 9 import("//build/toolchain/goma.gni") | 9 import("//build/toolchain/goma.gni") |
| 10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 # cc_wrapper = "" in it. | 92 # cc_wrapper = "" in it. |
| 93 # - use_debug_fission | 93 # - use_debug_fission |
| 94 # Override the global use_debug_fission setting, useful if the particular | 94 # Override the global use_debug_fission setting, useful if the particular |
| 95 # toolchain should not be generating split-dwarf code. | 95 # toolchain should not be generating split-dwarf code. |
| 96 # - use_goma | 96 # - use_goma |
| 97 # Override the global use_goma setting, useful to opt-out of goma in a | 97 # Override the global use_goma setting, useful to opt-out of goma in a |
| 98 # particular toolchain by setting use_gome = false in it. | 98 # particular toolchain by setting use_gome = false in it. |
| 99 # - use_gold | 99 # - use_gold |
| 100 # Override the global use_gold setting, useful if the particular | 100 # Override the global use_gold setting, useful if the particular |
| 101 # toolchain has a custom link step that is not actually using Gold. | 101 # toolchain has a custom link step that is not actually using Gold. |
| 102 # - v8_toolchain_cpu |
| 103 # If defined, set v8_current_cpu to this, else set v8_current_cpu |
| 104 # to current_cpu. |
| 102 template("gcc_toolchain") { | 105 template("gcc_toolchain") { |
| 103 toolchain(target_name) { | 106 toolchain(target_name) { |
| 104 assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value") | 107 assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value") |
| 105 assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") | 108 assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value") |
| 106 assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value") | 109 assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value") |
| 107 assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value") | 110 assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value") |
| 108 assert(defined(invoker.toolchain_cpu), | 111 assert(defined(invoker.toolchain_cpu), |
| 109 "gcc_toolchain() must specify a \"toolchain_cpu\"") | 112 "gcc_toolchain() must specify a \"toolchain_cpu\"") |
| 110 assert(defined(invoker.toolchain_os), | 113 assert(defined(invoker.toolchain_os), |
| 111 "gcc_toolchain() must specify a \"toolchain_os\"") | 114 "gcc_toolchain() must specify a \"toolchain_os\"") |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 458 } | 461 } |
| 459 if (defined(invoker.use_debug_fission)) { | 462 if (defined(invoker.use_debug_fission)) { |
| 460 use_debug_fission = invoker.use_debug_fission | 463 use_debug_fission = invoker.use_debug_fission |
| 461 } | 464 } |
| 462 if (defined(invoker.use_gold)) { | 465 if (defined(invoker.use_gold)) { |
| 463 use_gold = invoker.use_gold | 466 use_gold = invoker.use_gold |
| 464 } | 467 } |
| 465 if (defined(invoker.use_sysroot)) { | 468 if (defined(invoker.use_sysroot)) { |
| 466 use_sysroot = invoker.use_sysroot | 469 use_sysroot = invoker.use_sysroot |
| 467 } | 470 } |
| 471 if (defined(invoker.v8_toolchain_cpu)) { |
| 472 v8_current_cpu = invoker.v8_toolchain_cpu |
| 473 } else { |
| 474 v8_current_cpu = current_cpu |
| 475 } |
| 468 | 476 |
| 469 # Disable sanitizers for non-default toolchains. | 477 # Disable sanitizers for non-default toolchains. |
| 470 is_asan = false | 478 is_asan = false |
| 471 is_cfi = false | 479 is_cfi = false |
| 472 is_lsan = false | 480 is_lsan = false |
| 473 is_msan = false | 481 is_msan = false |
| 474 is_syzyasan = false | 482 is_syzyasan = false |
| 475 is_tsan = false | 483 is_tsan = false |
| 476 is_ubsan = false | 484 is_ubsan = false |
| 477 is_ubsan_null = false | 485 is_ubsan_null = false |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 cxx = "$prefix/clang++" | 524 cxx = "$prefix/clang++" |
| 517 ld = cxx | 525 ld = cxx |
| 518 is_clang = true | 526 is_clang = true |
| 519 | 527 |
| 520 readelf = "${toolprefix}readelf" | 528 readelf = "${toolprefix}readelf" |
| 521 ar = "${toolprefix}ar" | 529 ar = "${toolprefix}ar" |
| 522 nm = "${toolprefix}nm" | 530 nm = "${toolprefix}nm" |
| 523 | 531 |
| 524 forward_variables_from(invoker, | 532 forward_variables_from(invoker, |
| 525 [ | 533 [ |
| 534 "strip", |
| 526 "toolchain_cpu", | 535 "toolchain_cpu", |
| 527 "toolchain_os", | 536 "toolchain_os", |
| 528 "use_gold", | 537 "use_gold", |
| 529 "strip", | 538 "v8_toolchain_cpu", |
| 530 ]) | 539 ]) |
| 531 | 540 |
| 532 if (defined(invoker.use_debug_fission)) { | 541 if (defined(invoker.use_debug_fission)) { |
| 533 use_debug_fission = invoker.use_debug_fission | 542 use_debug_fission = invoker.use_debug_fission |
| 534 } | 543 } |
| 535 } | 544 } |
| 536 } | 545 } |
| OLD | NEW |