zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit eef780ebf2299181ec182470aa057d77a065ff13 (tree)
parent 33e3db11fece0a60b226f5d301657ce4294e4ab5
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Thu, 17 Nov 2022 00:57:05 -0700

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.

Diffstat:
MCMakeLists.txt | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -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()