diff options
author | Dehao Chen <dehao@google.com> | 2014-07-23 14:28:58 -0700 |
---|---|---|
committer | Ying Wang <wangying@google.com> | 2014-07-23 16:34:07 -0700 |
commit | 7092c79a14ad718864a189fb096dfe4a12fd5a1e (patch) | |
tree | a0247340839c559fc1a1dc2b6d5861cd2cc068bd /core/combo/TARGET_linux-arm.mk | |
parent | 38470c3fffd25a300045d62cccc8ab129cb71349 (diff) | |
download | build-7092c79a14ad718864a189fb096dfe4a12fd5a1e.zip build-7092c79a14ad718864a189fb096dfe4a12fd5a1e.tar.gz build-7092c79a14ad718864a189fb096dfe4a12fd5a1e.tar.bz2 |
Refactor FDO support code to ensure arm64 can also be built with FDO.
Change-Id: I752c9f411b0a046a15c72b4837efc1fb0503b470
Diffstat (limited to 'core/combo/TARGET_linux-arm.mk')
-rw-r--r-- | core/combo/TARGET_linux-arm.mk | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/core/combo/TARGET_linux-arm.mk b/core/combo/TARGET_linux-arm.mk index ea4a83d..a06f2dd 100644 --- a/core/combo/TARGET_linux-arm.mk +++ b/core/combo/TARGET_linux-arm.mk @@ -49,6 +49,7 @@ $(error Unknown ARM architecture version: $(TARGET_$(combo_2nd_arch_prefix)ARCH_ endif include $(TARGET_ARCH_SPECIFIC_MAKEFILE) +include $(BUILD_SYSTEM)/combo/fdo.mk # You can set TARGET_TOOLS_PREFIX to get gcc from somewhere else ifeq ($(strip $($(combo_2nd_arch_prefix)TARGET_TOOLS_PREFIX)),) @@ -168,35 +169,6 @@ target_libgcov := $(shell $($(combo_2nd_arch_prefix)TARGET_CC) $($(combo_2nd_arc -print-file-name=libgcov.a) endif -# Define FDO (Feedback Directed Optimization) options. - -$(combo_2nd_arch_prefix)TARGET_FDO_CFLAGS:= -$(combo_2nd_arch_prefix)TARGET_FDO_LIB:= - -ifneq ($(strip $(BUILD_FDO_INSTRUMENT)),) - # Set BUILD_FDO_INSTRUMENT=true to turn on FDO instrumentation. - # The profile will be generated on /data/local/tmp/profile on the device. - $(combo_2nd_arch_prefix)TARGET_FDO_CFLAGS := -fprofile-generate=/data/local/tmp/profile -DANDROID_FDO - $(combo_2nd_arch_prefix)TARGET_FDO_LIB := $(target_libgcov) -else - # If BUILD_FDO_INSTRUMENT is turned off, then consider doing the FDO optimizations. - # Set TARGET_FDO_PROFILE_PATH to set a custom profile directory for your build. - ifeq ($(strip $($(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH)),) - $(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH := fdo/profiles/$(TARGET_$(combo_2nd_arch_prefix)ARCH)/$(TARGET_$(combo_2nd_arch_prefix)ARCH_VARIANT) - else - ifeq ($(strip $(wildcard $($(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH))),) - $(warning Custom $(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH supplied, but directory does not exist. Turn off FDO.) - endif - endif - - # If the FDO profile directory can't be found, then FDO is off. - ifneq ($(strip $(wildcard $($(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH))),) - $(combo_2nd_arch_prefix)TARGET_FDO_CFLAGS := -fprofile-use=$($(combo_2nd_arch_prefix)TARGET_FDO_PROFILE_PATH) -DANDROID_FDO - $(combo_2nd_arch_prefix)TARGET_FDO_LIB := $(target_libgcov) - endif -endif - - KERNEL_HEADERS_COMMON := $(libc_root)/kernel/uapi KERNEL_HEADERS_ARCH := $(libc_root)/kernel/uapi/asm-$(TARGET_$(combo_2nd_arch_prefix)ARCH) KERNEL_HEADERS := $(KERNEL_HEADERS_COMMON) $(KERNEL_HEADERS_ARCH) |