@@ -450,7 +450,6 @@ def convert_arg_line_to_args(self, arg_line):
450
450
"(e.g. macOS or iOS)"
451
451
"This is only supported on MacOS" ,
452
452
)
453
- parser .add_argument ("--macabi" , action = "store_true" , help = "Build for macabi" )
454
453
# A 32-bit progress doesn't have enough memory to run all the tests in onnxruntime_test_all.
455
454
# Mimalloc is incompatible with address sanitizer.
456
455
# Address sanitizer itself is also a memory leak checker, so when it is enabled we should disable_memleak_checker.
@@ -1020,7 +1019,6 @@ def generate_build_tree(
1020
1019
"-Donnxruntime_BUILD_OBJC=" + ("ON" if args .build_objc else "OFF" ),
1021
1020
"-Donnxruntime_BUILD_SHARED_LIB=" + ("ON" if args .build_shared_lib else "OFF" ),
1022
1021
"-Donnxruntime_BUILD_APPLE_FRAMEWORK=" + ("ON" if args .build_apple_framework else "OFF" ),
1023
- "-DFETCHCONTENT_TRY_FIND_PACKAGE_MODE=NEVER" , #PACO
1024
1022
"-Donnxruntime_USE_DNNL=" + ("ON" if args .use_dnnl else "OFF" ),
1025
1023
"-Donnxruntime_USE_NNAPI_BUILTIN=" + ("ON" if args .use_nnapi else "OFF" ),
1026
1024
"-Donnxruntime_USE_VSINPU=" + ("ON" if args .use_vsinpu else "OFF" ),
@@ -1393,65 +1391,6 @@ def generate_build_tree(
1393
1391
"-Donnxruntime_ENABLE_CPUINFO=OFF" ,
1394
1392
]
1395
1393
1396
- if args .macabi :
1397
- needed_args = [
1398
- #args.use_xcode,
1399
- args .ios_sysroot ,
1400
- args .apple_deploy_target ,
1401
- ]
1402
- arg_names = [
1403
- #"--use_xcode " + "<need use xcode to cross build iOS on MacOS>",
1404
- "--ios_sysroot " + "<the location or name of the macOS platform SDK>" ,
1405
- "--apple_deploy_target " + "<the minimum version of the target platform>" ,
1406
- ]
1407
- if not all (needed_args ):
1408
- raise BuildError (
1409
- "iOS build on MacOS canceled due to missing arguments: "
1410
- + ", " .join (val for val , cond in zip (arg_names , needed_args ) if not cond )
1411
- )
1412
- cmake_args += [
1413
- "-DCMAKE_SYSTEM_NAME=Darwin" ,
1414
- "-Donnxruntime_BUILD_SHARED_LIB=ON" ,
1415
- "-DCMAKE_OSX_SYSROOT=" + args .ios_sysroot ,
1416
- "-DCMAKE_OSX_DEPLOYMENT_TARGET=11.0" , # + args.apple_deploy_target,
1417
- "-DCMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG=" + args .apple_deploy_target ,
1418
- "-DCMAKE_C_OSX_DEPLOYMENT_TARGET_FLAG=" + args .apple_deploy_target ,
1419
- "-DCMAKE_CC_OSX_DEPLOYMENT_TARGET_FLAG=" + args .apple_deploy_target ,
1420
- "-DCMAKE_CXX_COMPILER_TARGET=" + f"{ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1421
- "-DCMAKE_C_COMPILER_TARGET=" + f"{ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1422
- "-DCMAKE_CC_COMPILER_TARGET=" + f"{ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1423
- "-DCMAKE_CXX_FLAGS=" + f"--target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1424
- "-DCMAKE_CXX_FLAGS_RELEASE=" + f"-O3 -DNDEBUG --target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1425
- "-DCMAKE_C_FLAGS=" + f"--target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1426
- "-DCMAKE_C_FLAGS_RELEASE=" + f"-O3 -DNDEBUG --target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1427
- "-DCMAKE_CC_FLAGS=" + f"--target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1428
- "-DCMAKE_CC_FLAGS_RELEASE=" + f"-O3 -DNDEBUG --target={ args .osx_arch } -apple-ios{ args .apple_deploy_target } -macabi" ,
1429
- "-DCMAKE_OSX_SYSROOT=" + "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.0.sdk" ,
1430
- "-DCMAKE_THREAD_LIBS_INIT=" + "-lpthread" ,
1431
- "-DCMAKE_HAVE_THREADS_LIBRARY=" + "1" ,
1432
- "-DCMAKE_USE_PTHREADS_INIT=1" ,
1433
- "-DTHREADS_PREFER_PTHREAD_FLAG=ON" ,
1434
- "-Donnxruntime_ENABLE_BITCODE=OFF" ,
1435
- "-DCMAKE_COMPILE_WARNING_AS_ERROR=OFF" ,
1436
- "-DCMAKE_OSX_ARCHITECTURES=" + f"{ args .osx_arch } " ,
1437
- "-DCMAKE_CXX_OSX_DEPLOYMENT_TARGET_FLAG=" ,
1438
- # we do not need protoc binary for ios cross build
1439
- "-Dprotobuf_BUILD_PROTOC_BINARIES=OFF" ,
1440
- ]
1441
-
1442
- if args .osx_arch == "arm64" :
1443
- cmake_args += ["-DPLATFORM=MAC_CATALYST_ARM64" ]
1444
- elif args .osx_arch == "x86_64" :
1445
- cmake_args += ["-DPLATFORM=MAC_CATALYST" ]
1446
- #"-DPLATFORM=" + "MAC_CATALYST_ARM64" if args.osx_arch == "arm64" else "MAC_CATALYST",
1447
- #f"-DCMAKE_C_FLAGS={args.osx_arch}-apple-ios{args.apple_deploy_target}-macabi",
1448
- #"-DCMAKE_TOOLCHAIN_FILE="
1449
- #+ (args.macabi_toolchain_file if args.macabi_toolchain_file else "../cmake/onnxruntime_macabi.toolchain.cmake.v1"),
1450
- print ("args.macabi cmake config" )
1451
- print (cmake_args )
1452
- #exit(-1)
1453
-
1454
-
1455
1394
if args .build_wasm :
1456
1395
emsdk_dir = os .path .join (cmake_dir , "external" , "emsdk" )
1457
1396
emscripten_cmake_toolchain_file = os .path .join (
@@ -1798,9 +1737,6 @@ def build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, targe
1798
1737
if args .android :
1799
1738
env ["ANDROID_SDK_ROOT" ] = args .android_sdk_path
1800
1739
env ["ANDROID_NDK_HOME" ] = args .android_ndk_path
1801
- #cmd_args += ['--verbose']
1802
- print (cmd_args )
1803
- print (env )
1804
1740
run_subprocess (cmd_args , env = env )
1805
1741
1806
1742
0 commit comments