@@ -55,7 +55,6 @@ option(LIBUNWIND_USE_FRAME_HEADER_CACHE "Cache frame headers for unwinding. Requ
5555option (LIBUNWIND_REMEMBER_HEAP_ALLOC "Use heap instead of the stack for .cfi_remember_state." OFF )
5656option (LIBUNWIND_INSTALL_HEADERS "Install the libunwind headers." ON )
5757option (LIBUNWIND_ENABLE_FRAME_APIS "Include libgcc-compatible frame apis." OFF )
58- option (LIBUNWIND_EXECUTE_ONLY_CODE "Compile libunwind as execute-only." OFF )
5958
6059set (LIBUNWIND_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX} " CACHE STRING
6160 "Define suffix of library directory name (32/64)" )
@@ -110,11 +109,6 @@ endif()
110109option (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
120114check_symbol_exists(__mips_hard_float "" __MIPSHF)
@@ -338,15 +332,7 @@ if (C_SUPPORTS_COMMENT_LIB_PRAGMA)
338332 endif ()
339333endif ()
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)
351337endif ()
352338
0 commit comments