From 871d675c52ca4e2fad51aa90dd065d4f12229f06 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 27 Mar 2026 14:28:25 -0500 Subject: [PATCH] [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. --- compiler-rt/lib/profile/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/profile/CMakeLists.txt b/compiler-rt/lib/profile/CMakeLists.txt index 86328b4c1392..8c196d15841a 100644 --- a/compiler-rt/lib/profile/CMakeLists.txt +++ b/compiler-rt/lib/profile/CMakeLists.txt @@ -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()