Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Unified Diff: build/toolchain/cros/BUILD.gn

Issue 2188633004: Add a way for CrOS toolchains to set custom flags for the nacl bootstrap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: refactor toolchain definitions Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/toolchain/cros_toolchain.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | build/toolchain/cros_toolchain.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698