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

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

Issue 2845943005: Avoid importing nacl config for non-NaCl toolchains. (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | 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 c2f9aff2757a915d06b56aa04890bbb7d944a2fd..5ea23c5ef3e1e05ceda1aea8df2c1505c23e4853 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -6,7 +6,6 @@ import("//build/config/android/config.gni")
import("//build/config/chrome_build.gni")
import("//build/config/chromecast_build.gni")
import("//build/config/compiler/compiler.gni")
-import("//build/config/nacl/config.gni")
import("//build/toolchain/cc_wrapper.gni")
import("//build/toolchain/toolchain.gni")
import("//build_overrides/build.gni")
@@ -23,6 +22,12 @@ if (is_mac) {
if (is_ios) {
import("//build/config/ios/ios_sdk.gni")
}
+if (is_nacl) {
+ # To keep NaCl variables out of builds that don't include NaCl, all
+ # variables defined in nacl/config.gni referenced here should be protected by
+ # is_nacl conditions.
+ import("//build/config/nacl/config.gni")
+}
declare_args() {
# Default to warnings as errors for default workflow, where we catch
@@ -1494,7 +1499,7 @@ config("no_optimize") {
# optimization and link-time code generation which is very expensive and should
# be used sparingly.
config("optimize_max") {
- if (is_nacl_irt) {
+ if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# Various components do:
# if (!is_debug) {
@@ -1541,7 +1546,7 @@ config("optimize_max") {
# TODO(crbug.com/621335) - rework how all of these configs are related
# so that we don't need this disclaimer.
config("optimize_speed") {
- if (is_nacl_irt) {
+ if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# Various components do:
# if (!is_debug) {
@@ -1587,7 +1592,7 @@ config("optimize_fuzzing") {
# The default optimization applied to all targets. This will be equivalent to
# either "optimize" or "no_optimize", depending on the build flags.
config("default_optimization") {
- if (is_nacl_irt) {
+ if (is_nacl && is_nacl_irt) {
# The NaCl IRT is a special case and always wants its own config.
# It gets optimized the same way regardless of the type of build.
configs = [ "//build/config/nacl:irt_optimize" ]
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698