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

Unified Diff: build/config/compiler/BUILD.gn

Issue 2202873002: Rework approach to allowing extra flags for CrOS builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add_cros_nacl_bootstrap_args
Patch Set: 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
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 79c79a42d21ad8fdb6f807ab5ae6990280b20693..d3b63e5c4505fceca9b645a58b5049b06aa9d3a7 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1577,3 +1577,18 @@ if (is_ios || is_mac) {
cflags_objcc = common_flags
}
}
+
+#
+# Extra flags
+#
+# This is a placeholder config so that users with custom toolchains
+# can more easily set extra flags to be passed to each target, while
+# still allowing for those flags to be turned off on a per-target basis.
+# We generally do not want people to specify extra flags, so for now
+# this hook is only exposed to the CrOS build.
+
+config("extra_flags") {
+ if (default_toolchain == "//build/config/cros:target") {
+ configs = [ "//build/toolchain/cros:extra_flags" ]
+ }
Dirk Pranke 2016/08/02 00:28:10 Perhaps instead of hardcoding the toolchain and co
brettw 2016/08/03 23:02:14 Can this just be: if (target_os == "chromeos") ?
Dirk Pranke 2016/08/03 23:09:07 No, because that would break the "desktop chromeos
brettw 2016/08/08 22:10:56 Ah, then can you add an explicit comment explainin
+}

Powered by Google App Engine
This is Rietveld 408576698