summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-12-27 15:08:10 -0800
committerFangrui Song <maskray@google.com>2019-12-27 15:25:08 -0800
commit33a1b3d8fceae7dd543cd3cf465f7fa6b71a9e7b (patch)
tree2faf1969a7cf058063f6e74a4e9081bc8fb8cef3 /compiler-rt/lib
parent5ce2ca524e99189fb778d21f63ec0c78944383e5 (diff)
downloadbcm5719-llvm-33a1b3d8fceae7dd543cd3cf465f7fa6b71a9e7b.tar.gz
bcm5719-llvm-33a1b3d8fceae7dd543cd3cf465f7fa6b71a9e7b.zip
[sanitizer] Link Sanitizer-x86_64-Test-Nolibc with -static
Pass -static so that clang will not pass -Wl,--dynamic-linker,... to the linker. The test is not expected to run under a ld.so. (Technically it works under a ld.so but glibc expects to see a PT_DYNAMIC. lld intentionally does not follow GNU ld's complex rules regarding PT_DYNAMIC.) This allows commit 1417558e4a61794347c6bfbafaff7cd96985b2c3 to be relanded.
Diffstat (limited to 'compiler-rt/lib')
-rw-r--r--compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
index fd31b6dbdf4..0726280e418 100644
--- a/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
+++ b/compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt
@@ -171,7 +171,7 @@ macro(add_sanitizer_tests_for_arch arch)
-Wl,-no-whole-archive
DEPS sanitizer_nolibc_test_main.${arch}.o
RTSanitizerCommon.test.nolibc.${arch}
- LINK_FLAGS -nostdlib ${TARGET_FLAGS})
+ LINK_FLAGS -static -nostdlib ${TARGET_FLAGS})
endif()
endmacro()
OpenPOWER on IntegriCloud