[Openmp-commits] [openmp] 72995a4 - [libomptarget][nfc] Add hook to easily disable building amdgcn bclib
Jon Chesterfield via Openmp-commits
openmp-commits at lists.llvm.org
Tue May 11 09:23:19 PDT 2021
Author: Jon Chesterfield
Date: 2021-05-11T17:23:09+01:00
New Revision: 72995a4bdf7d95887883ccfa04567b723f2b342a
URL: https://github.com/llvm/llvm-project/commit/72995a4bdf7d95887883ccfa04567b723f2b342a
DIFF: https://github.com/llvm/llvm-project/commit/72995a4bdf7d95887883ccfa04567b723f2b342a.diff
LOG: [libomptarget][nfc] Add hook to easily disable building amdgcn bclib
[libomptarget][nfc] Add hook to easily disable building amdgcn bclib
This is useful when building LLVM with a toolchain that can't emit code
for amdgcn, e.g. because it overrides the include search path with headers
from another architecture, or the clang compiler is missing builtins.
Reviewed By: tianshilei1992
Differential Revision: https://reviews.llvm.org/D102229
Added:
Modified:
openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
Removed:
################################################################################
diff --git a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
index c6183c56c9da6..63c1ce201af86 100644
--- a/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
+++ b/openmp/libomptarget/deviceRTLs/amdgcn/CMakeLists.txt
@@ -6,10 +6,18 @@
#
##===----------------------------------------------------------------------===##
#
-# Build the AMDGCN Device RTL if the ROCM tools are available
+# Build the AMDGCN Device RTL bitcode library using clang -ffreestanding
#
##===----------------------------------------------------------------------===##
+set(LIBOMPTARGET_BUILD_AMDGCN_BCLIB TRUE CACHE BOOL
+ "Can be set to false to disable building this library.")
+
+if (NOT LIBOMPTARGET_BUILD_AMDGCN_BCLIB)
+ libomptarget_say("Not building AMDGCN device RTL: Disabled by LIBOMPTARGET_BUILD_AMDGCN_BCLIB")
+ return()
+endif()
+
# Copied from nvptx CMakeLists
if(CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "x86_64")
set(aux_triple x86_64-unknown-linux-gnu)
More information about the Openmp-commits
mailing list