Merge "Define __BRILLO__ only for target modules" am: e63d3328df

am: 05177f7cb1

* commit '05177f7cb1e98b23a0c4b8899ba636ef7228e62b':
  Define __BRILLO__ only for target modules
This commit is contained in:
Dan Willemsen 2015-12-16 23:44:55 +00:00 committed by android-build-merger
commit c915b13a9c
1 changed files with 12 additions and 9 deletions

View File

@ -192,15 +192,6 @@ include $(BUILD_SYSTEM)/envsetup.mk
# See envsetup.mk for a description of SCAN_EXCLUDE_DIRS
FIND_LEAVES_EXCLUDES := $(addprefix --prune=, $(OUT_DIR) $(SCAN_EXCLUDE_DIRS) .repo .git)
ifdef BRILLO
# Add a C define that identifies Brillo targets. __BRILLO__ should only be used
# to differentiate between Brillo and non-Brillo-but-Android environments. Use
# __ANDROID__ instead to test if something is being built in an Android-derived
# environment (including Brillo) as opposed to an entirely different
# environment (e.g. Chrome OS).
COMMON_GLOBAL_CFLAGS += -D__BRILLO__
endif
# ---------------------------------------------------------------
# We run gcc/clang with PWD=/proc/self/cwd to remove the $TOP
# from the debug output. That way two builds in two different
@ -708,6 +699,18 @@ HOST_CROSS_GLOBAL_CFLAGS += $(HOST_CROSS_RELEASE_CFLAGS)
HOST_CROSS_GLOBAL_CPPFLAGS += $(HOST_CROSS_RELEASE_CPPFLAGS)
endif
ifdef BRILLO
# Add a C define that identifies Brillo targets. __BRILLO__ should only be used
# to differentiate between Brillo and non-Brillo-but-Android environments. Use
# __ANDROID__ instead to test if something is being built in an Android-derived
# environment (including Brillo) as opposed to an entirely different
# environment (e.g. Chrome OS).
TARGET_GLOBAL_CFLAGS += -D__BRILLO__
ifdef TARGET_2ND_ARCH
$(TARGET_2ND_ARCH_VAR_PREFIX)TARGET_GLOBAL_CFLAGS += -D__BRILLO__
endif
endif
# allow overriding default Java libraries on a per-target basis
ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),)
TARGET_DEFAULT_JAVA_LIBRARIES := core-oj core-libart core-junit ext framework okhttp