================
@@ -672,20 +673,34 @@ void amdgpu::getAMDGPUTargetFeatures(const Driver &D,
/// AMDGPU Toolchain
AMDGPUToolChain::AMDGPUToolChain(const Driver &D, const llvm::Triple &Triple,
- const ArgList &Args)
+ const ArgList &Args, const ToolChain *HostTC_,
+ Action::OffloadKind Kind,
+ bool ShouldLinkDeviceLibs_)
: Generic_ELF(D, Triple, Args),
OptionsDefault(
- {{options::OPT_O, "3"}, {options::OPT_cl_std_EQ, "CL1.2"}}) {
+ {{options::OPT_O, "3"}, {options::OPT_cl_std_EQ, "CL1.2"}}),
+ HostTC(HostTC_), UseHIPLinker(Kind == Action::OFK_HIP),
+ ShouldLinkDeviceLibs(ShouldLinkDeviceLibs_) {
loadMultilibsFromYAML(Args, D);
// Check code object version options. Emit warnings for legacy options
// and errors for the last invalid code object version options.
// It is done here to avoid repeated warning or error messages for
// each tool invocation.
checkAMDGPUCodeObjectVersion(D, Args);
+
+ if (Triple.getOS() == llvm::Triple::AMDHSA &&
----------------
jhuber6 wrote:
It's the base `--target=amdgcn-amd-amdhsa` path, which is used in the linker
wrapper for all HIP/OpenMP compilations and for the GPU runtime stack. You
might be confusing it with the `int main()` on GPUs that I use to get lit tests
to work on the GPU.
https://github.com/llvm/llvm-project/pull/204863
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits