summaryrefslogtreecommitdiff
path: root/BUILD.gn
diff options
context:
space:
mode:
authorTomasz Śniatowski <tsniatowski@vewd.com>2019-06-24 17:52:19 +0000
committerCommit Bot <commit-bot@chromium.org>2019-06-24 17:52:19 +0000
commitabd51836c6dad6c460d236fff70f28cc578a1336 (patch)
tree469c7db2d5512b673db6531897f91cb048cc4dbc /BUILD.gn
parentdb18ea35620e772c9ab2593fb7f08f433c7275c0 (diff)
downloadzlib-abd51836c6dad6c460d236fff70f28cc578a1336.tar.gz
zlib: fix gn error when is_clang=false target_cpu="arm"
Check use_thin_lto instead of thin_lto_enable_optimizations, as the latter is only defined in a BUILD.gn so can't be checked outside of it. Plus the intent of https://crrev.com/c/1642730 appears to have been to error out on LTO in general anyway. Fixes gn gen --args="is_clang=false target_cpu=\"arm\"" failing with: ERROR at //third_party/zlib/BUILD.gn:105:17: Undefined identifier assert(!thin_lto_enable_optimizations, ^---------------------------- Bug: 819294 Change-Id: Ibbcae447b01043edc8a118f4a3a3923f2d0ae261 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1667663 Auto-Submit: Tomasz Śniatowski <tsniatowski@vewd.com> Commit-Queue: Adenilson Cavalcanti <cavalcantii@chromium.org> Reviewed-by: Adenilson Cavalcanti <cavalcantii@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#671713} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 28065982319c824cccff912f0ce561f60d054796
Diffstat (limited to 'BUILD.gn')
-rw-r--r--BUILD.gn4
1 files changed, 3 insertions, 1 deletions
diff --git a/BUILD.gn b/BUILD.gn
index 3b8e5e9..64a05d1 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/compiler/compiler.gni")
+
if (current_cpu == "arm" || current_cpu == "arm64") {
import("//build/config/arm.gni")
}
@@ -102,7 +104,7 @@ if (use_arm_neon_optimizations) {
assert(false, "CPU detection requires the Android NDK")
}
} else if (!is_win && !is_clang) {
- assert(!thin_lto_enable_optimizations,
+ assert(!use_thin_lto,
"ThinLTO fails mixing different module-level targets")
cflags_c = [ "-march=armv8-a+crc" ]
}