Skip to content

Commit

Permalink
[flang] Raise configure-time error when LLVM_ENABLE_EH is set
Browse files Browse the repository at this point in the history
flang cannot be built with exceptions enabled. Doing so results in a link-time
error.

This addresses issue #59353 [#59353]

Differential Revision: https://reviews.llvm.org/D146173
  • Loading branch information
pmccormick authored and tarunprabhu committed Apr 26, 2023
1 parent 6b6bac2 commit f7e58c9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions flang/CMakeLists.txt
Expand Up @@ -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)
Expand Down

0 comments on commit f7e58c9

Please sign in to comment.