diff options
author | Joseph Huber <huberjn@outlook.com> | 2024-03-04 17:38:42 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-04 17:38:42 -0600 |
commit | 07b1aebced8015c62d4ce0afe07358049afae5b1 (patch) | |
tree | 2eef857e4dc7ca5b47585f1bd89264026c54ad24 /runtimes | |
parent | 40081a45a14f7aa6249fa034d961549c0b1762a0 (diff) | |
download | llvm-07b1aebced8015c62d4ce0afe07358049afae5b1.zip llvm-07b1aebced8015c62d4ce0afe07358049afae5b1.tar.gz llvm-07b1aebced8015c62d4ce0afe07358049afae5b1.tar.bz2 |
[LLVM][NFC] Ignore including the GNUInstallDirs on the GPU (#83910)
Summary:
I've begun treating GPU runtimes builds as cross-compiling with the LLVM
infrastructure. However, we include a lot of random stuff that the GPU
build isn't prepared to handle. This currently emits a warning, and
while it's not striclty necessary, is annoying. This patch suppresses it
by not including the standard GNU install directory resources when used
from the GPU.
Diffstat (limited to 'runtimes')
-rw-r--r-- | runtimes/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/runtimes/CMakeLists.txt b/runtimes/CMakeLists.txt index 634ffe7..29b47b8 100644 --- a/runtimes/CMakeLists.txt +++ b/runtimes/CMakeLists.txt @@ -151,6 +151,12 @@ endif() # Avoid checking whether the compiler is working. set(LLVM_COMPILER_CHECKED ON) +# This can be used to detect whether we're targeting a GPU architecture. +if("${LLVM_RUNTIMES_TARGET}" MATCHES "^amdgcn" OR + "${LLVM_RUNTIMES_TARGET}" MATCHES "^nvptx64") + set(LLVM_RUNTIMES_GPU_BUILD ON) +endif() + # Handle common options used by all runtimes. include(AddLLVM) include(HandleLLVMOptions) |