You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-editors/neovim/files/neovim-9999-cmake-release-t...

29 lines
1.1 KiB

Ensure that :checkhealth is happy with the Gentoo build type.
https://bugs.gentoo.org/757744
--- a/runtime/lua/nvim/health.lua
+++ b/runtime/lua/nvim/health.lua
@@ -149,7 +149,7 @@ local function check_performance()
let s:buildtype = matchstr(execute('version'), '\v\cbuild type:?\s*[^\n\r\t ]+')
if empty(s:buildtype)
call health#report_error('failed to get build type from :version')
- elseif s:buildtype =~# '\v(MinSizeRel|Release|RelWithDebInfo)'
+ elseif s:buildtype =~# '\v(MinSizeRel|Release|RelWithDebInfo|Gentoo)'
call health#report_ok(s:buildtype)
else
call health#report_info(s:buildtype)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -137,12 +137,6 @@ else()
message(STATUS "MIN_LOG_LEVEL=${MIN_LOG_LEVEL}")
endif()
-# Default to -O2 on release builds.
-if(CMAKE_C_FLAGS_RELEASE MATCHES "-O3")
- message(STATUS "Replacing -O3 in CMAKE_C_FLAGS_RELEASE with -O2")
- string(REPLACE "-O3" "-O2" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
-endif()
-
if(CMAKE_C_COMPILER_ID MATCHES "GNU")
check_c_compiler_flag(-Og HAS_OG_FLAG)
else()