From 16e7e0f55697d053f0e0bd9e0607397a946cef6c Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Wed, 16 Dec 2015 13:32:27 -0800 Subject: [PATCH] Move __BRILLO__ to the core build system In preparation for locking down COMMON_GLOBAL_CFLAGS. Bug: 26165350 Change-Id: Ifdfb7808c1e1b624ffb0f99ab443ec2c5503a81c --- core/config.mk | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/core/config.mk b/core/config.mk index dbb40f58cf..be2442baa0 100644 --- a/core/config.mk +++ b/core/config.mk @@ -186,6 +186,15 @@ 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