aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Huber <huberjn@outlook.com>2024-03-28 06:49:15 -0500
committerGitHub <noreply@github.com>2024-03-28 06:49:15 -0500
commitdaa755ba7b7fe11e078f1e6f43d446234023f859 (patch)
treea0cda52a91dc5174f421f92dda71bf5143337d73
parent9d61f7ea660bc4087763e679a7f2b87c50cca108 (diff)
downloadllvm-daa755ba7b7fe11e078f1e6f43d446234023f859.zip
llvm-daa755ba7b7fe11e078f1e6f43d446234023f859.tar.gz
llvm-daa755ba7b7fe11e078f1e6f43d446234023f859.tar.bz2
[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.
-rw-r--r--libc/cmake/modules/prepare_libc_gpu_build.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/libc/cmake/modules/prepare_libc_gpu_build.cmake b/libc/cmake/modules/prepare_libc_gpu_build.cmake
index bea6bb01..20aca16 100644
--- a/libc/cmake/modules/prepare_libc_gpu_build.cmake
+++ b/libc/cmake/modules/prepare_libc_gpu_build.cmake
@@ -93,6 +93,11 @@ else()
endif()
set(LIBC_GPU_TARGET_ARCHITECTURE "${gpu_test_architecture}")
+# The NVPTX backend cannot currently handle objects created in debug mode.
+if(LIBC_TARGET_ARCHITECTURE_IS_NVPTX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+ set(LIBC_GPU_TESTS_DISABLED TRUE)
+endif()
+
# Identify the GPU loader utility used to run tests.
set(LIBC_GPU_LOADER_EXECUTABLE "" CACHE STRING "Executable for the GPU loader.")
if(LIBC_GPU_LOADER_EXECUTABLE)