Use MACHO and not ELF to compile on macOS
Keep using ELF for Linux and Android, but use MACHO for Darwin which
fixes the build for macOS.
Also re-enable host target for Darwin.
Test: sdk build
Change-Id: I1e177f4a9de635776654daf8484e1427750cc800
diff --git a/Android.bp b/Android.bp
index ef60ee0..39f06bd 100644
--- a/Android.bp
+++ b/Android.bp
@@ -133,7 +133,6 @@
"simd/i386/jsimdcpu.asm",
],
asflags: [
- "-DELF",
"-DPIC",
],
local_include_dirs: [
@@ -174,7 +173,6 @@
"simd/x86_64/jsimdcpu.asm",
],
asflags: [
- "-DELF",
"-DPIC",
"-D__x86_64__",
],
@@ -190,6 +188,19 @@
srcs: ["jsimd_none.c"],
},
},
+
+ target: {
+ linux: {
+ asflags: [
+ "-DELF",
+ ],
+ },
+ darwin: {
+ asflags: [
+ "-DMACHO",
+ ],
+ },
+ },
}
// Also build as a shared library.
@@ -197,12 +208,6 @@
name: "libjpeg",
host_supported: true,
vendor_available: true,
- target: {
- // TODO(b/67474260) Turn this back on
- darwin: {
- enabled: false,
- },
- },
vndk: {
enabled: true,
},