Merge "Exclude ndk stubs from notice file list" am: b923eb60cd am: 376d29284a
am: 3ae9924032
Change-Id: Ieffc9535cafe96f2c7873bed21e86efa5e794fc4
diff --git a/core/clear_vars.mk b/core/clear_vars.mk
index 0067c9f..c2ae8b8 100644
--- a/core/clear_vars.mk
+++ b/core/clear_vars.mk
@@ -157,6 +157,7 @@
LOCAL_NO_FPIE :=
LOCAL_NO_LIBCOMPILER_RT:=
LOCAL_NO_LIBGCC:=
+LOCAL_NO_NOTICE_FILE:=
LOCAL_NO_PIC:=
LOCAL_NOSANITIZE:=
LOCAL_NO_STANDARD_LIBRARIES:=
diff --git a/core/notice_files.mk b/core/notice_files.mk
index 447e59b..f850fff 100644
--- a/core/notice_files.mk
+++ b/core/notice_files.mk
@@ -14,6 +14,14 @@
notice_file :=
endif
+# Soong generates stub libraries that don't need NOTICE files
+ifdef LOCAL_NO_NOTICE_FILE
+ ifneq ($(LOCAL_MODULE_MAKEFILE),$(SOONG_ANDROID_MK))
+ $(call pretty-error,LOCAL_NO_NOTICE_FILE should not be used by Android.mk files)
+ endif
+ notice_file :=
+endif
+
ifeq ($(LOCAL_MODULE_CLASS),NOTICE_FILES)
# If this is a NOTICE-only module, we don't include base_rule.mk,
# so my_prefix is not set at this point.