A follow-up for D40768/D39508, with address sanitizer changes.
There is a problem:
$ ninja check-asan check-asan-dynamic [34/37] Running the AddressSanitizer tests with dynamic runtime FAIL: AddressSanitizer-lld-x86_64-linux-dynamic :: TestCases/Linux/asan_prelink_test.cc (242 of 1042) ******************** TEST 'AddressSanitizer-lld-x86_64-linux-dynamic :: TestCases/Linux/asan_prelink_test.cc' FAILED ******************** Script: -- /build/llvm-build-Clang-release/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -fuse-ld=lld -shared-libasan -c /build/compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc -o /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/asan_prelink_test.cc.tmp.o /build/llvm-build-Clang-release/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -fuse-ld=lld -shared-libasan -DBUILD_SO=1 -fPIC -shared /build/compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc -o /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/asan_prelink_test.cc.tmp.so -Wl,-Ttext-segment=0x3600000000 || /build/llvm-build-Clang-release/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -fuse-ld=lld -shared-libasan -DBUILD_SO=1 -fPIC -shared /build/compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc -o /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/asan_prelink_test.cc.tmp.so -Wl,-Ttext=0x3600000000 /build/llvm-build-Clang-release/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -fuse-ld=lld -shared-libasan /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/asan_prelink_test.cc.tmp.o /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/asan_prelink_test.cc.tmp.so -Wl,-R. -o /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/asan_prelink_test.cc.tmp env ASAN_OPTIONS=verbosity=1 /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/asan_prelink_test.cc.tmp 2>&1 | FileCheck /build/compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc -- Exit Code: 1 Command Output (stderr): -- clang-6.0: warning: argument unused during compilation: '-fuse-ld=lld' [-Wunused-command-line-argument] /build/compiler-rt/test/asan/TestCases/Linux/asan_prelink_test.cc:29:11: error: expected string not found in input // CHECK: SO mapped at 3600000000 ^ <stdin>:6:49: note: scanning from here || `[0x003000000000, 0x004fffffffff]` || MidMem || ^ <stdin>:28:82: note: possible intended match here ==9921==ERROR: AddressSanitizer: SEGV on unknown address 0x000000002056 (pc 0x000000002056 bp 0x000000000001 sp 0x7fff3f230a88 T0) ^ -- ******************** FAIL: AddressSanitizer-lld-x86_64-linux-dynamic :: TestCases/Linux/globals-gc-sections-lld.cc (255 of 1042) ******************** TEST 'AddressSanitizer-lld-x86_64-linux-dynamic :: TestCases/Linux/globals-gc-sections-lld.cc' FAILED ******************** Script: -- /build/llvm-build-Clang-release/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -fuse-ld=lld -shared-libasan /build/compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cc -o /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/globals-gc-sections-lld.cc.tmp -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=0 /build/llvm-build-Clang-release/./bin/clang --driver-mode=g++ -fsanitize=address -mno-omit-leaf-frame-pointer -fno-omit-frame-pointer -fno-optimize-sibling-calls -gline-tables-only -m64 -fuse-ld=lld -shared-libasan /build/compiler-rt/test/asan/TestCases/Linux/globals-gc-sections-lld.cc -o /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig/TestCases/Linux/Output/globals-gc-sections-lld.cc.tmp -Wl,--gc-sections -fuse-ld=lld -ffunction-sections -fdata-sections -mllvm -asan-globals=1 -- Exit Code: 1 Command Output (stderr): -- /build/llvm-build-Clang-release/./bin/ld.lld: error: undefined symbol: undefined() >>> referenced by globals-gc-sections-lld.cc >>> /tmp/lit_tmp_M8f31s/globals-gc-sections-lld-83f60d.o:(unused) clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation) -- ******************** Testing Time: 55.96s ******************** Failing Tests (2): AddressSanitizer-lld-x86_64-linux-dynamic :: TestCases/Linux/asan_prelink_test.cc AddressSanitizer-lld-x86_64-linux-dynamic :: TestCases/Linux/globals-gc-sections-lld.cc Expected Passes : 766 Expected Failures : 2 Unsupported Tests : 272 Unexpected Failures: 2 [35/37] Generating default/Asan-x86_64-inline-Test FAILED: projects/compiler-rt/test/asan/CMakeFiles/check-asan-dynamic cd /build/llvm-build-Clang-release/projects/compiler-rt/test/asan && /usr/bin/python2.7 /build/llvm-build-Clang-release/./bin/llvm-lit -sv /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/X86_64LinuxConfig /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/LLDX86_64LinuxConfig /build/llvm-build-Clang-release/projects/compiler-rt/test/asan/Unit/dynamic ninja: build stopped: subcommand failed.
so if complier rt has LLD we are going to run 2x+ as much tests?
cfi has small set of tests, but for entire compiler-rt could be noticeable.
@eugenis, any concerns?