[lld] f2710d4 - lld/mach-o: Infer darwinnew from filename ld64.lld.darwinnew too
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 16 12:25:13 PST 2020
Author: Nico Weber
Date: 2020-11-16T15:23:03-05:00
New Revision: f2710d4b576053d405af7a0e2a62ea06d5a978e3
URL: https://github.com/llvm/llvm-project/commit/f2710d4b576053d405af7a0e2a62ea06d5a978e3
DIFF: https://github.com/llvm/llvm-project/commit/f2710d4b576053d405af7a0e2a62ea06d5a978e3.diff
LOG: 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.
Added:
Modified:
lld/tools/lld/lld.cpp
Removed:
################################################################################
diff --git a/lld/tools/lld/lld.cpp b/lld/tools/lld/lld.cpp
index 5d71a8f24adf..77d7792451f2 100644
--- a/lld/tools/lld/lld.cpp
+++ b/lld/tools/lld/lld.cpp
@@ -71,7 +71,7 @@ static Flavor getFlavor(StringRef s) {
.CasesLower("wasm", "ld-wasm", Wasm)
.CaseLower("link", WinLink)
.CasesLower("ld64", "ld64.lld", "darwin", Darwin)
- .CaseLower("darwinnew", DarwinNew)
+ .CasesLower("darwinnew", "ld64.lld.darwinnew", DarwinNew)
.Default(Invalid);
}
More information about the llvm-commits
mailing list