Android.mk/build.gradle: fix mips build with clang from r14b

fixes unknown instruction errors for e.g.,
usw    $15, 0($8)

BUG=webp:343

Change-Id: I71d00527fecd2370a40f6bd12f4e361fb525477f
This commit is contained in:
James Zern 2017-06-03 12:53:22 -07:00
parent f209a5481e
commit 67de68b5d9
2 changed files with 15 additions and 0 deletions

View File

@ -11,6 +11,14 @@ ifeq ($(APP_OPTIM),release)
endif
endif
# mips32 fails to build with clang from r14b
# https://bugs.chromium.org/p/webp/issues/detail?id=343
ifeq ($(findstring clang,$(NDK_TOOLCHAIN_VERSION)),clang)
ifeq ($(TARGET_ARCH),mips)
WEBP_CFLAGS += -no-integrated-as
endif
endif
ifneq ($(findstring armeabi-v7a, $(TARGET_ARCH_ABI)),)
# Setting LOCAL_ARM_NEON will enable -mfpu=neon which may cause illegal
# instructions to be generated for armv7a code. Instead target the neon code

View File

@ -74,6 +74,13 @@ model {
cCompiler.args "-frename-registers -s"
}
}
// mips32 fails to build with clang from r14b
// https://bugs.chromium.org/p/webp/issues/detail?id=343
if (toolChain in Clang) {
if (getTargetPlatform() == "mips") {
cCompiler.args "-no-integrated-as"
}
}
// Check for NEON usage.
if (getTargetPlatform() == "arm" || getTargetPlatform() == "arm64") {
NEON = "c.neon"