| 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" ]
|
| + }
|
| +}
|
|
|