[llvm] edddf38 - [gn build] (manually) port 83a798d4b0e1 (abi_breaking_checks in tests)
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 6 05:31:37 PDT 2022
Author: Nico Weber
Date: 2022-04-06T08:31:20-04:00
New Revision: edddf384c22b039df8d3a31bbc86f9eb4945a65d
URL: https://github.com/llvm/llvm-project/commit/edddf384c22b039df8d3a31bbc86f9eb4945a65d
DIFF: https://github.com/llvm/llvm-project/commit/edddf384c22b039df8d3a31bbc86f9eb4945a65d.diff
LOG: [gn build] (manually) port 83a798d4b0e1 (abi_breaking_checks in tests)
Added:
Modified:
llvm/utils/gn/build/buildflags.gni
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
llvm/utils/gn/secondary/llvm/test/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/build/buildflags.gni b/llvm/utils/gn/build/buildflags.gni
index e6d7ca1806a9f..3dbff36822ec4 100644
--- a/llvm/utils/gn/build/buildflags.gni
+++ b/llvm/utils/gn/build/buildflags.gni
@@ -29,6 +29,9 @@ declare_args() {
# Whether to build with optimizations.
is_optimized = !is_debug
+ # Enable additional checks that alter the LLVM C++ ABI.
+ llvm_enable_abi_breaking_checks = llvm_enable_assertions
+
# Debug info symbol level.
if (is_debug) {
symbol_level = 2
diff --git a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
index 4cab34f84e10b..67ce75cc2c6b3 100644
--- a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -42,9 +42,6 @@ import("//llvm/version.gni")
# become declare_args if anyone wants to set them.
declare_args() {
- # Enable additional checks that alter the LLVM C++ ABI.
- llvm_enable_abi_breaking_checks = llvm_enable_assertions
-
# Iterate unordered llvm containers in reverse.
llvm_enable_reverse_iteration = false
diff --git a/llvm/utils/gn/secondary/llvm/test/BUILD.gn b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
index 56c81f49bf6b6..37399c7fd4485 100644
--- a/llvm/utils/gn/secondary/llvm/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/test/BUILD.gn
@@ -197,6 +197,12 @@ write_lit_config("lit_site_cfg") {
extra_values += [ "LLVM_ENABLE_EXPENSIVE_CHECKS=0" ] # Must be 0.
}
+ if (llvm_enable_abi_breaking_checks) {
+ extra_values += [ "LLVM_ENABLE_ABI_BREAKING_CHECKS=1" ]
+ } else {
+ extra_values += [ "LLVM_ENABLE_ABI_BREAKING_CHECKS=0" ] # Must be 0.
+ }
+
if (llvm_enable_threads) {
extra_values += [ "LLVM_ENABLE_THREADS=1" ]
} else {
More information about the llvm-commits
mailing list