| Index: build/toolchain/cros/BUILD.gn
|
| diff --git a/build/toolchain/cros/BUILD.gn b/build/toolchain/cros/BUILD.gn
|
| index 56a408bfd35e1d790b8ac14b736eac7fb43849bf..bf139dc12da8192f02bd1e7c83e18c3a77f795a5 100644
|
| --- a/build/toolchain/cros/BUILD.gn
|
| +++ b/build/toolchain/cros/BUILD.gn
|
| @@ -7,58 +7,65 @@ import("//build/config/sysroot.gni")
|
| import("//build/toolchain/gcc_toolchain.gni")
|
| import("//build/toolchain/cros_toolchain.gni")
|
|
|
| -template("cros_target_toolchain") {
|
| - gcc_toolchain(target_name) {
|
| - assert(defined(invoker.toolchain_args))
|
| -
|
| - # These are args for the template.
|
| - ar = cros_target_ar
|
| - cc = cros_target_cc
|
| - cxx = cros_target_cxx
|
| - ld = cxx
|
| - if (cros_target_ld != "") {
|
| - ld = cros_target_ld
|
| - }
|
| - if (cros_target_nm != "") {
|
| - nm = cros_target_nm
|
| - }
|
| - if (cros_target_readelf != "") {
|
| - readelf = cros_target_readelf
|
| - }
|
| - extra_cflags = cros_target_extra_cflags
|
| - extra_cppflags = cros_target_extra_cppflags
|
| - extra_cxxflags = cros_target_extra_cxxflags
|
| - extra_ldflags = cros_target_extra_ldflags
|
| -
|
| - toolchain_args = {
|
| - forward_variables_from(invoker.toolchain_args, "*")
|
| -
|
| - cc_wrapper = ""
|
| -
|
| - # This will override the default computation for is_clang in the
|
| - # secondary toolchain with the value of is_clang in the current toolchain
|
| - # (the current toolchain will always be the default toolchain here).
|
| - is_clang = is_clang
|
| - current_cpu = target_cpu
|
| - current_os = "chromeos"
|
| - use_debug_fission = use_debug_fission
|
| - use_sysroot = use_sysroot
|
| - }
|
| +# This is the normal toolchain for most targets.
|
| +gcc_toolchain("target") {
|
| + ar = cros_target_ar
|
| + cc = cros_target_cc
|
| + cxx = cros_target_cxx
|
| + ld = cxx
|
| + if (cros_target_ld != "") {
|
| + ld = cros_target_ld
|
| }
|
| -}
|
| + if (cros_target_nm != "") {
|
| + nm = cros_target_nm
|
| + }
|
| + if (cros_target_readelf != "") {
|
| + readelf = cros_target_readelf
|
| + }
|
| + extra_cflags = cros_target_extra_cflags
|
| + extra_cppflags = cros_target_extra_cppflags
|
| + extra_cxxflags = cros_target_extra_cxxflags
|
| + extra_ldflags = cros_target_extra_ldflags
|
|
|
| -# This is the normal toolchain for most targets.
|
| -cros_target_toolchain("target") {
|
| toolchain_args = {
|
| + cc_wrapper = ""
|
| + current_cpu = target_cpu
|
| + current_os = "chromeos"
|
| + is_clang = is_clang
|
| + use_debug_fission = use_debug_fission
|
| + use_gold = use_gold
|
| + use_sysroot = use_sysroot
|
| }
|
| }
|
|
|
| # This is a special toolchain needed just for the nacl_bootstrap target in
|
| # //native_client/src/trusted/service_runtime/linux. It is identical
|
| # to ":target" except that it forces use_debug_fission, use_gold, and
|
| -# use_sysroot off.
|
| -cros_target_toolchain("nacl_bootstrap") {
|
| +# use_sysroot off, and allows the user to set different sets of extra flags.
|
| +gcc_toolchain("nacl_bootstrap") {
|
| + ar = cros_target_ar
|
| + cc = cros_target_cc
|
| + cxx = cros_target_cxx
|
| + ld = cxx
|
| + if (cros_target_ld != "") {
|
| + ld = cros_target_ld
|
| + }
|
| + if (cros_target_nm != "") {
|
| + nm = cros_target_nm
|
| + }
|
| + if (cros_target_readelf != "") {
|
| + readelf = cros_target_readelf
|
| + }
|
| + extra_cflags = cros_nacl_bootstrap_extra_cflags
|
| + extra_cppflags = cros_nacl_bootstrap_extra_cppflags
|
| + extra_cxxflags = cros_nacl_bootstrap_extra_cxxflags
|
| + extra_ldflags = cros_nacl_bootstrap_extra_ldflags
|
| +
|
| toolchain_args = {
|
| + cc_wrapper = ""
|
| + current_cpu = target_cpu
|
| + current_os = "chromeos"
|
| + is_clang = is_clang
|
| use_debug_fission = false
|
| use_gold = false
|
| use_sysroot = false
|
|
|