Index: build/toolchain/cros/BUILD.gn |
diff --git a/build/toolchain/cros/BUILD.gn b/build/toolchain/cros/BUILD.gn |
index 9056f90f14e7f0e0bc024518992e43c0085253a9..4876eb2f857b273a0b84fd333fa4905bbeb8c12b 100644 |
--- a/build/toolchain/cros/BUILD.gn |
+++ b/build/toolchain/cros/BUILD.gn |
@@ -14,58 +14,64 @@ clang_toolchain("clang_target") { |
toolchain_os = "linux" |
} |
-template("cros_target_toolchain") { |
- if (defined(invoker.use_debug_fission)) { |
- use_debug_fission = invoker.use_debug_fission |
- } |
- if (defined(invoker.use_gold)) { |
- use_gold = invoker.use_gold |
+# 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 (defined(invoker.use_sysroot)) { |
- use_sysroot = invoker.use_sysroot |
+ if (cros_target_nm != "") { |
+ nm = cros_target_nm |
} |
- |
- gcc_toolchain(target_name) { |
- # 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 |
- |
- # These are passed through as toolchain_args. |
- cc_wrapper = "" |
- is_clang = is_clang |
- toolchain_cpu = target_cpu |
- toolchain_os = "chromeos" |
- |
- use_debug_fission = use_debug_fission |
- use_gold = use_gold |
- use_sysroot = use_sysroot |
+ 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") { |
+ # These are passed through as toolchain_args. |
+ cc_wrapper = "" |
+ is_clang = is_clang |
+ toolchain_cpu = target_cpu |
+ toolchain_os = "chromeos" |
+ 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") { |
+gcc_toolchain("nacl_bootstrap") { |
llozano1
2016/07/28 17:20:56
why the name change? does this mean this will not
Dirk Pranke
2016/07/28 17:23:53
No, it's fine. All I did was get rid of the templa
Dirk Pranke
2016/08/01 20:53:09
Actually, the clang_toolchain() template does two
|
+ 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 |
+ |
+ # These are passed through as toolchain_args. |
+ cc_wrapper = "" |
+ is_clang = is_clang |
+ toolchain_cpu = target_cpu |
+ toolchain_os = "chromeos" |
use_debug_fission = false |
use_gold = false |
use_sysroot = false |