Skip to content

Commit 65f1e8f

Browse files
authored
Add check for NOT COMPILER_RT_USE_BUILTINS_LIBRARY
1 parent f32bb3d commit 65f1e8f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

compiler-rt/lib/fuzzer/tests/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" AND
4949
elseif(COMPILER_RT_HAS_GCC_LIB)
5050
# As a final fallback, use the static libgcc library.
5151
list(APPEND FUZZER_UNWINDER_LIBS gcc)
52-
else()
53-
message(FATAL_ERROR "Building fuzzer tests with -nostdlib++ requires a suitable unwinder (libunwind or libgcc_s) but none was found.")
52+
elseif(NOT COMPILER_RT_USE_BUILTINS_LIBRARY)
53+
# If no unwinder is found and we aren't using the builtins library
54+
message(FATAL_ERROR "Fuzzer tests require a suitable unwinder, but none was found.")
5455
endif()
5556
# Add the detected unwinder library to our link flags.
5657
list(APPEND LIBFUZZER_UNITTEST_LINK_FLAGS ${FUZZER_UNWINDER_LIBS})

0 commit comments

Comments
 (0)