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:
Andrew Kelley 2022-12-05 15:54:07 -07:00
parent e73170f972
commit aaf95ce849

View File

@ -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")