Skip to content

Commit 5598c0d

Browse files
committed
CMake: use -O1 instead of -O2 for building generated .c code
Idea here is that this is a sweet spot of not wasting time waiting for optimizations but also getting decent runime performance.
1 parent 816b907 commit 5598c0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -713,8 +713,8 @@ if(MSVC)
713713
set(ZIG2_COMPILE_FLAGS "/std:c99")
714714
set(ZIG2_LINK_FLAGS "/STACK:16777216")
715715
else()
716-
set(ZIG1_COMPILE_FLAGS "-std=c99 -O2 -march=native")
717-
set(ZIG2_COMPILE_FLAGS "-std=c99 -O2 -march=native")
716+
set(ZIG1_COMPILE_FLAGS "-std=c99 -O1 -march=native")
717+
set(ZIG2_COMPILE_FLAGS "-std=c99 -O1 -march=native")
718718
set(ZIG2_LINK_FLAGS "-Wl,-z,stack-size=0x10000000")
719719
endif()
720720

0 commit comments

Comments
 (0)