aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorFraser Cormack <fraser@codeplay.com>2025-08-04 15:37:22 +0100
committerGitHub <noreply@github.com>2025-08-04 15:37:22 +0100
commitdf7473673214b063f7ca5d726263c5089f193ffd (patch)
tree536f9ad2adbef80aaa81e44b252fbddd818a3160 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parent6de745b5473f4ae206110c497f28f040ea317d31 (diff)
downloadllvm-df7473673214b063f7ca5d726263c5089f193ffd.zip
llvm-df7473673214b063f7ca5d726263c5089f193ffd.tar.gz
llvm-df7473673214b063f7ca5d726263c5089f193ffd.tar.bz2
[clang] Add the ability to link libclc OpenCL libraries (#146503)
This commit adds driver support for linking libclc OpenCL libraries. It takes the form of a new optional flag: --libclc-lib=namespec. Nothing is linked unless this flag is specified. Not all libclc targets have corresponding clang targets. For this reason it is desirable for users to be able to specify a libclc library name. We support this by taking both a library name (without the .bc suffix) or a filename. Both of these are searched for in the clang resource directory. Filenames are also checked themselves so that absolute paths can be provided. The syntax for specifying filenames (as opposed to library names) uses a leading colon (:), inspired by the -l option. To accommodate this option, libclc libraries are now placed into clang's resource directory in an in-tree configuration. The libraries are all placed in <resource-dir>/lib/libclc and are not grouped under host-specific directories as some other runtime libraries are; it is not expected that OpenCL libraries will differ depending on the host toolchain. Currently only the AMDGPU toolchain supports this option as a proof of concept. Other targets such as NVPTX or SPIR/SPIR-V could support it too. We could optionally let target toolchains search for libclc libraries themselves, possibly when passed an empty --libclc-lib.
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions