| commit b8e71766c835603b6353827dc54939e1740f4867 |
| Author: Arthur Eubanks <aeubanks@google.com> |
| Date: Mon Oct 10 15:18:43 2022 -0700 |
| |
| Revert "[gn build] Don't set LLVM_UNREACHABLE_OPTIMIZE when llvm_enable_assertions" |
| |
| This reverts commit 0f19c603423e28ab663c1fdff2048c555abe5f6d. |
| |
| This didn't actually do anything. llvm_unreachable() under `#ifndef NDEBUG` is always supposed to report an error regardless of LLVM_UNREACHABLE_OPTIMIZE. I can't reproduce the issue I was originally seeing with this reverted, not sure what was happening back then, manually verified by messing around with various binaries/configurations. |
| |
| 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 aa226ddfe452..1041c89cddda 100644 |
| --- a/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn |
| +++ b/llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn |
| @@ -330,6 +330,7 @@ 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,12 +341,6 @@ 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", |