Fix driver test from e16c0a9a689719
authorNico Weber <thakis@chromium.org>
Tue, 24 Nov 2020 14:43:22 +0000 (09:43 -0500)
committerNico Weber <thakis@chromium.org>
Tue, 24 Nov 2020 15:51:08 +0000 (10:51 -0500)
commit5ce85e66358a69e786093756c77fae2e140947c1
treef720b1adbb922e1f52e017c7283c3ca3bd2ad49a
parent9c3b68dc6fe1475bf49c2a878748de32cac83ede
Fix driver test from e16c0a9a689719

The test failed silently if lld wasn't built alongside clang.
But the test uses -###, so the "invalid linker name in -fuse-ld=lld"
diag didn't make clang fail, and something else happened to match
"-demangle", so the test passed.

To fix, pass -B to a directory with two empty +x files (which works
on non-Windows), and look for `"-demangle"` instead of just `-demangle`.
Also force linker_version to 0 and pass a darwin triple.

Differential Revision: https://reviews.llvm.org/D92028
clang/test/Driver/Inputs/lld/ld64.lld [new file with mode: 0755]
clang/test/Driver/Inputs/lld/ld64.lld.darwinnew [new file with mode: 0755]
clang/test/Driver/darwin-ld-demangle-lld.c