diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-07-03 13:27:56 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-07-04 15:11:39 +0200 |
commit | 7e099cf3eb1fd338a3aa50cf23f1b0a1f461f988 (patch) | |
tree | e0afbac5044cfd360e5274fc830f722417030796 | |
parent | 8a338c0ccc1cf874cd21ca3be6695c253079bd9a (diff) | |
download | rneovim-7e099cf3eb1fd338a3aa50cf23f1b0a1f461f988.tar.gz rneovim-7e099cf3eb1fd338a3aa50cf23f1b0a1f461f988.tar.bz2 rneovim-7e099cf3eb1fd338a3aa50cf23f1b0a1f461f988.zip |
build(macos): disable deduplication in link step
Problem: Apple Clang 16 comes with a new deduplication algorithm that is
enabled by default in release builds (https://developer.apple.com/documentation/xcode-release-notes/xcode-16-release-notes#New-Features-in-Xcode-16-Beta) which breaks the built
nvim binary (locks and spins at 100% CPU).
Solution: Disable deduplication on macOS. Tested on Clang 15 as well and
seems to make no difference to binary size anyway.
-rw-r--r-- | src/nvim/CMakeLists.txt | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 56a09ec734..9c8fc7a413 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -160,6 +160,9 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin") # ENABLE_EXPORTS is set to true. See # https://github.com/neovim/neovim/issues/25295 target_link_options(nvim_bin PRIVATE "-Wl,-export_dynamic") + # Apple Clang 16's new deduplication pass leads to lock-up on start + # TODO(clason): verify that problem remains after release or remove + target_link_options(nvim_bin PRIVATE "-Wl,-no_deduplicate") elseif(CMAKE_SYSTEM_NAME MATCHES "OpenBSD") target_link_libraries(main_lib INTERFACE pthread c++abi) elseif(CMAKE_SYSTEM_NAME STREQUAL "SunOS") |