-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e89014
commit b4be93b
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
diff --git a/lib/Driver/UnixToolChains.cpp b/lib/Driver/UnixToolChains.cpp | ||
index 61498c144a2..f1952d57620 100644 | ||
--- a/lib/Driver/UnixToolChains.cpp | ||
+++ b/lib/Driver/UnixToolChains.cpp | ||
@@ -10,6 +10,9 @@ | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
+#include <iostream> | ||
+#include "llvm/TargetParser/Triple.h" | ||
+ | ||
#include "ToolChains.h" | ||
|
||
#include "swift/Basic/Dwarf.h" | ||
@@ -111,8 +114,23 @@ ToolChain::InvocationInfo toolchains::GenericUnix::constructInvocation( | ||
} | ||
|
||
std::string toolchains::GenericUnix::getDefaultLinker() const { | ||
+ std::cout << "We need to check for Amazon Linux and set default to lld\n"; | ||
+ std::cout << "getTriple().getArch(): " << getTriple().getArch() << std::endl; | ||
+ std::cout << "getTriple().getVendorName(): " << getTriple().getVendorName() << std::endl; | ||
+ std::cout << "getTriple().isAndroid(): " << getTriple().isAndroid() << std::endl; | ||
+ std::cout << "getTriple().getArchName(): " << getTriple().getArchName() << std::endl; | ||
+ std::cout << "getTriple().getOSName(): " << getTriple().getOSName() << std::endl; | ||
+ std::cout << "getTriple().getOS(): " << getTriple().getOS() << std::endl; | ||
+ std::cout << "getTriple().getOSMajorVersion(): " << getTriple().getOSMajorVersion() << std::endl; | ||
+ std::cout << "getTriple().getOSMinorVersion(): " << getTriple().getOSMinorVersion() << std::endl; | ||
+ | ||
if (getTriple().isAndroid()) | ||
return "lld"; | ||
+ // Check for Amazon Linux and default to lld | ||
+ if (getTriple().getVendorName() == "amazon") { | ||
+ std::cout << "We are using Amazon Linux so default to lld\n"; | ||
+ return "lld"; | ||
+ } | ||
|
||
switch (getTriple().getArch()) { | ||
case llvm::Triple::arm: |