[llvm] [LLVM][NFC] Ignore including the GNUInstallDirs on the GPU (PR #83910)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 13:22:25 PST 2024
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/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.
>From 583cd73091a40ae2616f86fe308863c3647b8d12 Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Mon, 4 Mar 2024 15:20:12 -0600
Subject: [PATCH] [LLVM][NFC] Ignore including the GNUInstallDirs on the GPU
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.
---
llvm/cmake/modules/AddLLVM.cmake | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 828de4bd9940d6..07cdd972b151ef 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -1,4 +1,8 @@
-include(GNUInstallDirs)
+if(NOT ("${LLVM_RUNTIMES_TARGET}" MATCHES "^amdgcn" OR
+ "${LLVM_RUNTIMES_TARGET}" MATCHES "^nvptx64"))
+ include(GNUInstallDirs)
+endif()
+
include(LLVMDistributionSupport)
include(LLVMProcessSources)
include(LLVM-Config)
More information about the llvm-commits
mailing list