[hwasan] Build runtime library with -fPIC, not -fPIE.

Summary: -fPIE can not be used when building a shared library.

Reviewers: alekseyshl, peter.smith

Subscribers: kubamracek, llvm-commits, mgorny

Differential Revision: https://reviews.llvm.org/D42121

llvm-svn: 322588
This commit is contained in:
Evgeniy Stepanov 2018-01-16 19:21:45 +00:00
parent 9350fc3987
commit d96b06f2c2
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ set(HWASAN_RTL_CXX_SOURCES
set(HWASAN_RTL_CFLAGS ${SANITIZER_COMMON_CFLAGS})
append_rtti_flag(OFF HWASAN_RTL_CFLAGS)
append_list_if(COMPILER_RT_HAS_FPIE_FLAG -fPIE HWASAN_RTL_CFLAGS)
append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC HWASAN_RTL_CFLAGS)
# Prevent clang from generating libc calls.
append_list_if(COMPILER_RT_HAS_FFREESTANDING_FLAG -ffreestanding HWASAN_RTL_CFLAGS)