prebuilt oneTBB binaries for ARM64 (#16904)
* use oneTBB for arm64 * force THREADING=TBB * test: remove TBB_DIR for linux arm64 * update linux and mac arm64 packages * update SHA256 * add comment * disable add_rpath for tbb libraries on mac arm64 --------- Co-authored-by: Chen Peter <peter.chen@intel.com>
This commit is contained in:
parent
7997354359
commit
656d7fe380
@ -96,6 +96,7 @@ function(ov_download_tbb)
|
||||
|
||||
if(WIN32 AND X86_64)
|
||||
# TODO: add target_path to be platform specific as well, to avoid following if
|
||||
# build oneTBB 2021.2.1 with Visual Studio 2019 (MSVC 14.21)
|
||||
RESOLVE_DEPENDENCY(TBB
|
||||
ARCHIVE_WIN "oneapi-tbb-2021.2.1-win.zip"
|
||||
TARGET_PATH "${TEMP}/tbb"
|
||||
@ -108,7 +109,8 @@ function(ov_download_tbb)
|
||||
TARGET_PATH "${TEMP}/tbb"
|
||||
ENVIRONMENT "TBBROOT"
|
||||
SHA256 "f42d084224cc2d643314bd483ad180b081774608844000f132859fca3e9bf0ce")
|
||||
elseif(LINUX AND X86_64)
|
||||
elseif(LINUX AND X86_64 AND OV_GLIBC_VERSION VERSION_GREATER_EQUAL 2.17)
|
||||
# build oneTBB 2021.2.1 with gcc 4.8 (glibc 2.17)
|
||||
RESOLVE_DEPENDENCY(TBB
|
||||
ARCHIVE_LIN "oneapi-tbb-2021.2.1-lin.tgz"
|
||||
TARGET_PATH "${TEMP}/tbb"
|
||||
@ -122,12 +124,37 @@ function(ov_download_tbb)
|
||||
ENVIRONMENT "TBBROOT"
|
||||
SHA256 "321261ff2eda6d4568a473cb883262bce77a93dac599f7bd65d2918bdee4d75b")
|
||||
elseif(APPLE AND X86_64)
|
||||
# build oneTBB 2021.2.1 with OS version 11.4
|
||||
RESOLVE_DEPENDENCY(TBB
|
||||
ARCHIVE_MAC "oneapi-tbb-2021.2.1-mac.tgz"
|
||||
TARGET_PATH "${TEMP}/tbb"
|
||||
ENVIRONMENT "TBBROOT"
|
||||
SHA256 "c57ce4b97116cd3093c33e6dcc147fb1bbb9678d0ee6c61a506b2bfe773232cb"
|
||||
USE_NEW_LOCATION TRUE)
|
||||
elseif(WIN32 AND AARCH64)
|
||||
# build oneTBB 2021.2.1 with Visual Studio 2022 (MSVC 14.35)
|
||||
RESOLVE_DEPENDENCY(TBB
|
||||
ARCHIVE_WIN "oneapi-tbb-2021.2.1-win-arm64.zip"
|
||||
TARGET_PATH "${TEMP}/tbb"
|
||||
ENVIRONMENT "TBBROOT"
|
||||
SHA256 "09fe7f5e7be589aa34ccd20fdfd7cad9e0afa89d1e74ecdb008a75d0af71d6e1"
|
||||
USE_NEW_LOCATION TRUE)
|
||||
elseif(LINUX AND AARCH64 AND OV_GLIBC_VERSION VERSION_GREATER_EQUAL 2.17)
|
||||
# build oneTBB 2021.2.1 with gcc 4.8 (glibc 2.17)
|
||||
RESOLVE_DEPENDENCY(TBB
|
||||
ARCHIVE_LIN "oneapi-tbb-2021.2.1-lin-arm64.tgz"
|
||||
TARGET_PATH "${TEMP}/tbb"
|
||||
ENVIRONMENT "TBBROOT"
|
||||
SHA256 "6b87194a845aa9314f3785d842e250d934e545eccc4636655c7b27c98c302c0c"
|
||||
USE_NEW_LOCATION TRUE)
|
||||
elseif(APPLE AND AARCH64)
|
||||
# build oneTBB 2021.2.1 with export MACOSX_DEPLOYMENT_TARGET=11.0
|
||||
RESOLVE_DEPENDENCY(TBB
|
||||
ARCHIVE_MAC "oneapi-tbb-2021.2.1-mac-arm64.tgz"
|
||||
TARGET_PATH "${TEMP}/tbb"
|
||||
ENVIRONMENT "TBBROOT"
|
||||
SHA256 "15d46ef19501e4315a5498af59af873dbf8180e9a3ea55253ccf7f0c0bb6f940"
|
||||
USE_NEW_LOCATION TRUE)
|
||||
else()
|
||||
message(WARNING "Prebuilt TBB is not available on current platform")
|
||||
endif()
|
||||
|
@ -290,6 +290,11 @@ class PrepareLibs(build_clib):
|
||||
install_dir = os.path.join(install_prefix, install_dir)
|
||||
# set rpath if applicable
|
||||
if sys.platform != "win32" and comp_data.get("rpath"):
|
||||
# after tbb libraries on mac arm64 are signed, setting rpath for them will report error:
|
||||
# LC_SEGMENT_64 command 3 fileoff field plus filesize field extends past the end of the file
|
||||
if comp == "tbb_libs" and ARCH == "arm64" and sys.platform == "darwin":
|
||||
continue
|
||||
|
||||
for path in filter(
|
||||
lambda x: any(item in ([".so"] if sys.platform == "linux" else [".dylib", ".so"])
|
||||
for item in x.suffixes), Path(install_dir).glob("*"),
|
||||
|
Loading…
Reference in New Issue
Block a user