Skip to content

Commit

Permalink
Stop passing integrated assembler options.
Browse files Browse the repository at this point in the history
Test: ./checkbuild.py && ./run_tests.py
Bug: android/ndk#614
Change-Id: I1ae3d7ab1a9792a0bff91bd2800d2aee1105006d
(cherry picked from commit fb5456cf0b84af7b2caff90fc0cbe1fed1904b80)
  • Loading branch information
DanAlbert committed Feb 21, 2018
1 parent b4c2758 commit da45508
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ NDK
your app if you have not specified your own wrap.sh. If you have specified
your own wrap.sh, you can add ASAN support to it as described
[here](https://github.com/google/sanitizers/wiki/AddressSanitizerOnAndroidO).
* [Issue 614]: ndk-build and CMake no longer pass `-fno-integrated-as` for
arm32 by default. If your project contains hand written assembly, you may
need to pass this flag.

[wrap.sh]: https://developer.android.com/ndk/guides/wrap-script.html
[Issue 540]: https://github.com/android-ndk/ndk/issues/540
[Issue 614]: https://github.com/android-ndk/ndk/issues/614

[Issue 313]: https://github.com/android-ndk/ndk/issues/313

Expand Down
8 changes: 0 additions & 8 deletions build/cmake/android.toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -530,14 +530,6 @@ if(ANDROID_ABI STREQUAL mips)
list(APPEND ANDROID_COMPILER_FLAGS
-mips32)
endif()
if(ANDROID_ABI STREQUAL "mips64" AND ANDROID_TOOLCHAIN STREQUAL clang)
list(APPEND ANDROID_COMPILER_FLAGS "-fintegrated-as")
endif()
if(ANDROID_ABI MATCHES "^armeabi" AND ANDROID_TOOLCHAIN STREQUAL clang)
# Disable integrated-as for better compatibility.
list(APPEND ANDROID_COMPILER_FLAGS
-fno-integrated-as)
endif()
if(ANDROID_ABI STREQUAL mips AND ANDROID_TOOLCHAIN STREQUAL clang)
# Help clang use mips64el multilib GCC
list(APPEND ANDROID_LINKER_FLAGS
Expand Down
3 changes: 0 additions & 3 deletions build/core/toolchains/arm-linux-androideabi-clang/setup.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ TARGET_CFLAGS := \
-Wno-unused-command-line-argument \
-no-canonical-prefixes

# Disable integrated-as for better compatibility
TARGET_CFLAGS += -fno-integrated-as

# Always enable debug info. We strip binaries when needed.
TARGET_CFLAGS += -g

Expand Down
4 changes: 0 additions & 4 deletions build/tools/builder-funcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,6 @@ builder_begin_android ()
esac
SCRATCH_FLAGS="-target $LLVM_TRIPLE $FLAGS"
builder_ldflags "$SCRATCH_FLAGS"
if [ "$ABI" == "mips64" ]; then
# https://github.com/android-ndk/ndk/issues/399
SCRATCH_FLAGS="$SCRATCH_FLAGS -fintegrated-as"
fi
builder_cflags "$SCRATCH_FLAGS"
builder_cxxflags "$SCRATCH_FLAGS"
if [ ! -z $GCC_TOOLCHAIN ]; then
Expand Down
4 changes: 4 additions & 0 deletions tests/build/ssax-instructions/jni/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ssax_instruction
LOCAL_ARM_NEON := true
LOCAL_SRC_FILES := test.S
ifneq ($(filter clang%,$(NDK_TOOLCHAIN_VERSION)),)
# asm is not compatible with Clang's assembler.
LOCAL_ASFLAGS := -fno-integrated-as
endif
include $(BUILD_SHARED_LIBRARY)

0 comments on commit da45508

Please sign in to comment.