Skip to content

Commit daa755b

Browse files
authored
[libc] Disable testing for NVPTX debug builds (#86856)
Summary: Debug builds don't optimize out certain parts of the code that end up making the GPU backend crash. This results in regular builds not being successful just to build the testing objects. Disable them for now in debug mode.
1 parent 9d61f7e commit daa755b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

libc/cmake/modules/prepare_libc_gpu_build.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ else()
9393
endif()
9494
set(LIBC_GPU_TARGET_ARCHITECTURE "${gpu_test_architecture}")
9595

96+
# The NVPTX backend cannot currently handle objects created in debug mode.
97+
if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
98+
set(LIBC_GPU_TESTS_DISABLED TRUE)
99+
endif()
100+
96101
# Identify the GPU loader utility used to run tests.
97102
set(LIBC_GPU_LOADER_EXECUTABLE "" CACHE STRING "Executable for the GPU loader.")
98103
if(LIBC_GPU_LOADER_EXECUTABLE)

0 commit comments

Comments
 (0)