@@ -415,11 +415,6 @@ def convert_arg_line_to_args(self, arg_line):
415
415
default = "" ,
416
416
help = "Path to ios toolchain file, or cmake/onnxruntime_ios.toolchain.cmake will be used" ,
417
417
)
418
- parser .add_argument (
419
- "--macabi_toolchain_file" ,
420
- default = "" ,
421
- help = "Path to macabi toolchain file, " "or cmake/onnxruntime_macabi.toolchain.cmake will be used" ,
422
- )
423
418
parser .add_argument (
424
419
"--xcode_code_signing_team_id" , default = "" , help = "The development team ID used for code signing in Xcode"
425
420
)
@@ -446,7 +441,6 @@ def convert_arg_line_to_args(self, arg_line):
446
441
"(e.g. macOS or iOS)"
447
442
"This is only supported on MacOS" ,
448
443
)
449
- parser .add_argument ("--macabi" , action = "store_true" , help = "Build for macabi" )
450
444
# A 32-bit progress doesn't have enough memory to run all the tests in onnxruntime_test_all.
451
445
# Mimalloc is incompatible with address sanitizer.
452
446
# Address sanitizer itself is also a memory leak checker, so when it is enabled we should disable_memleak_checker.
@@ -1019,7 +1013,6 @@ def generate_build_tree(
1019
1013
"-Donnxruntime_BUILD_OBJC=" + ("ON" if args .build_objc else "OFF" ),
1020
1014
"-Donnxruntime_BUILD_SHARED_LIB=" + ("ON" if args .build_shared_lib else "OFF" ),
1021
1015
"-Donnxruntime_BUILD_APPLE_FRAMEWORK=" + ("ON" if args .build_apple_framework else "OFF" ),
1022
- "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER" , #PACO
1023
1016
"-Donnxruntime_USE_DNNL=" + ("ON" if args .use_dnnl else "OFF" ),
1024
1017
"-Donnxruntime_USE_NNAPI_BUILTIN=" + ("ON" if args .use_nnapi else "OFF" ),
1025
1018
"-Donnxruntime_USE_RKNPU=" + ("ON" if args .use_rknpu else "OFF" ),
@@ -1394,65 +1387,6 @@ def generate_build_tree(
1394
1387
f"-DCMAKE_CC_FLAGS_RELEASE=-O3 -DNDEBUG --target={ macabi_target } " ,
1395
1388
]
1396
1389
1397
- if args .macabi :
1398
- needed_args = [
1399
- #args.use_xcode,
1400
- args .ios_sysroot ,
1401
- args .apple_deploy_target ,
1402
- ]
1403
- arg_names = [
1404
- #"--use_xcode " + "<need use xcode to cross build iOS on MacOS>",
1405
- "--ios_sysroot " + "<the location or name of the macOS platform SDK>" ,
1406
- "--apple_deploy_target " + "<the minimum version of the target platform>" ,
1407
- ]
1408
- if not all (needed_args ):
1409
- raise BuildError (
1410
- "iOS build on MacOS canceled due to missing arguments: "
1411
- + ", " .join (val for val , cond in zip (arg_names , needed_args ) if not cond )
1412
- )
1413
- cmake_args += [
1414
- "-DCMAKE_SYSTEM_NAME=Darwin" ,
1415
- "-Donnxruntime_BUILD_SHARED_LIB=ON" ,
1416
- "-DCMAKE_OSX_SYSROOT=" + args .ios_sysroot ,
1417
- "-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0" , # + args.apple_deploy_target,
1418
- "-DCMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG=" + args .apple_deploy_target ,
1419
- "-DCMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG=" + args .apple_deploy_target ,
1420
- "-DCMAKE_CC_OSX_DEPLOYMENT_TARGET_FLAG=" + args .apple_deploy_target ,
1421
- "-DCMAKE_CXX_COMPILER_TARGET=" + f"{ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1422
- "-DCMAKE_C_COMPILER_TARGET=" + f"{ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1423
- "-DCMAKE_CC_COMPILER_TARGET=" + f"{ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1424
- "-DCMAKE_CXX_FLAGS=" + f"--target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1425
- "-DCMAKE_CXX_FLAGS_RELEASE=" + f"-O3 -DNDEBUG --target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1426
- "-DCMAKE_C_FLAGS=" + f"--target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1427
- "-DCMAKE_C_FLAGS_RELEASE=" + f"-O3 -DNDEBUG --target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1428
- "-DCMAKE_CC_FLAGS=" + f"--target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1429
- "-DCMAKE_CC_FLAGS_RELEASE=" + f"-O3 -DNDEBUG --target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1430
- "-DCMAKE_OSX_SYSROOT=" + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk" ,
1431
- "-DCMAKE_THREAD_LIBS_INIT=" + "-lpthread" ,
1432
- "-DCMAKE_HAVE_THREADS_LIBRARY=" + "1" ,
1433
- "-DCMAKE_USE_PTHREADS_INIT=1" ,
1434
- "-DTHREADS_PREFER_PTHREAD_FLAG=ON" ,
1435
- "-Donnxruntime_ENABLE_BITCODE=OFF" ,
1436
- "-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF" ,
1437
- "-DCMAKE_OSX_ARCHITECTURES=" + f"{ args .osx_arch } " ,
1438
- "-DCMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG=" ,
1439
- # we do not need protoc binary for ios cross build
1440
- "-Dprotobuf_BUILD_PROTOC_BINARIES=OFF" ,
1441
- ]
1442
-
1443
- if args .osx_arch == "arm64" :
1444
- cmake_args += ["-DPLATFORM=MAC_CATALYST_ARM64" ]
1445
- elif args .osx_arch == "x86_64" :
1446
- cmake_args += ["-DPLATFORM=MAC_CATALYST" ]
1447
- #"-DPLATFORM=" + "MAC_CATALYST_ARM64" if args.osx_arch == "arm64" else "MAC_CATALYST",
1448
- #f"-DCMAKE_C_FLAGS={args.osx_arch}-apple-ios{args.apple_deploy_target}-macabi",
1449
- #"-DCMAKE_TOOLCHAIN_FILE="
1450
- #+ (args.macabi_toolchain_file if args.macabi_toolchain_file else "../cmake/onnxruntime_macabi.toolchain.cmake.v1"),
1451
- print ("args.macabi cmake config" )
1452
- print (cmake_args )
1453
- #exit(-1)
1454
-
1455
-
1456
1390
if args .build_wasm :
1457
1391
emsdk_dir = os .path .join (cmake_dir , "external" , "emsdk" )
1458
1392
emscripten_cmake_toolchain_file = os .path .join (
@@ -1793,9 +1727,6 @@ def build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, targe
1793
1727
if args .android :
1794
1728
env ["ANDROID_SDK_ROOT" ] = args .android_sdk_path
1795
1729
env ["ANDROID_NDK_HOME" ] = args .android_ndk_path
1796
- #cmd_args += ['--verbose']
1797
- print (cmd_args )
1798
- print (env )
1799
1730
run_subprocess (cmd_args , env = env )
1800
1731
1801
1732
0 commit comments