[lld] r217112 - If lld binary is named 'ld' on darwin, use darwin driver mode
Nick Kledzik
kledzik at apple.com
Wed Sep 3 17:03:37 PDT 2014
Author: kledzik
Date: Wed Sep 3 19:03:36 2014
New Revision: 217112
URL: http://llvm.org/viewvc/llvm-project?rev=217112&view=rev
Log:
If lld binary is named 'ld' on darwin, use darwin driver mode
Modified:
lld/trunk/lib/Driver/UniversalDriver.cpp
Modified: lld/trunk/lib/Driver/UniversalDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/Driver/UniversalDriver.cpp?rev=217112&r1=217111&r2=217112&view=diff
==============================================================================
--- lld/trunk/lib/Driver/UniversalDriver.cpp (original)
+++ lld/trunk/lib/Driver/UniversalDriver.cpp Wed Sep 3 19:03:36 2014
@@ -89,7 +89,13 @@ static Flavor strToFlavor(StringRef str)
.Case("lld-link", Flavor::win_link)
.Case("darwin", Flavor::darwin_ld)
.Case("core", Flavor::core)
- .Case("ld", Flavor::gnu_ld) // deprecated
+#if __APPLE__
+ // On a Darwin systems, if linker binary is named "ld", use Darwin driver.
+ .Case("ld", Flavor::darwin_ld)
+#else
+ // On other *nix systems, if linker binary is named "ld", use gnu driver.
+ .Case("ld", Flavor::gnu_ld)
+#endif
.Default(Flavor::invalid);
}
More information about the llvm-commits
mailing list