authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-12-05 15:54:07-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-12-06 12:15:05-07:00
logaaf95ce849e7ae22a838aad5eac3dd5754a925cd
tree02b3503aba51e044ab46d35b9318fb7f775867a6
parente73170f9725c530befc688dd40053022072f5058

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.

1 files changed, 1 insertions(+), 1 deletions(-)

CMakeLists.txt+1-1
......@@ -731,7 +731,7 @@ else()
731731 set(ZIG_WASM2C_COMPILE_FLAGS "-std=c99 -O2")
732732 set(ZIG1_COMPILE_FLAGS "-std=c99 -Os")
733733 set(ZIG2_COMPILE_FLAGS "-std=c99 -O0")
734 if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang")
734 if(APPLE)
735735 set(ZIG2_LINK_FLAGS "-Wl,-stack_size,0x10000000")
736736 else()
737737 set(ZIG2_LINK_FLAGS "-Wl,-z,stack-size=0x10000000")