lld/mach-o: Infer darwinnew from filename ld64.lld.darwinnew too
authorNico Weber <thakis@chromium.org>
Mon, 16 Nov 2020 20:23:02 +0000 (15:23 -0500)
committerNico Weber <thakis@chromium.org>
Mon, 16 Nov 2020 20:23:03 +0000 (15:23 -0500)
commitf2710d4b576053d405af7a0e2a62ea06d5a978e3
tree1af72f92b865595edd860415a3bf41de2830a215
parent257d33c815d4a204b5a9de1ab2b1ed21c94c2ae6
lld/mach-o: Infer darwinnew from filename ld64.lld.darwinnew too

`-flavor` is difficult to use through the clang driver since it
must be the first argument.

clang's `-fuse-ld=foo` looks for `ld64.foo` when targeting darwin,
so it's easiest if darwinnew accepts some `ld64.foo`. Let's go with
`ld64.lld.darwinnew`, so that `clang -fuse-ld=lld.darwinnew` does
the right thing (assuming a symlink with the name `ld64.ld.darwinnew
exists in the right place).

This is temporary until darwinnew replaces ld64.lld, and it only
exists to make testing the new lld port easier.
lld/tools/lld/lld.cpp