blob: 553234bff788b136496a307913a74f399bb0a4ce [file] [log] [blame]
LLD uses the argv[0] to get the host system information.
We created a wrapper of LLD and the real lld becomes
lld.elf, so the LLD cannot get the host system informaction
and dies. see crbug.com/701659
--- a/lld/tools/lld/lld.cpp
+++ b/lld/tools/lld/lld.cpp
@@ -39,17 +39,18 @@ enum Flavor {
LLVM_ATTRIBUTE_NORETURN static void die(const Twine &S) {
errs() << S << "\n";
exit(1);
}
static Flavor getFlavor(StringRef S) {
return StringSwitch<Flavor>(S)
- .CasesLower("ld", "ld.lld", "gnu", Gnu)
+ .CasesLower("ld", "ld.lld", "gnu", Gnu)
+ .CasesLower("lld.elf", "lld.real", "lld.real.elf", "gnu", Gnu)
.CasesLower("wasm", "ld-wasm", Wasm)
.CaseLower("link", WinLink)
.CasesLower("ld64", "ld64.lld", "darwin", Darwin)
.Default(Invalid);
}
static bool isPETarget(const std::vector<const char *> &V) {
for (auto It = V.begin(); It + 1 != V.end(); ++It) {