mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-22454
Disable IPO (interprocedural optimization, aka /GL) on Windows on libraries, from which server.dll exports symbols - exporting symbols does not work for objects compiled with /GL.
This commit is contained in:
@@ -330,3 +330,15 @@ FUNCTION(RESTRICT_SYMBOL_EXPORTS target)
|
||||
COMPILE_FLAGS "${COMPILE_FLAGS} ${VISIBILITY_HIDDEN_FLAG}")
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
||||
# The MSVC /GL flag, used for link-time code generation
|
||||
# creates objects files with a format not readable by tools
|
||||
# i.e exporting all symbols is not possible with IPO
|
||||
# To workaround this, we disable INTERPROCEDURAL_OPTIMIZATION
|
||||
# for some static libraries.
|
||||
|
||||
FUNCTION (MAYBE_DISABLE_IPO target)
|
||||
IF(MSVC AND NOT CLANG_CL)
|
||||
SET_TARGET_PROPERTIES(${target} PROPERTIES INTERPROCEDURAL_OPTIMIZATION OFF)
|
||||
ENDIF()
|
||||
ENDFUNCTION()
|
||||
|
Reference in New Issue
Block a user