Skip to content

Commit 1638581

Browse files
committed
[𝘀𝗽𝗿] initial version
Created using spr 1.3.4
1 parent 50866e8 commit 1638581

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

compiler-rt/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ if(COMPILER_RT_USE_LLVM_UNWINDER)
616616
if (COMPILER_RT_ENABLE_STATIC_UNWINDER)
617617
list(APPEND COMPILER_RT_UNWINDER_LINK_LIBS "$<TARGET_LINKER_FILE:unwind_static>")
618618
else()
619-
list(APPEND COMPILER_RT_UNWINDER_LINK_LIBS "$<TARGET_LINKER_FILE:$<IF:$<TARGET_EXISTS:unwind_shared>,unwind_shared,unwind_static>>")
619+
list(APPEND COMPILER_RT_UNWINDER_LINK_LIBS "$<TARGET_LINKER_FILE:$<IF:$<BOOL:${LIBUNWIND_ENABLE_SHARED}>,unwind_shared,unwind_static>>")
620620
endif()
621621
endif()
622622

@@ -629,7 +629,7 @@ if (COMPILER_RT_CXX_LIBRARY STREQUAL "libcxx")
629629
if (COMPILER_RT_STATIC_CXX_LIBRARY)
630630
set(COMPILER_RT_CXX_LINK_LIBS "$<TARGET_LINKER_FILE:cxx_static>")
631631
else()
632-
set(COMPILER_RT_CXX_LINK_LIBS "$<TARGET_LINKER_FILE:$<IF:$<TARGET_EXISTS:cxx_shared>,cxx_shared,cxx_static>>")
632+
set(COMPILER_RT_CXX_LINK_LIBS "$<TARGET_LINKER_FILE:$<IF:$<BOOL:${LIBCXX_ENABLE_SHARED}>,cxx_shared,cxx_static>>")
633633
endif()
634634
elseif (COMPILER_RT_CXX_LIBRARY STREQUAL "none")
635635
# We aren't using any C++ standard library so avoid including the default one.
@@ -671,7 +671,7 @@ if (SANITIZER_TEST_CXX_LIBNAME STREQUAL "libc++")
671671
if (SANITIZER_USE_STATIC_TEST_CXX)
672672
list(APPEND SANITIZER_TEST_CXX_LIBRARIES "$<TARGET_LINKER_FILE:cxx_static>")
673673
else()
674-
list(APPEND SANITIZER_TEST_CXX_LIBRARIES "$<TARGET_LINKER_FILE:$<IF:$<TARGET_EXISTS:cxx_shared>,cxx_shared,cxx_static>>")
674+
list(APPEND SANITIZER_TEST_CXX_LIBRARIES "$<TARGET_LINKER_FILE:$<IF:$<BOOL:${LIBCXX_ENABLE_SHARED}>,cxx_shared,cxx_static>>")
675675
endif()
676676
# We are using the in tree libc++ so avoid including the default one.
677677
append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ COMPILER_RT_UNITTEST_CFLAGS)

compiler-rt/test/fuzzer/CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,10 @@ endmacro()
7373

7474
test_fuzzer("default")
7575
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
76-
if(TARGET cxx_shared)
77-
test_fuzzer("libc++" DEPS cxx_shared)
78-
endif()
79-
if(TARGET cxx_static)
76+
if(LIBCXX_ENABLE_STATIC)
8077
test_fuzzer("static-libc++" DEPS cxx_static)
78+
elseif(LIBCXX_ENABLE_SHARED)
79+
test_fuzzer("libc++" DEPS cxx_shared)
8180
endif()
8281
endif()
8382

0 commit comments

Comments
 (0)