forked from VOICEVOX/onnxruntime-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1_17_3_android_arm64_build.patch
22 lines (21 loc) · 1.03 KB
/
1_17_3_android_arm64_build.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py
index 85583e11f5..3db1ee8b7b 100644
--- a/tools/ci_build/build.py
+++ b/tools/ci_build/build.py
@@ -987,6 +987,8 @@ def generate_build_tree(
disable_optional_type = "optional" in types_to_disable
disable_sparse_tensors = "sparsetensor" in types_to_disable
+ is_x86_64_build = not (args.android or args.ios or args.build_wasm or args.arm or args.arm64 or args.arm64ec)
+
cmake_args += [
"-Donnxruntime_RUN_ONNX_TESTS=" + ("ON" if args.enable_onnx_tests else "OFF"),
"-Donnxruntime_GENERATE_TEST_REPORTS=ON",
@@ -1571,7 +1573,7 @@ def generate_build_tree(
"-pipe",
"-ggdb3",
]
- if is_linux() and platform.machine() == "x86_64":
+ if is_linux() and is_x86_64_build:
# The following flags needs GCC 8 and newer
cflags += ["-fstack-clash-protection", "-fcf-protection"]
cxxflags = cflags.copy()