[compiler-rt] [Fuzzer] Fix tests linking buildbot failure (#144495)
Fix for #144495 by 6f4add3 broke sanitizer-aarch64-linux buildbot.
compiler-rt/lib/fuzzer/tests build failed because the linker was
looking gcc_s without '-l' appended.
The CMake script was adding the library name without the required
'-l' prefix. This patch adds the -l prefix changing gcc_s to -lgcc_s
and gcc to -lgcc.
https://lab.llvm.org/buildbot/#/builders/51/builds/18170
This commit is contained in:
@@ -45,10 +45,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND
|
||||
list(APPEND FUZZER_UNWINDER_LIBS ${COMPILER_RT_UNWINDER_LINK_LIBS})
|
||||
elseif(COMPILER_RT_HAS_GCC_S_LIB)
|
||||
# As a fallback, use the shared libgcc_s library.
|
||||
list(APPEND FUZZER_UNWINDER_LIBS gcc_s)
|
||||
list(APPEND FUZZER_UNWINDER_LIBS -lgcc_s)
|
||||
elseif(COMPILER_RT_HAS_GCC_LIB)
|
||||
# As a final fallback, use the static libgcc library.
|
||||
list(APPEND FUZZER_UNWINDER_LIBS gcc)
|
||||
list(APPEND FUZZER_UNWINDER_LIBS -lgcc)
|
||||
elseif(NOT COMPILER_RT_USE_BUILTINS_LIBRARY)
|
||||
# If no unwinder is found and we aren't using the builtins library
|
||||
message(FATAL_ERROR "Fuzzer tests require a suitable unwinder, but none was found.")
|
||||
|
||||
Reference in New Issue
Block a user