mirror of
https://github.com/ziglang/zig.git
synced 2024-11-26 23:22:44 +00:00
CMake: adjust apple clang compiler check
Before it was checking if the compiler was AppleClang, however, this did not handle the case when using a compiled-from-source Clang on a macOS computer, in which case the linker is still Apple ld64, and it is in fact the linker that needs to have the different flag to communicate stack size.
This commit is contained in:
parent
e73170f972
commit
aaf95ce849
@ -731,7 +731,7 @@ 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 STREQUAL "AppleClang")
|
||||
if(APPLE)
|
||||
set(ZIG2_LINK_FLAGS "-Wl,-stack_size,0x10000000")
|
||||
else()
|
||||
set(ZIG2_LINK_FLAGS "-Wl,-z,stack-size=0x10000000")
|
||||
|
Loading…
Reference in New Issue
Block a user