Link shared libs to x86/x86_64 folder if available

Currently, the shared libs are not categorized according to arch,
which adds more redundant dependencies at runtime and might mislead
the test execution.

Test: m host-unit-tests
Bug: 351909435
Change-Id: I48f8e6752879cdd4d510ce5b611dc6c118a42f8f
diff --git a/core/definitions.mk b/core/definitions.mk
index b30b159..cd1b36e 100644
--- a/core/definitions.mk
+++ b/core/definitions.mk
@@ -3612,6 +3612,7 @@
     $$(foreach f,$$(my_compat_dist_$(suite)),$$(call word-colon,2,$$(f))) \
     $$(foreach f,$$(my_compat_dist_config_$(suite)),$$(call word-colon,2,$$(f))) \
     $$(my_compat_dist_test_data_$(suite))) \
+  $(eval COMPATIBILITY.$(suite).ARCH_DIRS.$(my_register_name) := $(my_compat_module_arch_dir_$(suite).$(my_register_name))) \
   $(eval COMPATIBILITY.$(suite).API_MAP_FILES += $$(my_compat_api_map_$(suite))) \
   $(eval COMPATIBILITY.$(suite).SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES += $(LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES)) \
   $(eval ALL_COMPATIBILITY_DIST_FILES += $$(my_compat_dist_$(suite))) \