mirror of
https://github.com/MariaDB/server.git
synced 2025-01-15 19:42:28 +01:00
better disable lto for libmysqld_exports.cc
e.g. also when -flto is set in CMAKE_CXX_FLAGS_RELWITHDEBINFO
This commit is contained in:
parent
bfa15f9b34
commit
3e3fdb25f1
1 changed files with 1 additions and 1 deletions
|
@ -89,7 +89,7 @@ MACRO(CREATE_EXPORTS_FILE VAR TARGET API_FUNCTIONS)
|
|||
CONFIGURE_FILE_CONTENT(${CONTENT} ${EXPORTS})
|
||||
# Avoid "function redeclared as variable" error
|
||||
# when using gcc/clang option -flto(link time optimization)
|
||||
IF(" ${CMAKE_C_FLAGS} ${CMAKE_CXX_FLAGS} " MATCHES " -flto")
|
||||
IF(CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
|
||||
SET_SOURCE_FILES_PROPERTIES(${EXPORTS} PROPERTIES COMPILE_FLAGS "-fno-lto")
|
||||
ENDIF()
|
||||
SET(${VAR} ${EXPORTS})
|
||||
|
|
Loading…
Reference in a new issue