From 8a59c003ee6616d93e5595bbcbfc3a26824ff1ba Mon Sep 17 00:00:00 2001 From: Samuel Audet Date: Fri, 26 Apr 2024 23:39:15 +0900 Subject: [PATCH] Fix builds for ONNX Runtime --- onnxruntime/cppbuild.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/onnxruntime/cppbuild.sh b/onnxruntime/cppbuild.sh index 610a630176..d163407fd2 100755 --- a/onnxruntime/cppbuild.sh +++ b/onnxruntime/cppbuild.sh @@ -74,6 +74,8 @@ sedinplace '/Werror/d' cmake/CMakeLists.txt sedinplace '/WX/d' cmake/CMakeLists.txt # allow cross compilation for linux-arm64 +sedinplace 's/onnxruntime_target_platform STREQUAL "aarch64"/FALSE/g' cmake/CMakeLists.txt +sedinplace 's/is_linux() and platform.machine() == "x86_64"/False/g' tools/ci_build/build.py sedinplace 's/if args.arm or args.arm64:/if False:/g' tools/ci_build/build.py # work around toolchain issues on Mac and Windows @@ -82,11 +84,11 @@ patch -p1 < ../../../onnxruntime.patch sedinplace '/--Werror/d' cmake/CMakeLists.txt sedinplace "s/return 'ON'/return 'OFF'/g" tools/ci_build/build.py sedinplace "s/Visual Studio 1. 20../Ninja/g" tools/ci_build/build.py -sedinplace 's/Darwin|iOS/iOS/g' cmake/onnxruntime_providers.cmake -sedinplace 's/-fvisibility=hidden//g' cmake/CMakeLists.txt cmake/adjust_global_compile_flags.cmake cmake/onnxruntime_providers.cmake -sedinplace 's:/Yucuda_pch.h /FIcuda_pch.h::g' cmake/onnxruntime_providers.cmake -sedinplace 's/${PROJECT_SOURCE_DIR}\/external\/cub//g' cmake/onnxruntime_providers.cmake -sedinplace 's/ONNXRUNTIME_PROVIDERS_SHARED)/ONNXRUNTIME_PROVIDERS_SHARED onnxruntime_providers_shared)/g' cmake/onnxruntime_providers.cmake +sedinplace 's/Darwin|iOS/iOS/g' cmake/onnxruntime_providers_cpu.cmake cmake/onnxruntime_providers.cmake +sedinplace 's/-fvisibility=hidden//g' cmake/CMakeLists.txt cmake/adjust_global_compile_flags.cmake cmake/onnxruntime_providers_cpu.cmake cmake/onnxruntime_providers.cmake +sedinplace 's:/Yucuda_pch.h /FIcuda_pch.h::g' cmake/onnxruntime_providers_cuda.cmake cmake/onnxruntime_providers.cmake +sedinplace 's/${PROJECT_SOURCE_DIR}\/external\/cub//g' cmake/onnxruntime_providers_cuda.cmake cmake/onnxruntime_providers.cmake +sedinplace 's/ONNXRUNTIME_PROVIDERS_SHARED)/ONNXRUNTIME_PROVIDERS_SHARED onnxruntime_providers_shared)/g' cmake/onnxruntime_providers_cpu.cmake cmake/onnxruntime_providers.cmake sedinplace 's/DNNL_TAG v.*)/DNNL_TAG v3.4.1)/g' cmake/external/dnnl.cmake sedinplace 's/DNNL_SHARED_LIB libdnnl.1.dylib/DNNL_SHARED_LIB libdnnl.2.dylib/g' cmake/external/dnnl.cmake sedinplace 's/DNNL_SHARED_LIB libdnnl.so.1/DNNL_SHARED_LIB libdnnl.so.2/g' cmake/external/dnnl.cmake