File openmp-optional-nvidia-bc-lib.patch of Package rocm-llvm
diff --git a/openmp/libomptarget/DeviceRTL/CMakeLists.txt b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
index 52b0425ab..94905df65 100644
--- a/openmp/libomptarget/DeviceRTL/CMakeLists.txt
+++ b/openmp/libomptarget/DeviceRTL/CMakeLists.txt
@@ -64,7 +64,11 @@ set(all_amdgpu_architectures "gfx700;gfx701;gfx801;gfx803;gfx900;gfx902;gfx906"
set(all_nvptx_architectures "sm_35;sm_37;sm_50;sm_52;sm_53;sm_60;sm_61;sm_62"
"sm_70;sm_72;sm_75;sm_80;sm_86;sm_87;sm_89;sm_90")
set(all_gpu_architectures
- "${all_amdgpu_architectures};${all_nvptx_architectures}")
+ "${all_amdgpu_architectures}")
+if(LIBOMPTARGET_NVPTX_ENABLE_BCLIB)
+ set(all_gpu_architectures
+ "${all_gpu_architectures};${all_nvptx_architectures}")
+endif()
# AMD internal build scripts use LIBOMPTARGET_AMDGCN_GFXLIST
if(DEFINED LIBOMPTARGET_AMDGCN_GFXLIST)