Fix compilation with LTO on GCC

This commit is contained in:
Ziemas 2021-10-24 22:11:38 +02:00 committed by refractionpcsx2
parent 0fa620e3ba
commit 7a4191e16d
1 changed files with 5 additions and 0 deletions

View File

@ -170,6 +170,11 @@ else()
endif()
endif()
if (USE_GCC AND CMAKE_INTERPROCEDURAL_OPTIMIZATION)
# GCC LTO doesn't work with asm statements
set_source_files_properties(FastJmp.cpp PROPERTIES COMPILE_FLAGS -fno-lto)
endif()
target_link_libraries(common PRIVATE ${LIBC_LIBRARIES} PUBLIC wxWidgets::all glad)
target_compile_features(common PUBLIC cxx_std_17)
target_include_directories(common PUBLIC ../3rdparty/include ../)