summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2019-08-05 22:55:17 +0000
committerYi Kong <yikong@google.com>2019-08-05 22:55:17 +0000
commit295d4b7727caba392ff3fdf1dbd9006b1ee1a1a2 (patch)
tree963756c774a3cef816fc9dc60530826d0e4bb94d
parentc71c6299265678f9495966efd859770660ed7b50 (diff)
downloadbcm5719-llvm-295d4b7727caba392ff3fdf1dbd9006b1ee1a1a2.tar.gz
bcm5719-llvm-295d4b7727caba392ff3fdf1dbd9006b1ee1a1a2.zip
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 llvm-svn: 367943
-rw-r--r--compiler-rt/lib/fuzzer/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler-rt/lib/fuzzer/CMakeLists.txt b/compiler-rt/lib/fuzzer/CMakeLists.txt
index 852019dc154..3743db9908c 100644
--- a/compiler-rt/lib/fuzzer/CMakeLists.txt
+++ b/compiler-rt/lib/fuzzer/CMakeLists.txt
@@ -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)
OpenPOWER on IntegriCloud