[PATCH] D134332: [gn build] Don't set LLVM_UNREACHABLE_OPTIMIZE when llvm_enable_assertions
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 20:40:02 PDT 2022
aeubanks created this revision.
aeubanks added a reviewer: thakis.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
llvm_unreachable should properly error out if assertions are enabled.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D134332
Files:
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
Index: llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -329,7 +329,6 @@
"LLVM_HAVE_TFLITE=",
"LLVM_HOST_TRIPLE=$llvm_current_triple",
"LLVM_NATIVE_ARCH=$native_target",
- "LLVM_UNREACHABLE_OPTIMIZE=1",
"LLVM_USE_INTEL_JITEVENTS=",
"LLVM_USE_OPROFILE=",
"LLVM_USE_PERF=",
@@ -340,6 +339,12 @@
"PACKAGE_VERSION=${llvm_version}git",
]
+ if (llvm_enable_assertions) {
+ values += [ "LLVM_UNREACHABLE_OPTIMIZE=" ]
+ } else {
+ values += [ "LLVM_UNREACHABLE_OPTIMIZE=1" ]
+ }
+
if (llvm_build_native) {
values += [
"LLVM_NATIVE_ASMPARSER=1",
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134332.461783.patch
Type: text/x-patch
Size: 808 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220921/ca1a403c/attachment.bin>
More information about the llvm-commits
mailing list