Skip to content
Snippets Groups Projects
Commit ac305d3d authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Disabled link-time optimizations for Debug build with GCC

They lead to internal compiler error in some cases.
parent 252e4e66
No related branches found
No related tags found
No related merge requests found
......@@ -105,8 +105,10 @@ endif()
# enable link time optimizations (but not in continuous integration)
if( NOT DEFINED ENV{CI_JOB_NAME} )
if( CMAKE_CXX_COMPILER_ID STREQUAL "GNU" )
add_compile_options( "-flto" )
add_link_options( "-flto" )
# LTO with GCC 9.1.0 and Debug build = internal compiler error
# LTO with GCC 9.1.0 and nvcc 10.1 and Release build = fatal error: bytecode stream in file `blabla` generated with LTO version 7.1 instead of the expected 8.0
# add_compile_options( "-flto" )
# add_link_options( "-flto" )
elseif( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" )
add_compile_options( "-flto=thin" )
add_link_options( "-flto=thin" )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment