mirror of
https://github.com/jerryscript-project/jerryscript.git
synced 2025-12-15 16:29:21 +00:00
cmake: avoid Apple ranlib flags when not using AppleClang (#5258)
On macOS, `-no_warning_for_no_symbols -c` options are specific to the Apple `ranlib` tool. When using other toolchains (e.g. Homebrew clang), these flags cause errors since `llvm-ranlib` does not recognize them. The patch ensures these flags are only passed when using AppleClang. JerryScript-DCO-1.0-Signed-off-by: Renata Hodovan reni@inf.u-szeged.hu
This commit is contained in:
parent
355ab24cdc
commit
b7069350c2
@ -209,7 +209,11 @@ endif()
|
||||
if("${PLATFORM}" STREQUAL "DARWIN")
|
||||
jerry_add_link_flags(-lSystem)
|
||||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> Sqc <TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
||||
if("${CMAKE_C_COMPILER_ID}" STREQUAL "AppleClang")
|
||||
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
|
||||
else()
|
||||
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> <TARGET>")
|
||||
endif()
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-undefined dynamic_lookup")
|
||||
elseif((NOT CYGWIN AND NOT MINGW AND NOT MSYS) AND (USING_GCC OR USING_CLANG))
|
||||
jerry_add_link_flags(-Wl,-z,noexecstack)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user