mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Windows - Fix CMAKE_INTERPROCEDURAL_OPTIMIZATION build with MSVC
If IPO is enabled, MSVC compiles with /GL which is not compatible with cmake's WINDOWS_EXPORT_ALL_SYMBOLS. Since server.dll can't autoexport symbols from /GL compiled objects, IPO must be disabled for dbug, string,mysys, and sql targets (in case we build "plugin" DLLs that need server.dll's symbols)
This commit is contained in:
@@ -368,7 +368,12 @@ ENDFUNCTION()
|
||||
# for some static libraries.
|
||||
|
||||
FUNCTION (MAYBE_DISABLE_IPO target)
|
||||
IF(MSVC AND NOT CLANG_CL)
|
||||
SET_TARGET_PROPERTIES(${target} PROPERTIES INTERPROCEDURAL_OPTIMIZATION OFF)
|
||||
IF(MSVC AND (NOT CLANG_CL) AND (NOT WITHOUT_DYNAMIC_PLUGINS))
|
||||
SET_TARGET_PROPERTIES(${target} PROPERTIES
|
||||
INTERPROCEDURAL_OPTIMIZATION OFF
|
||||
INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELEASE OFF
|
||||
INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO OFF
|
||||
INTERPROCEDURAL_OPTIMIZATION_MINSIZEREL OFF)
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
Reference in New Issue
Block a user