summaryrefslogtreecommitdiff
path: root/libc/cmake
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-04-21 13:26:13 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-04-21 13:27:45 -0500
commit1c968f7a1f9320416d6ec678a50bd570dce89f0f (patch)
treeced05160e798fc82d0b4baf1105a5399129fca7b /libc/cmake
parenta73cd00d87321a6fb9dc91f952d3ec53b6e4019d (diff)
downloadllvm-1c968f7a1f9320416d6ec678a50bd570dce89f0f.tar.gz
[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.
Diffstat (limited to 'libc/cmake')
-rw-r--r--libc/cmake/modules/LLVMLibCObjectRules.cmake1
1 files changed, 1 insertions, 0 deletions
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")