Skip to content

Commit

Permalink
CMake: use -O1 instead of -O2 for building generated .c code
Browse files Browse the repository at this point in the history
Idea here is that this is a sweet spot of not wasting time waiting for
optimizations but also getting decent runime performance.
  • Loading branch information
andrewrk committed Nov 17, 2022
1 parent 816b907 commit 5598c0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,8 @@ if(MSVC)
set(ZIG2_COMPILE_FLAGS "/std:c99")
set(ZIG2_LINK_FLAGS "/STACK:16777216")
else()
set(ZIG1_COMPILE_FLAGS "-std=c99 -O2 -march=native")
set(ZIG2_COMPILE_FLAGS "-std=c99 -O2 -march=native")
set(ZIG1_COMPILE_FLAGS "-std=c99 -O1 -march=native")
set(ZIG2_COMPILE_FLAGS "-std=c99 -O1 -march=native")
set(ZIG2_LINK_FLAGS "-Wl,-z,stack-size=0x10000000")
endif()

Expand Down

0 comments on commit 5598c0d

Please sign in to comment.