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

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: fix typos, type checking Created 4 years, 4 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 | « build/config/BUILDCONFIG.gn ('k') | build/config/cros/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 79723f6cc76c041697955f5c7de91e2935e78aa5..5f0c44215b9f0d2589e43b161e2b699a72e72fe4 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1575,3 +1575,21 @@ 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.
+
+config("extra_flags") {
+ # We generally do not want people to specify extra flags, so for now
+ # this hook is only exposed to the actual CrOS builds (the simplechrome
+ # and ebuild builds, not the "desktop chromeos" build). We do that
+ # by checking for the custom_toolchain specifically, rather than
+ # just checking if `target_os == "chromeos"`.
+ if (default_toolchain == "//build/toolchain/cros:target") {
+ configs = [ "//build/config/cros:extra_flags" ]
+ }
+}
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | build/config/cros/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698