diff options
author | Patrick McCormick <pat@lanl.gov> | 2023-04-26 13:49:58 -0600 |
---|---|---|
committer | Tarun Prabhu <tarun@lanl.gov> | 2023-04-26 14:08:20 -0600 |
commit | f7e58c91587be78e80abb7f650dcb5c0b4205730 (patch) | |
tree | 719ada6c5f0f6384424179c18ec4d6be6cdd46ce /flang/CMakeLists.txt | |
parent | 6b6bac2cd81df86354196304815b96c53bd93305 (diff) | |
download | llvm-f7e58c91587be78e80abb7f650dcb5c0b4205730.tar.gz |
[flang] Raise configure-time error when LLVM_ENABLE_EH is set
flang cannot be built with exceptions enabled. Doing so results in a link-time
error.
This addresses issue #59353 [https://github.com/llvm/llvm-project/issues/59353]
Differential Revision: https://reviews.llvm.org/D146173
Diffstat (limited to 'flang/CMakeLists.txt')
-rw-r--r-- | flang/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt index 9be6cd7eb1f5..ab254871fbb4 100644 --- a/flang/CMakeLists.txt +++ b/flang/CMakeLists.txt @@ -13,6 +13,14 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED TRUE) set(CMAKE_CXX_EXTENSIONS OFF) +if (LLVM_ENABLE_EH) + # To match with the flang guidelines we currently disable + # building with exception support in core LLVM. + message(FATAL_ERROR "Flang does not currently support building with \ + LLVM exceptions enabled. Please disable LLVM_ENABLE_EH when building \ + flang.") +endif() + set(FLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE) |