From 54b960aa4dc335a9f9c6985ac869dd88fdf2321a Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 4 Dec 2022 17:15:53 -0700 Subject: [PATCH] CMake: add the bracket-depth workaround for zig1 --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index fafdee7d19..31903cb4ff 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -717,6 +717,9 @@ else() set(ZIG_WASM2C_COMPILE_FLAGS "-std=c99 -O2") set(ZIG1_COMPILE_FLAGS "-std=c99 -Os") set(ZIG2_COMPILE_FLAGS "-std=c99 -O0") + if(CMAKE_C_COMPILER_ID MATCHES "Clang") + set(ZIG1_COMPILE_FLAGS "${ZIG1_COMPILE_FLAGS} -fbracket-depth=512") + endif() set(ZIG2_LINK_FLAGS "-Wl,-z,stack-size=0x10000000") endif()