Ignore vndk compat symlinks in artifact path requirements

A change is being made to properly track apex compat symlinks in
the installation logic, which causes the artifact path requirements
to start complaining about them. Exclude them from the artifact path
requirements.

Bug: 205632228
Test: m nothing
Change-Id: Ie975b7450574d41bb13bb2179edc31ba4edd413e
diff --git a/core/base_rules.mk b/core/base_rules.mk
index e7c28ec..b3c5b94 100644
--- a/core/base_rules.mk
+++ b/core/base_rules.mk
@@ -965,6 +965,9 @@
       $(my_init_rc_installed) \
       $(my_installed_test_data) \
       $(my_vintf_installed))
+
+  ALL_MODULES.$(my_register_name).INSTALLED_SYMLINKS := $(LOCAL_SOONG_INSTALL_SYMLINKS)
+
   # Store the list of colon-separated pairs of the built and installed locations
   # of files provided by this module.  Used by custom packaging rules like
   # package-modules.mk that need to copy the built files to a custom install
diff --git a/core/main.mk b/core/main.mk
index 5738cdb..12b7bd0 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -1720,8 +1720,10 @@
     unbundled_build_modules := $(sort $(TARGET_BUILD_APPS))
   endif
 
-  # Dist the installed files if they exist.
-  apps_only_installed_files := $(foreach m,$(unbundled_build_modules),$(ALL_MODULES.$(m).INSTALLED))
+  # Dist the installed files if they exist, except the installed symlinks. dist-for-goals emits
+  # `cp src dest` commands, which will fail to copy dangling symlinks.
+  apps_only_installed_files := $(foreach m,$(unbundled_build_modules),\
+    $(filter-out $(ALL_MODULES.$(m).INSTALLED_SYMLINKS),$(ALL_MODULES.$(m).INSTALLED)))
   $(call dist-for-goals,apps_only, $(apps_only_installed_files))
 
   # Dist the bundle files if they exist.