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