# Copyright (c) 2023 Xiaomi Corporation (authors: Fangjun Kuang) | |
# https://onnxruntime.ai/docs/build/ios.html | |
num_jobs=3 | |
# Get directory this script is in | |
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
build_dir=$DIR/build-macos/x86_64 | |
#requires python3.6 or higher | |
python3 \ | |
$DIR/tools/ci_build/build.py \ | |
--build_dir $build_dir \ | |
--include_ops_by_config ops.config \ | |
--disable_ml_ops --disable_exceptions --disable_rtti \ | |
--minimal_build extended \ | |
--config Release \ | |
--update \ | |
--build \ | |
--use_xcode \ | |
--compile_no_warning_as_error \ | |
--build_shared_lib \ | |
--cmake_extra_defines onnxruntime_BUILD_UNIT_TESTS=OFF \ | |
--cmake_extra_defines CMAKE_INSTALL_PREFIX=$build_dir/install/ \ | |
--osx_arch x86_64 \ | |
--target install \ | |
--parallel $num_jobs \ | |
--skip_tests \ | |
--build_apple_framework \ | |
--apple_deploy_target 13.0 \ | |
--use_coreml \ | |
--path_to_protoc_exe /usr/local/Cellar/protobuf@21/21.12/bin/protoc-3.21.12.0 | |