================ @@ -288,18 +258,11 @@ function(compileDeviceRTLLibrary target_cpu target_name target_triple) endif() endfunction() -# Generate a Bitcode library for all the gpu architectures the user requested. -add_custom_target(omptarget.devicertl.nvptx) add_custom_target(omptarget.devicertl.amdgpu) -foreach(gpu_arch ${LIBOMPTARGET_DEVICE_ARCHITECTURES}) - if("${gpu_arch}" IN_LIST all_amdgpu_architectures) - compileDeviceRTLLibrary(${gpu_arch} amdgpu amdgcn-amd-amdhsa -Xclang -mcode-object-version=none) - elseif("${gpu_arch}" IN_LIST all_nvptx_architectures) - compileDeviceRTLLibrary(${gpu_arch} nvptx nvptx64-nvidia-cuda --cuda-feature=+ptx63) - else() - message(FATAL_ERROR "Unknown GPU architecture '${gpu_arch}'") - endif() -endforeach() +compileDeviceRTLLibrary(amdgpu amdgcn-amd-amdhsa -Xclang -mcode-object-version=none) + +add_custom_target(omptarget.devicertl.nvptx) +compileDeviceRTLLibrary(nvptx nvptx64-nvidia-cuda --cuda-feature=+ptx63) ---------------- mgorny wrote:
Ok, so it's not accidental/obsolete — that's all I needed to know :-). Another thing I've noticed that clang needs `libomptarget.devicertl.a` even when no GPU target is actually used. I've worked around that for now by creating an empty `.a` file locally, but perhaps that should also be handled better somehow (I can make a PR later if you tell me how you'd like it handled). https://github.com/llvm/llvm-project/pull/119091 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits