From ee1189649404f236b162bc0f0e173b82e9508435 Mon Sep 17 00:00:00 2001 From: Ye Cao Date: Wed, 21 Aug 2024 09:49:27 +0800 Subject: [PATCH] Fix make vineyard_client_python on macos. (#1989) When running `make vineyard_client_python` on macos, get the following error: ``` ld: unknown option: --version-script= clang: error: linker command failed with exit code 1 (use -v to see invocation) ``` Signed-off-by: Ye Cao --- CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a906d80b..8d2fe8840 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1011,7 +1011,9 @@ if(BUILD_VINEYARD_PYTHON_BINDINGS) DEPENDS _C vineyard_internal_registry COMMENT "Copying python extensions." VERBATIM) - set_target_properties(_C PROPERTIES LINK_FLAGS "-Wl,--version-script=${LIBFABRIC_VERSION_SCRIPT}") + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set_target_properties(_C PROPERTIES LINK_FLAGS "-Wl,--version-script=${LIBFABRIC_VERSION_SCRIPT}") + endif() endif() if(BUILD_VINEYARD_PYTHON_BINDINGS AND BUILD_VINEYARD_LLM_CACHE) @@ -1027,7 +1029,9 @@ if(BUILD_VINEYARD_PYTHON_BINDINGS AND BUILD_VINEYARD_LLM_CACHE) DEPENDS _llm_C COMMENT "Copying llm kv cache python extensions." VERBATIM) - set_target_properties(_llm_C PROPERTIES LINK_FLAGS "-Wl,--version-script=${LIBFABRIC_VERSION_SCRIPT}") + if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux") + set_target_properties(_llm_C PROPERTIES LINK_FLAGS "-Wl,--version-script=${LIBFABRIC_VERSION_SCRIPT}") + endif() add_dependencies(vineyard_llm_python vineyard_client_python) endif()