[LinkerWrapper] Fix 'save-temps' when targeting SPIR-V (#144605)
Summary: The logic here is flawed, it was only intended to apply to the CPU case where we use the linker passed in on the command line. This was falsely applying to SPIR-V which caused issues.
This commit is contained in:
@@ -268,7 +268,8 @@ Expected<std::string> findProgram(StringRef Name, ArrayRef<StringRef> Paths) {
|
||||
bool linkerSupportsLTO(const ArgList &Args) {
|
||||
llvm::Triple Triple(Args.getLastArgValue(OPT_triple_EQ));
|
||||
return Triple.isNVPTX() || Triple.isAMDGPU() ||
|
||||
Args.getLastArgValue(OPT_linker_path_EQ).ends_with("lld");
|
||||
(!Triple.isGPU() &&
|
||||
Args.getLastArgValue(OPT_linker_path_EQ).ends_with("lld"));
|
||||
}
|
||||
|
||||
/// Returns the hashed value for a constant string.
|
||||
|
||||
Reference in New Issue
Block a user