[libc-commits] [libc] 1c968f7 - [libc] Ignore unknown CUDA versions for `libc` targeting NVPTX
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Fri Apr 21 11:27:57 PDT 2023
Author: Joseph Huber
Date: 2023-04-21T13:27:45-05:00
New Revision: 1c968f7a1f9320416d6ec678a50bd570dce89f0f
URL: https://github.com/llvm/llvm-project/commit/1c968f7a1f9320416d6ec678a50bd570dce89f0f
DIFF: https://github.com/llvm/llvm-project/commit/1c968f7a1f9320416d6ec678a50bd570dce89f0f.diff
LOG: [libc] Ignore unknown CUDA versions for `libc` targeting NVPTX
Summary:
We generally need a CUDA toolchain to build the tests for the GPU `libc`
targeting NVPTX. However, clang will commonly emit warnings on versions
that are too new. We can ignore these in `libc` since we are manually
specifying the `+ptx` version to use whenever we compile. So we do not
need to worry about unexpected changes and we do not depend on any newer
features. So this should not be problematic.
Added:
Modified:
libc/cmake/modules/LLVMLibCObjectRules.cmake
Removed:
################################################################################
diff --git a/libc/cmake/modules/LLVMLibCObjectRules.cmake b/libc/cmake/modules/LLVMLibCObjectRules.cmake
index c3fe7982011c..3a1475d3807c 100644
--- a/libc/cmake/modules/LLVMLibCObjectRules.cmake
+++ b/libc/cmake/modules/LLVMLibCObjectRules.cmake
@@ -74,6 +74,7 @@ endfunction()
function(get_nvptx_compile_options output_var gpu_arch)
set(nvptx_options "")
list(APPEND nvptx_options "-march=${gpu_arch}")
+ list(APPEND nvptx_options "-Wno-unknown-cuda-version")
if(${gpu_arch} STREQUAL "sm_35")
list(APPEND nvptx_options "--cuda-feature=+ptx60")
elseif(${gpu_arch} STREQUAL "sm_37")
More information about the libc-commits
mailing list