aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2024-10-28 07:17:19 -0700
committerGitHub <noreply@github.com>2024-10-28 07:17:19 -0700
commitd4c41804175e9cb37266c410cafe9caaac1819ca (patch)
tree4e6ff27c346098a13fecc3d10159102201a6a64d /flang/lib/Frontend/CompilerInvocation.cpp
parent7152bf3bc805b8d9b1873058ab0a084d7b6079d6 (diff)
downloadllvm-d4c41804175e9cb37266c410cafe9caaac1819ca.zip
llvm-d4c41804175e9cb37266c410cafe9caaac1819ca.tar.gz
llvm-d4c41804175e9cb37266c410cafe9caaac1819ca.tar.bz2
[Clang] Add a flag to include GPU startup files (#112025)
Summary: The C library for GPUs provides the ability to target regular C/C++ programs by providing the C library and a file containing kernels that call the `main` function. This is mostly used for unit tests, this patch provides a quick way to add them without needing to know the paths. I currently do this explicitly, but according to the libc++ contributors we don't want to need to specify these paths manually. See the discussion in https://github.com/llvm/llvm-project/pull/104515. I just default to `lib/` if the target-specific one isn't found because the linker will handle giving a reasonable error message if it's not found. Basically the use-case looks like this. ```console $ clang test.c --target=amdgcn-amd-amdhsa -mcpu=native -startfiles -stdlib $ amdhsa-loader a.out PASS! ```
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions