forked from OSchip/llvm-project
[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 1417558e4a to be
relanded.
This commit is contained in:
parent
5ce2ca524e
commit
33a1b3d8fc
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue