diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-04-11 21:25:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 21:25:23 +0200 |
commit | f4136c9d42f79c0f2fe3ce6fdc22b1544593692a (patch) | |
tree | 599134238bc30f4b9a02fe7e424ef54ede4ed405 | |
parent | 880f7d12fea31ea85d14b419ef8dcbb16dee2cf4 (diff) | |
download | rneovim-f4136c9d42f79c0f2fe3ce6fdc22b1544593692a.tar.gz rneovim-f4136c9d42f79c0f2fe3ce6fdc22b1544593692a.tar.bz2 rneovim-f4136c9d42f79c0f2fe3ce6fdc22b1544593692a.zip |
build: use -O3 optimization for release builds
Compilers have much more reliable -O3 output these days, so this
workaround is likely not needed.
Closes https://github.com/neovim/neovim/issues/23008.
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bfc8a2283f..dad3815373 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,14 +114,7 @@ set(NVIM_API_LEVEL 11) # Bump this after any API change. set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change. set(NVIM_API_PRERELEASE false) -# 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() - # Build-type: RelWithDebInfo - # /Og means something different in MSVC if(CMAKE_C_COMPILER_ID MATCHES "GNU" OR CMAKE_C_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -Og -g") |