Created attachment 222343 [details] patch This patch adds option for using LTO.
I'm certainly not opposed, but I'm just surprised that LTO would make much difference in a text editor that spends most of its time either IO-bound or waiting for keystrokes. Do you find a noticeable change with this enabled?
Created attachment 222345 [details] patch Corrected patch. I actually don't use neovim. I just noticed that FreeBSD ports in general have poor support for LTO and want to add support for that. I think it actually might make a difference when used with large files.
It looks like neovim actually enables it by default: CMakeLists.txt: if (MINGW) # Disable LTO by default as it may not compile # See https://github.com/Alexpux/MINGW-packages/issues/3516 # and https://github.com/neovim/neovim/pull/8654#issuecomment-402316672 option(ENABLE_LTO "enable link time optimization" OFF) else() option(ENABLE_LTO "enable link time optimization" ON) endif()
I'm closing out this PR, as it looks like neovim already does this.