The system libunwind on older Darwins does not support JIT registration of
compact-unwind. Since the CompactUnwindManager utility discards redundant
eh-frame FDEs by default we need to remove the compact-unwind section first
when targeting older libunwinds in order to preserve eh-frames.
While LLJIT was already doing this as of eae6d6d18b, MachOPlatform was not.
This was causing buildbot failures in the ORC runtime (e.g. in
https://green.lab.llvm.org/job/llvm.org/job/clang-stage1-RA/3479/).
This patch updates both LLJIT and MachOPlatform to check a bootstrap value,
"darwin-use-ehframes-only", to determine whether to forcibly preserve
eh-frame sections. If this value is present and set to true then compact-unwind
sections will be discarded, causing eh-frames to be preserved. If the value is
absent or set to false then compact-unwind will be used and redundant FDEs in
eh-frames discarded (FDEs that are needed by the compact-unwind section are
always preserved).
rdar://143895614
42 lines
988 B
CMake
42 lines
988 B
CMake
if( CMAKE_HOST_UNIX AND HAVE_LIBRT )
|
|
set(rt_lib rt)
|
|
endif()
|
|
|
|
set(intel_jit_profiling )
|
|
if( LLVM_USE_INTEL_JITEVENTS )
|
|
set(intel_jit_profiling IntelJITProfiling)
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../IntelJITProfiling)
|
|
if(NOT DEFINED ITTAPI_SOURCE_DIR)
|
|
set(ITTAPI_SOURCE_DIR ${PROJECT_BINARY_DIR})
|
|
endif()
|
|
include_directories(${ITTAPI_SOURCE_DIR}/ittapi/include/ )
|
|
endif()
|
|
|
|
add_llvm_component_library(LLVMOrcTargetProcess
|
|
ExecutorSharedMemoryMapperService.cpp
|
|
DefaultHostBootstrapValues.cpp
|
|
JITLoaderGDB.cpp
|
|
JITLoaderPerf.cpp
|
|
JITLoaderVTune.cpp
|
|
OrcRTBootstrap.cpp
|
|
RegisterEHFrames.cpp
|
|
SimpleExecutorDylibManager.cpp
|
|
SimpleExecutorMemoryManager.cpp
|
|
SimpleRemoteEPCServer.cpp
|
|
TargetExecutionUtils.cpp
|
|
UnwindInfoManager.cpp
|
|
|
|
ADDITIONAL_HEADER_DIRS
|
|
${LLVM_MAIN_INCLUDE_DIR}/llvm/ExecutionEngine/Orc
|
|
|
|
LINK_LIBS
|
|
${LLVM_PTHREAD_LIB}
|
|
${rt_lib}
|
|
|
|
LINK_COMPONENTS
|
|
${intel_jit_profiling}
|
|
OrcShared
|
|
Support
|
|
TargetParser
|
|
)
|