1 LOCAL_PATH := $(call my-dir) 2 3 include $(CLEAR_VARS) 4 LOCAL_MODULE := issue36131-flto-c++11 5 LOCAL_SRC_FILES := issue36131-flto-c++11.cxx 6 LOCAL_CFLAGS += -g -std=c++11 7 8 FLTO_FLAG := -flto 9 ifneq ($(filter clang%,$(NDK_TOOLCHAIN_VERSION)),) 10 ifeq ($(TARGET_ARCH_ABI),mips) 11 # clang does LTO via gold plugin, but gold doesn't support MIPS yet 12 FLTO_FLAG := 13 endif 14 endif 15 16 LOCAL_CFLAGS += $(FLTO_FLAG) 17 LOCAL_LDFLAGS += $(FLTO_FLAG) 18 include $(BUILD_EXECUTABLE) 19