[PATCH] D65773: Build libfuzzer libcxx-static with PIC
Yi Kong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 13:33:45 PDT 2019
kongyi created this revision.
kongyi added reviewers: phosek, ldionne.
Herald added subscribers: llvm-commits, Sanitizers, dexonsmith, mgorny.
Herald added a reviewer: EricWF.
Herald added projects: LLVM, Sanitizers.
r356153 changed default build option of static libcxx to no PIC. We now need to explicitly specify `CMAKE_POSITION_INDEPENDENT_CODE` to get PIC libcxx.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D65773
Files:
compiler-rt/lib/fuzzer/CMakeLists.txt
Index: compiler-rt/lib/fuzzer/CMakeLists.txt
===================================================================
--- compiler-rt/lib/fuzzer/CMakeLists.txt
+++ compiler-rt/lib/fuzzer/CMakeLists.txt
@@ -143,6 +143,7 @@
add_custom_libcxx(libcxx_fuzzer_${arch} ${LIBCXX_${arch}_PREFIX}
CFLAGS ${TARGET_CFLAGS}
CMAKE_ARGS -DCMAKE_CXX_COMPILER_WORKS=ON
+ -DCMAKE_POSITION_INDEPENDENT_CODE=ON
-DLIBCXX_ABI_NAMESPACE=Fuzzer)
target_compile_options(RTfuzzer.${arch} PRIVATE -isystem ${LIBCXX_${arch}_PREFIX}/include/c++/v1)
add_dependencies(RTfuzzer.${arch} libcxx_fuzzer_${arch}-build)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D65773.213449.patch
Type: text/x-patch
Size: 641 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190805/b511b7f9/attachment.bin>
More information about the llvm-commits
mailing list