Index: third_party/zlib/BUILD.gn |
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn |
index ea3120168cbffa0cbb9523fc1927058533ec7702..851218ebdc014ebb36fa773dff87fd8e30b86817 100644 |
--- a/third_party/zlib/BUILD.gn |
+++ b/third_party/zlib/BUILD.gn |
@@ -4,6 +4,10 @@ |
import("//build_overrides/build.gni") |
+if (current_cpu == "arm" || current_cpu == "arm64") { |
+ import("//build/config/arm.gni") |
+} |
+ |
config("zlib_config") { |
include_dirs = [ "." ] |
} |
@@ -73,6 +77,20 @@ static_library("zlib") { |
"zutil.h", |
] |
+ if (current_cpu == "arm" || current_cpu == "arm64") { |
+ if (arm_use_neon) { |
+ sources -= [ |
+ "inflate.c", |
+ "inffast.c", |
+ ] |
+ sources += [ |
+ "contrib/arm/inflate.c", |
+ "contrib/arm/inffast.c", |
+ "contrib/arm/chunkcopy.h", |
+ ] |
+ } |
+ } |
+ |
if (!is_ios && (current_cpu == "x86" || current_cpu == "x64")) { |
sources += [ "x86.c" ] |
} |