You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to compile my CUDA project with LTO enabled I get the error CMAKE doesn't support IPO for current CUDA compiler. In my root CMakeLists.txt file I have the check defined in this way:
cmake_minimum_required(VERSION 3.27...3.31)
if(NOTDEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES 50)
endif()
project(
cuda_path_tracer
VERSION 1.0
LANGUAGES CXX CUDA
)
include(CheckIPOSupported)
check_ipo_supported(RESULT supported OUTPUT error)
if (supported)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
else()
message(WARNING "IPO is not supported: ${error}")
endif()
...
Shouldn't LTO be supported with clang? I am currently using clang20
When trying to compile my CUDA project with LTO enabled I get the error
CMAKE doesn't support IPO for current CUDA compiler
. In my root CMakeLists.txt file I have the check defined in this way:Shouldn't LTO be supported with clang? I am currently using clang20
Edit
I managed to find where in the CMake source code LTO support for CUDA compilation with Clang is unset. Here https://fuchsia.googlesource.com/third_party/github.com/Kitware/CMake/+/refs/heads/main/Modules/Compiler/Clang-CUDA.cmake we see
However, I can't seem to find this mentioned anywhere in the Clang's documentation, is it a feature that is on a roadmap for future Clang releases?
The text was updated successfully, but these errors were encountered: