jhuber6 wrote:

> These two commands failed:
> 
> `clang++ -x hip hello.hip --offload-arch=amdgcnspirv -no-use-spirv-backend` 
> `clang++ -x hip hello.hip --offload-arch=amdgcnspirv -use-spirv-backend`

Thanks, can you tell me if this recovers the expected behavior?
```diff
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp 
b/clang/lib/Driver/ToolChains/Clang.cpp
index 5b124ed9f983..c3ccee7f1965 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -9706,7 +9706,7 @@ void LinkerWrapper::ConstructJob(Compilation &C, const 
JobAction &JA,
             options::OPT_fprofile_instr_generate_EQ);
         if (!Args.hasArg(options::OPT_foffload_lto_EQ,
                          options::OPT_fno_offload_lto) &&
-            !UsesProfileGenerate)
+            !UsesProfileGenerate && !TC->getTriple().isSPIRV())
           CmdArgs.push_back("--no-lto");
       }
     }

```

https://github.com/llvm/llvm-project/pull/201457
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to