Skip to content

Commit 92fba70

Browse files
committed
add -fpic flags for old cmake
1 parent ac3135f commit 92fba70

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

llvm_mode/dfsan_rt/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ set(DFSAN_SUPPORTED_ARCH ${X86_64}) # ${MIPS64} ${ARM64}
2727
set(SANITIZER_COMMON_SUPPORTED_ARCH ${X86_64}) # ${MIPS64} ${ARM64}
2828

2929
list(APPEND SANITIZER_COMMON_CFLAGS -O3)
30+
list(APPEND SANITIZER_COMMON_CFLAGS -fPIC)
3031

3132
include(CheckIncludeFile)
3233
check_include_file(rpc/xdr.h HAVE_RPC_XDR_H)

llvm_mode/external_lib/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11

2+
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
3+
24
## default taint models for IO and memory allocation.
35
add_library(DFSanIO STATIC io_func.c stdalloc.c)
46
install (TARGETS DFSanIO DESTINATION ${ANGORA_LIB_DIR})

llvm_mode/external_lib/Makefile

Lines changed: 0 additions & 10 deletions
This file was deleted.

llvm_mode/pass/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ endif()
3636

3737
set (CMAKE_CXX_STANDARD 11)
3838
# fix pass bug: https://github.com/sampsyo/llvm-pass-skeleton/issues/7#issuecomment-401834287
39-
set (CMAKE_MODULE_LINKER_FLAGS "-Wl,-znodelete")
39+
set (CMAKE_MODULE_LINKER_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-znodelete")
4040
if(APPLE)
4141
# User teor2345 reports that this is required to make things work on MacOS X.
4242
set (CMAKE_MODULE_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -Wl,-flat_namespace -Wl,-undefined,suppress")

0 commit comments

Comments
 (0)