Rebased LTO fix for coroutines

Fixes: lp:1793329
* https://bugs.launchpad.net/kicad/+bug/1793329
This commit is contained in:
Stefan Hamminga 2019-07-25 16:19:46 +03:00 committed by Seth Hillbrand
parent bd8721d6b9
commit e58d9606dd
1 changed files with 8 additions and 0 deletions

View File

@ -359,6 +359,14 @@ if( BUILD_GITHUB_PLUGIN )
)
endif()
# Link-time optimization (LTO) on GCC conflicts with embedded assembly (__asm),
# following GCC's recommendation to disable LTO per translation unit.
if( "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
set_source_files_properties( system/libcontext.cpp PROPERTIES
COMPILE_FLAGS "-fno-lto"
)
endif()
set( COMMON_SRCS
${COMMON_SRCS}
system/libcontext.cpp