Skip to content

Commit f3fdfa6

Browse files
committed
Simplify CMake configuration based on RFC feedback
1 parent 8f33cec commit f3fdfa6

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

libunwind/CMakeLists.txt

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ option(LIBUNWIND_USE_FRAME_HEADER_CACHE "Cache frame headers for unwinding. Requ
5555
option(LIBUNWIND_REMEMBER_HEAP_ALLOC "Use heap instead of the stack for .cfi_remember_state." OFF)
5656
option(LIBUNWIND_INSTALL_HEADERS "Install the libunwind headers." ON)
5757
option(LIBUNWIND_ENABLE_FRAME_APIS "Include libgcc-compatible frame apis." OFF)
58-
option(LIBUNWIND_EXECUTE_ONLY_CODE "Compile libunwind as execute-only." OFF)
5958

6059
set(LIBUNWIND_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
6160
"Define suffix of library directory name (32/64)")
@@ -110,11 +109,6 @@ endif()
110109
option(LIBUNWIND_HIDE_SYMBOLS
111110
"Do not export any symbols from the static library." ${LIBUNWIND_DEFAULT_HIDE_SYMBOLS})
112111

113-
if (LIBUNWIND_EXECUTE_ONLY_CODE AND NOT LLVM_RUNTIMES_BUILD)
114-
message(SEND_ERROR "LIBUNWIND_EXECUTE_ONLY_CODE is only supported "
115-
"for runtimes build of libunwind.")
116-
endif()
117-
118112
# If toolchain is FPXX, we switch to FP64 to save the full FPRs. See:
119113
# https://web.archive.org/web/20180828210612/https://dmz-portal.mips.com/wiki/MIPS_O32_ABI_-_FR0_and_FR1_Interlinking
120114
check_symbol_exists(__mips_hard_float "" __MIPSHF)
@@ -338,15 +332,7 @@ if (C_SUPPORTS_COMMENT_LIB_PRAGMA)
338332
endif()
339333
endif()
340334

341-
if (LIBUNWIND_EXECUTE_ONLY_CODE)
342-
add_compile_flags_if_supported(-mexecute-only)
343-
if (NOT CXX_SUPPORTS_MEXECUTE_ONLY_FLAG)
344-
add_compile_flags_if_supported(-mpure-code)
345-
if (NOT CXX_SUPPORTS_MPURE_CODE_FLAG)
346-
message(SEND_ERROR
347-
"Compiler doesn't support -mexecute-only or -mpure-code option!")
348-
endif()
349-
endif()
335+
if (LLVM_EXECUTE_ONLY_CODE)
350336
add_compile_definitions(_LIBUNWIND_EXECUTE_ONLY_CODE)
351337
endif()
352338

0 commit comments

Comments
 (0)