neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

commit 7e099cf3eb1fd338a3aa50cf23f1b0a1f461f988
parent 8a338c0ccc1cf874cd21ca3be6695c253079bd9a
Author: Christian Clason <c.clason@uni-graz.at>
Date:   Wed,  3 Jul 2024 13:27:56 +0200

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.

Diffstat:
Msrc/nvim/CMakeLists.txt | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git 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")