[compiler-rt] r367943 - Build libfuzzer libcxx-static with PIC
Yi Kong via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 5 15:55:17 PDT 2019
Author: kongyi
Date: Mon Aug 5 15:55:17 2019
New Revision: 367943
URL: http://llvm.org/viewvc/llvm-project?rev=367943&view=rev
Log:
Build libfuzzer libcxx-static with PIC
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.
Differential Revision: https://reviews.llvm.org/D65773
Modified:
compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
Modified: compiler-rt/trunk/lib/fuzzer/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/fuzzer/CMakeLists.txt?rev=367943&r1=367942&r2=367943&view=diff
==============================================================================
--- compiler-rt/trunk/lib/fuzzer/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/fuzzer/CMakeLists.txt Mon Aug 5 15:55:17 2019
@@ -143,6 +143,7 @@ if(OS_NAME MATCHES "Linux|Fuchsia" AND
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)
More information about the llvm-commits
mailing list