[llvm] 0f19c60 - [gn build] Don't set LLVM_UNREACHABLE_OPTIMIZE when llvm_enable_assertions
Arthur Eubanks via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 21 10:35:33 PDT 2022
Author: Arthur Eubanks
Date: 2022-09-21T10:34:48-07:00
New Revision: 0f19c603423e28ab663c1fdff2048c555abe5f6d
URL: https://github.com/llvm/llvm-project/commit/0f19c603423e28ab663c1fdff2048c555abe5f6d
DIFF: https://github.com/llvm/llvm-project/commit/0f19c603423e28ab663c1fdff2048c555abe5f6d.diff
LOG: [gn build] Don't set LLVM_UNREACHABLE_OPTIMIZE when llvm_enable_assertions
llvm_unreachable should properly error out if assertions are enabled.
Reviewed By: thakis
Differential Revision: https://reviews.llvm.org/D134332
Added:
Modified:
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
Removed:
################################################################################
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 aa127efe22d40..7d6eebb26a18e 100644
--- a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
@@ -329,7 +329,6 @@ write_cmake_config("llvm-config") {
"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 @@ write_cmake_config("llvm-config") {
"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",
More information about the llvm-commits
mailing list