Skip to content

Commit bbb7212

Browse files
committed
[scudo][test] Link with -no-pie to be agnostic of CLANG_DEFAULT_PIE_ON_LINUX
This keeps the test behavior unchanged when CLANG_DEFAULT_PIE_ON_LINUX switches to ON by default. Note: current clang --target=mips64el-linux-gnu -fpie -pie -fuse-ld=lld does not link with C++ exceptions, using -pie would lead to ``` ld.lld: error: cannot preempt symbol: DW.ref.__gxx_personality_v0 ... ld.lld: error: relocation R_MIPS_64 cannot be used against local symbol; recompile with -fPIC ... ``` when linking `ScudoUnitTests`: https://lab.llvm.org/buildbot/#/builders/169/builds/7311/steps/18/logs/stdio
1 parent 2cbd4fc commit bbb7212

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ set(LINK_FLAGS
3737
${COMPILER_RT_UNITTEST_LINK_FLAGS}
3838
${SANITIZER_TEST_CXX_LIBRARIES}
3939
)
40-
list(APPEND LINK_FLAGS -pthread)
40+
list(APPEND LINK_FLAGS -pthread -no-pie)
4141
# Linking against libatomic is required with some compilers
4242
check_library_exists(atomic __atomic_load_8 "" COMPILER_RT_HAS_LIBATOMIC)
4343
if (COMPILER_RT_HAS_LIBATOMIC)

0 commit comments

Comments
 (0)