diff options
author | Elliott Hughes <enh@google.com> | 2021-01-07 21:58:28 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-01-07 21:58:28 +0000 |
commit | f0e999b8abcacb5031f338f0dd2b61181cfa40c4 (patch) | |
tree | 05c19f85e69338c534b0ab9f946fcb12a4988ddd | |
parent | ab3deeee05a779789229f81038e98b921db32d2b (diff) | |
parent | a4d15b4e0614c0fad378c4f2e2161473ca0639bf (diff) | |
download | zlib-f0e999b8abcacb5031f338f0dd2b61181cfa40c4.tar.gz |
Merge "Distinguish between host and device x86." am: 4fa66caa13 am: a4d15b4e06
Original change: https://android-review.googlesource.com/c/platform/external/zlib/+/1541130
MUST ONLY BE SUBMITTED BY AUTOMERGER
Change-Id: I8e89efd5a3e41ade42c7300f2b0d0929222e6717
-rw-r--r-- | Android.bp | 26 |
1 files changed, 22 insertions, 4 deletions
@@ -33,15 +33,25 @@ cflags_arm_neon = [ ] cflags_arm64 = cflags_arm + cflags_arm_neon +// The *host* x86 configuration (with *lower* CPU feature requirements). cflags_x86 = [ // See ARMV8_OS_LINUX above. "-DX86_NOT_WINDOWS", - // Android's x86/x86-64 ABI includes SSE2 and SSSE3. - "-DADLER32_SIMD_SSSE3", // TODO: see arm above. // "-DINFLATE_CHUNK_SIMD_SSE2", - // TODO: ...but the host build system defaults don't match our official ABI. - "-mssse3", + // Android's host CPU feature requirements are *lower* than the + // corresponding device CPU feature requirements, so it's easier to just + // say "no SIMD for you" rather than specificially disable SSSE3. + // We should have a conversation about that, but not until we at least have + // data on how many Studio users have CPUs that don't make the grade... + // https://issuetracker.google.com/171235570 + "-DCPU_NO_SIMD", +] +// The *device* x86 configuration (with *higher* CPU feature requirements). +cflags_android_x86 = [ + // Android's x86/x86-64 ABI includes SSE2 and SSSE3. + "-UCPU_NO_SIMD", + "-DADLER32_SIMD_SSSE3", // PCLMUL isn't in the ABI, but it won't actually be used unless CPUID // reports that the processor really does have the instruction. "-mpclmul", @@ -115,6 +125,14 @@ cc_defaults { srcs: srcs_x86, }, }, + target: { + android_x86: { + cflags: cflags_android_x86, + }, + android_x86_64: { + cflags: cflags_android_x86, + }, + }, } cc_library { |