forked from OSchip/llvm-project
d849f8fd8f
Summary: As reported on llvm-testers, during 8.0.0-rc1 testing I got errors while building of `XRayTest`, during `check-all`: ``` [100%] Generating XRayTest-x86_64-Test /home/dim/llvm/8.0.0/rc1/Phase3/Release/llvmCore-8.0.0-rc1.obj/./lib/libLLVMSupport.a(Signals.cpp.o): In function `llvm::sys::PrintStackTrace(llvm::raw_ostream&)': Signals.cpp:(.text._ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x24): undefined reference to `backtrace' Signals.cpp:(.text._ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x254): undefined reference to `llvm::itaniumDemangle(char const*, char*, unsigned long*, int*)' clang-8: error: linker command failed with exit code 1 (use -v to see invocation) gmake[3]: *** [projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/build.make:73: projects/compiler-rt/lib/xray/tests/unit/XRayTest-x86_64-Test] Error 1 gmake[3]: Target 'projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/build' not remade because of errors. gmake[2]: *** [CMakeFiles/Makefile2:33513: projects/compiler-rt/lib/xray/tests/unit/CMakeFiles/TXRayTest-x86_64-Test.dir/all] Error 2 gmake[2]: Target 'CMakeFiles/check-all.dir/all' not remade because of errors. gmake[1]: *** [CMakeFiles/Makefile2:737: CMakeFiles/check-all.dir/rule] Error 2 gmake[1]: Target 'check-all' not remade because of errors. gmake: *** [Makefile:277: check-all] Error 2 [Release Phase3] check-all failed ``` This is because the `backtrace` function requires `-lexecinfo` on BSD platforms. To fix this, detect the `execinfo` library in `cmake/config-ix.cmake`, and add it to the unit test link flags. Additionally, since the code in `sys::PrintStackTrace` makes use of `itaniumDemangle`, also add `-lLLVMDemangle`. (Note that this is more of a general problem with libLLVMSupport, but I'm looking for a quick fix now so it can be merged to the 8.0 branch.) Reviewers: dberris, hans, mgorny, samsonov Reviewed By: dberris Subscribers: krytarowski, delcypher, erik.pilkington, #sanitizers, emaste, llvm-commits Differential Revision: https://reviews.llvm.org/D57181 llvm-svn: 352234 |
||
---|---|---|
.. | ||
tests | ||
CMakeLists.txt | ||
weak_symbols.txt | ||
xray_AArch64.cc | ||
xray_allocator.h | ||
xray_always_instrument.txt | ||
xray_arm.cc | ||
xray_basic_flags.cc | ||
xray_basic_flags.h | ||
xray_basic_flags.inc | ||
xray_basic_logging.cc | ||
xray_basic_logging.h | ||
xray_buffer_queue.cc | ||
xray_buffer_queue.h | ||
xray_defs.h | ||
xray_fdr_controller.h | ||
xray_fdr_flags.cc | ||
xray_fdr_flags.h | ||
xray_fdr_flags.inc | ||
xray_fdr_log_records.h | ||
xray_fdr_log_writer.h | ||
xray_fdr_logging.cc | ||
xray_fdr_logging.h | ||
xray_flags.cc | ||
xray_flags.h | ||
xray_flags.inc | ||
xray_function_call_trie.h | ||
xray_init.cc | ||
xray_interface.cc | ||
xray_interface_internal.h | ||
xray_log_interface.cc | ||
xray_mips.cc | ||
xray_mips64.cc | ||
xray_never_instrument.txt | ||
xray_powerpc64.cc | ||
xray_powerpc64.inc | ||
xray_profile_collector.cc | ||
xray_profile_collector.h | ||
xray_profiling.cc | ||
xray_profiling_flags.cc | ||
xray_profiling_flags.h | ||
xray_profiling_flags.inc | ||
xray_recursion_guard.h | ||
xray_segmented_array.h | ||
xray_trampoline_AArch64.S | ||
xray_trampoline_arm.S | ||
xray_trampoline_mips.S | ||
xray_trampoline_mips64.S | ||
xray_trampoline_powerpc64.cc | ||
xray_trampoline_powerpc64_asm.S | ||
xray_trampoline_x86_64.S | ||
xray_tsc.h | ||
xray_utils.cc | ||
xray_utils.h | ||
xray_x86_64.cc | ||
xray_x86_64.inc |