Don't use SIMD extensions on host.
Change-Id: I97ac57525a579d1727e381ef240ef086fe6d3ac6
diff --git a/BUILD.gn b/BUILD.gn
index e37c6a3..f7093bb 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -10,8 +10,11 @@
if (current_cpu == "x86" || current_cpu == "x64") {
import("//third_party/yasm/yasm_assemble.gni")
+
yasm_assemble("simd_asm") {
+
defines = []
+
if (current_cpu == "x86") {
sources = [
"simd/jccolor-mmx.asm",
@@ -49,6 +52,7 @@
"simd/jquanti-sse2.asm",
"simd/jsimdcpu.asm",
]
+
defines += [
"__x86__",
"PIC",
@@ -72,19 +76,27 @@
"simd/jquantf-sse2-64.asm",
"simd/jquanti-sse2-64.asm",
]
+
defines += [
"__x86_64__",
"PIC",
]
}
+
defines += [ "ELF" ]
}
}
+
static_library("simd") {
- if (current_cpu == "x86") {
+ if (!is_fuchsia) {
+ sources = [
+ "jsimd_none.c",
+ ]
+ } else if (current_cpu == "x86") {
deps = [
":simd_asm",
]
+
sources = [
"simd/jsimd_i386.c",
]
@@ -92,6 +104,7 @@
deps = [
":simd_asm",
]
+
sources = [
"simd/jsimd_x86_64.c",
]
@@ -112,9 +125,11 @@
]
}
}
+
config("libjpeg_config") {
include_dirs = [ "." ]
}
+
static_library("libjpeg") {
sources = [
"jcapimin.c",
@@ -173,11 +188,14 @@
"jutils.c",
"jversion.h",
]
+
defines = [
"WITH_SIMD",
"NO_GETENV",
]
+
configs += [ ":libjpeg_config" ]
+
public_configs = [ ":libjpeg_config" ]
deps = [