File tree 5 files changed +24
-12
lines changed
5 files changed +24
-12
lines changed Original file line number Diff line number Diff line change @@ -706,18 +706,30 @@ macro(add_custom_libcxx name prefix)
706
706
-DLLVM_INCLUDE_TESTS=OFF
707
707
-DLLVM_INCLUDE_DOCS=OFF
708
708
${LIBCXX_CMAKE_ARGS}
709
- STEP_TARGETS configure build install
709
+ STEP_TARGETS configure build
710
710
BUILD_ALWAYS 1
711
711
USES_TERMINAL_CONFIGURE 1
712
712
USES_TERMINAL_BUILD 1
713
713
USES_TERMINAL_INSTALL 1
714
714
LIST_SEPARATOR |
715
715
EXCLUDE_FROM_ALL TRUE
716
+ )
717
+
718
+ # Once we depend on CMake 3.26, we can use the INSTALL_BYPRODUCTS argument
719
+ # instead of having to fall back to ExternalProject_Add_Step()
720
+ # Note: We can't use the normal name "install" here since that interferes
721
+ # with the default ExternalProject_Add() logic and causes errors.
722
+ ExternalProject_Add_Step(${name} install -cmake326-workaround
716
723
# Ensure that DESTDIR=... set in the out environment does not affect this
717
724
# target (we always need to install to the build directory).
718
- INSTALL_COMMAND env DESTDIR= ${CMAKE_COMMAND} --build ${prefix} /build --target install
719
- INSTALL_BYPRODUCTS "${prefix} /lib/libc++.a" "${prefix} /lib/libc++abi.a"
720
- )
725
+ COMMAND env DESTDIR= ${CMAKE_COMMAND} --build ${prefix} /build --target install
726
+ COMMENT "Installing ${name} ..."
727
+ BYPRODUCTS "${prefix} /lib/libc++.a" "${prefix} /lib/libc++abi.a"
728
+ DEPENDEES build
729
+ EXCLUDE_FROM_MAIN 1
730
+ USES_TERMINAL 1
731
+ )
732
+ ExternalProject_Add_StepTargets(${name} install -cmake326-workaround)
721
733
722
734
if (CMAKE_GENERATOR MATCHES "Make" )
723
735
set (run_clean "$(MAKE)" "-C" "${prefix} " "clean" )
Original file line number Diff line number Diff line change @@ -166,11 +166,11 @@ if(OS_NAME MATCHES "Android|Linux|Fuchsia" AND
166
166
-DLIBCXX_ABI_NAMESPACE=__Fuzzer
167
167
-DLIBCXX_ENABLE_EXCEPTIONS=OFF )
168
168
target_compile_options (RTfuzzer.${arch} PRIVATE -isystem ${LIBCXX_${arch} _PREFIX}/include /c++/v1)
169
- add_dependencies (RTfuzzer.${arch} libcxx_fuzzer_${arch} -install )
169
+ add_dependencies (RTfuzzer.${arch} libcxx_fuzzer_${arch} -install -cmake326-workaround )
170
170
target_compile_options (RTfuzzer_main.${arch} PRIVATE -isystem ${LIBCXX_${arch} _PREFIX}/include /c++/v1)
171
- add_dependencies (RTfuzzer_main.${arch} libcxx_fuzzer_${arch} -install )
171
+ add_dependencies (RTfuzzer_main.${arch} libcxx_fuzzer_${arch} -install -cmake326-workaround )
172
172
target_compile_options (RTfuzzer_interceptors.${arch} PRIVATE -isystem ${LIBCXX_${arch} _PREFIX}/include /c++/v1)
173
- add_dependencies (RTfuzzer_interceptors.${arch} libcxx_fuzzer_${arch} -install )
173
+ add_dependencies (RTfuzzer_interceptors.${arch} libcxx_fuzzer_${arch} -install -cmake326-workaround )
174
174
partially_link_libcxx(fuzzer_no_main ${LIBCXX_${arch} _PREFIX} ${arch} )
175
175
partially_link_libcxx(fuzzer_interceptors ${LIBCXX_${arch} _PREFIX} ${arch} )
176
176
partially_link_libcxx(fuzzer ${LIBCXX_${arch} _PREFIX} ${arch} )
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ if(COMPILER_RT_DEFAULT_TARGET_ARCH IN_LIST FUZZER_SUPPORTED_ARCH)
64
64
COMPILER_RT_LIBCXX_PATH AND
65
65
COMPILER_RT_LIBCXXABI_PATH)
66
66
file (GLOB libfuzzer_headers ../*.h)
67
- set (LIBFUZZER_TEST_RUNTIME_DEPS libcxx_fuzzer_${arch} -install ${libfuzzer_headers} )
67
+ set (LIBFUZZER_TEST_RUNTIME_DEPS libcxx_fuzzer_${arch} -install -cmake326-workaround ${libfuzzer_headers} )
68
68
set (LIBFUZZER_TEST_RUNTIME_CFLAGS -isystem ${LIBCXX_${arch} _PREFIX}/include /c++/v1)
69
69
set (LIBFUZZER_TEST_RUNTIME_LINK_FLAGS ${LIBCXX_${arch} _PREFIX}/lib/libc++.a)
70
70
endif ()
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ macro(msan_compile obj_list source arch kind cflags)
69
69
sanitizer_test_compile(
70
70
${obj_list} ${source} ${arch}
71
71
KIND ${kind}
72
- COMPILE_DEPS ${MSAN_UNITTEST_HEADERS} libcxx_msan_${arch} -install
72
+ COMPILE_DEPS ${MSAN_UNITTEST_HEADERS} libcxx_msan_${arch} -install -cmake326-workaround
73
73
DEPS msan
74
74
CFLAGS -isystem ${MSAN_LIBCXX_DIR} /../include /c++/v1
75
75
${MSAN_UNITTEST_INSTRUMENTED_CFLAGS} ${cflags}
@@ -117,10 +117,10 @@ macro(add_msan_tests_for_arch arch kind cflags)
117
117
DEPS ${MSAN_INST_LOADABLE_OBJECTS} )
118
118
119
119
set (MSAN_TEST_OBJECTS ${MSAN_INST_TEST_OBJECTS} ${MSAN_INST_GTEST} )
120
- set (MSAN_TEST_DEPS ${MSAN_TEST_OBJECTS} libcxx_msan_${arch} -install
120
+ set (MSAN_TEST_DEPS ${MSAN_TEST_OBJECTS} libcxx_msan_${arch} -install -cmake326-workaround
121
121
${MSAN_LOADABLE_SO}
122
122
"${MSAN_LIBCXX_DIR} /libc++.a" "${MSAN_LIBCXX_DIR} /libc++abi.a" )
123
- list (APPEND MSAN_TEST_DEPS msan libcxx_msan_${arch} -install )
123
+ list (APPEND MSAN_TEST_DEPS msan libcxx_msan_${arch} -install -cmake326-workaround )
124
124
get_target_flags_for_arch(${arch} TARGET_LINK_FLAGS)
125
125
add_compiler_rt_test(MsanUnitTests "Msan-${arch}${kind} -Test" ${arch}
126
126
OBJECTS ${MSAN_TEST_OBJECTS} "${MSAN_LIBCXX_DIR} /libc++.a" "${MSAN_LIBCXX_DIR} /libc++abi.a"
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ if(COMPILER_RT_LIBCXX_PATH AND
31
31
DEPS ${TSAN_RUNTIME_LIBRARIES}
32
32
CFLAGS ${TARGET_CFLAGS} -fsanitize=thread
33
33
USE_TOOLCHAIN)
34
- list (APPEND libcxx_tsan_deps libcxx_tsan_${arch} -install )
34
+ list (APPEND libcxx_tsan_deps libcxx_tsan_${arch} -install -cmake326-workaround )
35
35
endforeach ()
36
36
37
37
add_custom_target (libcxx_tsan DEPENDS ${libcxx_tsan_deps} )
You can’t perform that action at this time.
0 commit comments