[all-commits] [llvm/llvm-project] 6ff86f: [AMDGPU] Use the AMDGPUToolChain when targeting C/...
Joseph Huber via All-commits
all-commits at lists.llvm.org
Mon Jan 27 08:35:50 PST 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6ff86f2c0a5b58b07921ee895f0d16d8cd3d4015
https://github.com/llvm/llvm-project/commit/6ff86f2c0a5b58b07921ee895f0d16d8cd3d4015
Author: Joseph Huber <huberjn at outlook.com>
Date: 2025-01-27 (Mon, 27 Jan 2025)
Changed paths:
M clang/lib/Driver/Driver.cpp
M clang/test/Driver/amdgpu-toolchain.c
Log Message:
-----------
[AMDGPU] Use the AMDGPUToolChain when targeting C/C++ directly (#99687)
Summary:
The `getToolChain` pass uses the triple to determine which toolchain to
create. Currently the `amdgcn-amd-amdhsa` triple maps to the
`ROCmToolChain` which uses things expected to be provided by `ROCm`.
This is neded for OpenCL, but directly targeting C++ does not want this
since it's primarily being used for creating GPU runtime code. As far as
I know I'm the only user of this, so this shouldn't change anything.
Unfortunately, there's no good logic for detercting this, so I simply
checked ahead of time if the input is either `foo.cl` or `-x cl foo.c`
to choose between the two. This allows us to use the AMDGPU target
normally, as otherwise it will error without passing `-nogpulib`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list