summaryrefslogtreecommitdiff
path: root/sql/CMakeLists.txt
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2020-05-04 14:17:06 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2020-05-04 14:17:06 +0200
commitd50f776930425e540678238798b4f7666b9cbb76 (patch)
tree63e5c65d22496bc4e8ed35ab04de0251e6711c96 /sql/CMakeLists.txt
parentf544a712c8a2ef3f3ecba80cb2782b1839fb36ab (diff)
downloadmariadb-git-d50f776930425e540678238798b4f7666b9cbb76.tar.gz
MDEV-22454 Allow -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=ON
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.
Diffstat (limited to 'sql/CMakeLists.txt')
-rw-r--r--sql/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 76ac07d617a..48985ced09f 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -188,6 +188,7 @@ MYSQL_ADD_PLUGIN(sql_sequence ha_sequence.cc STORAGE_ENGINE MANDATORY STATIC_ONL
RECOMPILE_FOR_EMBEDDED)
ADD_LIBRARY(sql STATIC ${SQL_SOURCE})
+MAYBE_DISABLE_IPO(sql)
DTRACE_INSTRUMENT(sql)
TARGET_LINK_LIBRARIES(sql
mysys mysys_ssl dbug strings vio pcre2-8
@@ -234,13 +235,13 @@ IF(MSVC)
IF(deps)
LIST(APPEND all_deps ${deps})
ENDIF()
- ENDFOREACH()
+ ENDFOREACH()
LIST(REMOVE_DUPLICATES all_deps)
FOREACH(lib ${libs_to_export_symbols})
LIST(REMOVE_ITEM all_deps ${lib})
ENDFOREACH()
- TARGET_LINK_LIBRARIES(server
+ TARGET_LINK_LIBRARIES(server PRIVATE
${all_deps}
sql_builtins
)