mirror of
https://github.com/ziglang/zig.git
synced 2026-01-21 06:45:24 +00:00
cmake: disable stack protector for zig2 to avoid link errors on windows
On windows we get:
lld-link: error: undefined symbol: __stack_chk_fail
>>> referenced by CMakeFiles/zig2.dir/zig2.c.obj:(main)
>>> referenced by CMakeFiles/zig2.dir/zig2.c.obj:(main_main)
>>> referenced by CMakeFiles/zig2.dir/zig2.c.obj:(log_scoped_28_default_29_err__anon_2764)
>>> referenced 36192 more times
lld-link: error: undefined symbol: __stack_chk_guard
>>> referenced by CMakeFiles/zig2.dir/zig2.c.obj:(.refptr.__stack_chk_guard)
>>> referenced by CMakeFiles/zig2.dir/compiler_rt.c.obj
This commit is contained in:
parent
2a3d9c321e
commit
a0a2e75773
@ -730,7 +730,7 @@ if(MSVC)
|
||||
else()
|
||||
set(ZIG_WASM2C_COMPILE_FLAGS "-std=c99 -O2")
|
||||
set(ZIG1_COMPILE_FLAGS "-std=c99 -Os")
|
||||
set(ZIG2_COMPILE_FLAGS "-std=c99 -O0")
|
||||
set(ZIG2_COMPILE_FLAGS "-std=c99 -O0 -fno-stack-protector")
|
||||
if(APPLE)
|
||||
set(ZIG2_LINK_FLAGS "-Wl,-stack_size,0x10000000")
|
||||
else()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user