build: remove -O2 from gen_cflags

Problem:
zig cc implicitly defines NDEBUG with -O2. This breaks debug builds
which does not include -O2 or NDEBUG.

Solution:
Do not add -O2 when generating header files.
This commit is contained in:
Lewis Russell 2024-07-07 17:37:56 +01:00 committed by Lewis Russell
parent 5b778a64ec
commit e5ff302033

View File

@ -482,7 +482,6 @@ endif()
if(MSVC)
list(APPEND gen_cflags -wd4003)
endif()
list(APPEND gen_cflags -O2)
set(NVIM_VERSION_GIT_H ${PROJECT_BINARY_DIR}/cmake.config/auto/versiondef_git.h)
add_custom_target(update_version_stamp