@@ -86,51 +86,9 @@ ToolChain::InvocationInfo toolchains::GenericUnix::constructInvocation(
86
86
87
87
return II;
88
88
}
89
- // Amazon Linux 2023 requires lld as the default linker.
90
- bool isAmazonLinux2023Host () {
91
- std::ifstream file (" /etc/os-release" );
92
- std::string line;
93
-
94
- while (std::getline (file, line)) {
95
- if (line.substr (0 , 12 ) == " PRETTY_NAME=" ) {
96
- if (line.substr (12 ) == " \" Amazon Linux 2023\" " ) {
97
- file.close ();
98
- return true ;
99
- }
100
- }
101
- }
102
- return false ;
103
- }
104
89
105
90
std::string toolchains::GenericUnix::getDefaultLinker () const {
106
- if (getTriple ().isAndroid () || isAmazonLinux2023Host ()
107
- || (getTriple ().isMusl ()
108
- && getTriple ().getVendor () == llvm::Triple::Swift))
109
- return " lld" ;
110
-
111
- switch (getTriple ().getArch ()) {
112
- case llvm::Triple::arm:
113
- case llvm::Triple::aarch64:
114
- case llvm::Triple::aarch64_32:
115
- case llvm::Triple::armeb:
116
- case llvm::Triple::thumb:
117
- case llvm::Triple::thumbeb:
118
- // BFD linker has issues wrt relocation of the protocol conformance
119
- // section on these targets, it also generates COPY relocations for
120
- // final executables, as such, unless specified, we default to gold
121
- // linker.
122
- return " gold" ;
123
- case llvm::Triple::x86:
124
- case llvm::Triple::x86_64:
125
- case llvm::Triple::ppc64:
126
- case llvm::Triple::ppc64le:
127
- case llvm::Triple::systemz:
128
- // BFD linker has issues wrt relocations against protected symbols.
129
- return " gold" ;
130
- default :
131
- // Otherwise, use the default BFD linker.
132
- return " " ;
133
- }
91
+ return " " ;
134
92
}
135
93
136
94
bool toolchains::GenericUnix::addRuntimeRPath (const llvm::Triple &T,
0 commit comments