summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Drewry <drewry@google.com>2015-11-04 18:48:30 -0800
committerWill Drewry <drewry@google.com>2015-11-05 12:58:35 -0800
commit664571eb7735c9e027c957cde35f55745ed1bc27 (patch)
tree994b2134c5d9c9c4105ed2188a3255e1ab3a3bb8
parent42da57298143dee98c82c042e188bf5e28b92510 (diff)
downloadcore-brillo-m7-release.tar.gz
Populate BRILLO_CRASH_SERVER from the product configbrillo-m7-releasebrillo-m7-mr-devbrillo-m7-dev
Using cfgtree.mk, this change adds support to load the crash server URL directly from a file in the product tree during the build. BUG=25343470 TEST=build image, check in etc for the populated osrelease.d file (cherry picked from commit e680f358ece3d6047f7b61c07267d8d87cea9cf5) Change-Id: I28879ec7b82f3cda2a02a97a116368ca2fbbdc8b
-rw-r--r--crash_reporter/Android.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/crash_reporter/Android.mk b/crash_reporter/Android.mk
index c5ca4e40c..81cb458f5 100644
--- a/crash_reporter/Android.mk
+++ b/crash_reporter/Android.mk
@@ -102,9 +102,13 @@ LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY)
include $(BUILD_SYSTEM)/base_rules.mk
+# Optionally populate the BRILLO_CRASH_SERVER variable from a product
+# configuration file: brillo/crash_server.
+LOADED_BRILLO_CRASH_SERVER := $(call cfgtree-get-if-exists,brillo/crash_server)
+
# If the crash server isn't set, use a blank value. crash_sender
# will log it as a configuration error.
-$(LOCAL_BUILT_MODULE): BRILLO_CRASH_SERVER ?= ""
+$(LOCAL_BUILT_MODULE): BRILLO_CRASH_SERVER ?= "$(LOADED_BRILLO_CRASH_SERVER)"
$(LOCAL_BUILT_MODULE):
$(hide)mkdir -p $(dir $@)
echo $(BRILLO_CRASH_SERVER) > $@