[compiler-rt] Add PTX feature specifically when CUDA is not available (#189083)

Summary:
People need to be able to build this without a CUDA installation.

Long term we should bump up the minimum version as I'm pretty sure every
architecture before this has been deprecated by NVIDIA.
This commit is contained in:
Joseph Huber 2026-03-27 14:28:25 -05:00 committed by GitHub
parent df6d6c9cd1
commit 871d675c52
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -162,6 +162,8 @@ if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "amdgcn|nvptx")
if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "amdgcn")
append_list_if(COMPILER_RT_HAS_CODE_OBJECT_VERSION_FLAG
"SHELL:-Xclang -mcode-object-version=none" EXTRA_FLAGS)
elseif("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "nvptx")
list(APPEND EXTRA_FLAGS --cuda-feature=+ptx63)
endif()
endif()