diff options
author | dundargoc <gocdundar@gmail.com> | 2023-09-20 23:31:37 +0200 |
---|---|---|
committer | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-09-21 22:08:13 +0200 |
commit | c1ff21666862237d41d80c4a07529457439380ad (patch) | |
tree | aa43e76df783bda7e8881ba742933b642091bd85 | |
parent | 5e43a4ce4d973677172519a50e4f6f49e6dd4a2b (diff) | |
download | rneovim-c1ff21666862237d41d80c4a07529457439380ad.tar.gz rneovim-c1ff21666862237d41d80c4a07529457439380ad.tar.bz2 rneovim-c1ff21666862237d41d80c4a07529457439380ad.zip |
build: actually export symbols on mac
If `-export_dynamic` is not passed to the linker, then Link Time
Optimization may inline and remove global functions even though
ENABLE_EXPORTS is set to true.
Closes https://github.com/neovim/neovim/issues/25295.
Closes https://github.com/kevinhwang91/nvim-ufo/issues/162.
Closes https://github.com/neovim/neovim/issues/25295.
Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
-rw-r--r-- | src/nvim/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 94e5e6ee28..db79de63cc 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -230,6 +230,11 @@ if(WIN32) endif() elseif(APPLE) target_link_libraries(nvim PRIVATE "-framework CoreServices") + + # Actually export symbols - symbols may not be visible even though + # ENABLE_EXPORTS is set to true. See + # https://github.com/neovim/neovim/issues/25295 + set_target_properties(nvim PROPERTIES LINK_FLAGS "-Wl,-export_dynamic") endif() if(UNIX) |