Merge "Link librt on the host when using sanitizers."
diff --git a/core/binary.mk b/core/binary.mk
index c716b17..c22b848 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -1125,6 +1125,15 @@
my_cflags := $(filter-out $(fdo_incompatible_flags),$(my_cflags))
endif
+# No one should ever use this flag. On GCC it's mere presence will disable all
+# warnings, even those that are specified after it (contrary to typical warning
+# flag behavior). This circumvents CFLAGS_NO_OVERRIDE from forcibly enabling the
+# warnings that are *always* bugs.
+my_illegal_flags := -w
+my_cflags := $(filter-out $(my_illegal_flags),$(my_cflags))
+my_cppflags := $(filter-out $(my_illegal_flags),$(my_cppflags))
+my_conlyflags := $(filter-out $(my_illegal_flags),$(my_conlyflags))
+
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_YACCFLAGS := $(LOCAL_YACCFLAGS)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_ASFLAGS := $(my_asflags)
$(LOCAL_INTERMEDIATE_TARGETS): PRIVATE_CONLYFLAGS := $(my_conlyflags)
diff --git a/core/config.mk b/core/config.mk
index 876161b..498c793 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -595,7 +595,7 @@
# allow overriding default Java libraries on a per-target basis
ifeq ($(TARGET_DEFAULT_JAVA_LIBRARIES),)
- TARGET_DEFAULT_JAVA_LIBRARIES := core-libart core-junit ext framework
+ TARGET_DEFAULT_JAVA_LIBRARIES := core-libart core-junit ext framework okhttp
endif
# Flags for DEX2OAT
diff --git a/tools/releasetools/blockimgdiff.py b/tools/releasetools/blockimgdiff.py
index a32c6b1..e042e03 100644
--- a/tools/releasetools/blockimgdiff.py
+++ b/tools/releasetools/blockimgdiff.py
@@ -350,6 +350,12 @@
mapped_stashes.append(sr)
if self.version == 2:
src_str.append("%d:%s" % (sid, sr.to_string_raw()))
+ # A stash will be used only once. We need to free the stash
+ # immediately after the use, instead of waiting for the automatic
+ # clean-up at the end. Because otherwise it may take up extra space
+ # and lead to OTA failures.
+ # Bug: 23119955
+ free_string.append("free %d\n" % (sid,))
else:
assert sh in stashes
src_str.append("%s:%s" % (sh, sr.to_string_raw()))