Merge changes from topic "sign_target_files_iot-aosp"

* changes:
  Write combined bpt definition directly into META/partition-table.bpt
  Support regenerating partition table with bpttool in sign_target_files_apks
  Don't suppress stderr for 'avbtool make_vbmeta_image'
  Include default Android Things AVB keys in otatools.zip
diff --git a/core/base_rules.mk b/core/base_rules.mk
index ec04f14..63c6c52 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -682,11 +682,32 @@
 ALL_MODULES.$(my_register_name).PICKUP_FILES := \
     $(ALL_MODULES.$(my_register_name).PICKUP_FILES) $(LOCAL_PICKUP_FILES)
 endif
+
 my_required_modules := $(LOCAL_REQUIRED_MODULES) \
     $(LOCAL_REQUIRED_MODULES_$(TARGET_$(LOCAL_2ND_ARCH_VAR_PREFIX)ARCH))
 ifdef LOCAL_IS_HOST_MODULE
 my_required_modules += $(LOCAL_REQUIRED_MODULES_$($(my_prefix)OS))
 endif
+
+###############################################################################
+## When compiling against the VNDK, add the .vendor suffix to required modules.
+###############################################################################
+ifneq ($(LOCAL_USE_VNDK),)
+  ####################################################
+  ## Soong modules may be built twice, once for /system
+  ## and once for /vendor. If we're using the VNDK,
+  ## switch all soong libraries over to the /vendor
+  ## variant.
+  ####################################################
+  ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
+    # We don't do this renaming for soong-defined modules since they already
+    # have correct names (with .vendor suffix when necessary) in their
+    # LOCAL_*_LIBRARIES.
+    my_required_modules := $(foreach l,$(my_required_modules),\
+      $(if $(SPLIT_VENDOR.SHARED_LIBRARIES.$(l)),$(l).vendor,$(l)))
+  endif
+endif
+
 ALL_MODULES.$(my_register_name).REQUIRED := \
     $(strip $(ALL_MODULES.$(my_register_name).REQUIRED) $(my_required_modules))
 ALL_MODULES.$(my_register_name).EXPLICITLY_REQUIRED := \
diff --git a/core/use_lld_setup.mk b/core/use_lld_setup.mk
index 69ceddc..17a9e27 100644
--- a/core/use_lld_setup.mk
+++ b/core/use_lld_setup.mk
@@ -12,3 +12,11 @@
     my_use_clang_lld := true
   endif
 endif
+
+# Do not use LLD for Darwin host executables or shared libraries.
+# See https://lld.llvm.org/AtomLLD.html for status of lld for Mach-O.
+ifeq ($(LOCAL_IS_HOST_MODULE),true)
+  ifeq ($(HOST_OS),darwin)
+    my_use_clang_lld := false
+  endif
+endif