[PATCH] D86007: [gn build] Add support for expensive checks
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 12:33:10 PDT 2020
aeubanks updated this revision to Diff 286108.
aeubanks added a comment.
Pipe through LLVM_ENABLE_EXPENSIVE_CHECKS_PYBOOL as well
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D86007/new/
https://reviews.llvm.org/D86007
Files:
llvm/utils/gn/build/BUILD.gn
llvm/utils/gn/build/buildflags.gni
llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
Index: llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
+++ llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
@@ -1,6 +1,7 @@
import("//compiler-rt/target.gni")
import("//compiler-rt/test/test.gni")
import("//llvm/triples.gni")
+import("//llvm/utils/gn/build/buildflags.gni")
import("//llvm/utils/gn/build/libs/zlib/enable.gni")
import("//llvm/utils/gn/build/toolchain/compiler.gni")
import("//llvm/utils/gn/build/write_cmake_config.gni")
@@ -51,12 +52,17 @@
"SANITIZER_CAN_USE_CXXABI_PYBOOL=True",
"COMPILER_RT_HAS_LLD_PYBOOL=True",
"COMPILER_RT_HAS_GWP_ASAN_PYBOOL=False",
- "LLVM_ENABLE_EXPENSIVE_CHECKS_PYBOOL=False",
"HAVE_RPC_XDR_H=0",
"ANDROID_NDK_VERSION=19",
"ANDROID_SERIAL_FOR_TESTING=$android_serial_for_testing",
]
+ if (llvm_enable_expensive_checks) {
+ values += [ "LLVM_ENABLE_EXPENSIVE_CHECKS_PYBOOL=True" ]
+ } else {
+ values += [ "LLVM_ENABLE_EXPENSIVE_CHECKS_PYBOOL=False" ]
+ }
+
if (host_cpu == "x64") {
values += [ "HOST_ARCH=x86_64" ]
} else {
Index: llvm/utils/gn/build/buildflags.gni
===================================================================
--- llvm/utils/gn/build/buildflags.gni
+++ llvm/utils/gn/build/buildflags.gni
@@ -10,4 +10,7 @@
# Whether to enable assertions.
llvm_enable_assertions = true
+
+ # Whether to enable expensive checks.
+ llvm_enable_expensive_checks = false
}
Index: llvm/utils/gn/build/BUILD.gn
===================================================================
--- llvm/utils/gn/build/BUILD.gn
+++ llvm/utils/gn/build/BUILD.gn
@@ -34,6 +34,10 @@
defines += [ "NDEBUG" ]
}
+ if (llvm_enable_expensive_checks) {
+ defines += [ "EXPENSIVE_CHECKS" ]
+ }
+
asmflags = target_flags
cflags = target_flags
ldflags = target_flags + target_ldflags
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86007.286108.patch
Type: text/x-patch
Size: 1923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200817/ebbc9313/attachment.bin>
More information about the llvm-commits
mailing list