Skip to content

Commit

Permalink
Revert "[lld] Remove special cases from default ld driver mode."
Browse files Browse the repository at this point in the history
This reverts commit da093c3.

Broke a test on Darwin. Will fix the test and resubmit.
  • Loading branch information
DanAlbert committed Apr 29, 2020
1 parent 911add1 commit 0a78e42
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lld/tools/lld/lld.cpp
Expand Up @@ -96,9 +96,17 @@ static bool isPETarget(std::vector<const char *> &v) {
}

static Flavor parseProgname(StringRef progname) {
// Use GNU driver for "ld" by default.
#if __APPLE__
// Use Darwin driver for "ld" on Darwin.
if (progname == "ld")
return Darwin;
#endif

#if LLVM_ON_UNIX
// Use GNU driver for "ld" on other Unix-like system.
if (progname == "ld")
return Gnu;
#endif

// Progname may be something like "lld-gnu". Parse it.
SmallVector<StringRef, 3> v;
Expand Down

0 comments on commit 0a78e42

Please sign in to comment.