Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

Disable automatic adhoc sign on MacOS arm64 (#30727)

Anastasia Kuporosova412b2cc0533c
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 621b93fbb5f..3a3b31fceed 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -12,6 +12,12 @@ if(OV_COMPILER_IS_INTEL_LLVM)
ov_disable_deprecated_warnings()
endif()
+if(APPLE AND AARCH64)
+ # Disable automatic adhoc sign
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-no_adhoc_codesign")
+endif()
+
+
include(cmake/install_tbb.cmake)
# CC library should be registered before other cc targets
diff --git a/src/bindings/python/wheel/CMakeLists.txt b/src/bindings/python/wheel/CMakeLists.txt
index e6b9d795397..ada33e88113 100644
--- a/src/bindings/python/wheel/CMakeLists.txt
+++ b/src/bindings/python/wheel/CMakeLists.txt
@@ -62,9 +62,6 @@ if(APPLE)
string(REGEX MATCH "1[0-9]_[0-9]+" _macos_target_version ${PLATFORM_TAG})
endif()
- # try to make in compatile with macos 15.4+
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-headerpad_max_install_names")
-
# common platform tag looks like macosx_<macos major>_<macos minor>_<arch>
if(_arch AND _macos_target_version)
set(PLATFORM_TAG "macosx_${_macos_target_version}_${_arch}")