Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb706935

Browse files
cmake: avoid Apple ranlib flags when not using AppleClang (#5258)
On macOS, `-no_warning_for_no_symbols -c` options are specific to theApple `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
1 parent355ab24 commitb706935

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎CMakeLists.txt‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ endif()
209209
if("${PLATFORM}"STREQUAL"DARWIN")
210210
jerry_add_link_flags(-lSystem)
211211
set(CMAKE_C_ARCHIVE_CREATE"<CMAKE_AR> Sqc <TARGET> <LINK_FLAGS> <OBJECTS>")
212-
set(CMAKE_C_ARCHIVE_FINISH"<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
212+
if("${CMAKE_C_COMPILER_ID}"STREQUAL"AppleClang")
213+
set(CMAKE_C_ARCHIVE_FINISH"<CMAKE_RANLIB> -no_warning_for_no_symbols -c <TARGET>")
214+
else()
215+
set(CMAKE_C_ARCHIVE_FINISH"<CMAKE_RANLIB> <TARGET>")
216+
endif()
213217
set(CMAKE_SHARED_LINKER_FLAGS"-undefined dynamic_lookup")
214218
elseif((NOTCYGWINANDNOT MINGWANDNOT MSYS)AND (USING_GCCOR USING_CLANG))
215219
jerry_add_link_flags(-Wl,-z,noexecstack)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp