fix: linktype for recovery modules in ASAN build is native:platform
When ASAN is on, recovery modules are instaled to
$(OUT_DIR)/target/product/.../data/asan/recovery/root. However, since
this is not under $(TARGET_RECOVERY_OUT), their linktype is incorrectly
determined as native:platform, instead of native:recovery.
To fix this, use get_non_asan_path to have consistent paths when
determining the linktype.
Bug: 115361480
Test: m -j; SANITIZE_TARGET=address m -j
Change-Id: I75edb1fe193d8a1a8099d4f5cf498910ca868d38
diff --git a/core/binary.mk b/core/binary.mk
index 2ccdb41..07deb6c 100644
--- a/core/binary.mk
+++ b/core/binary.mk
@@ -1372,7 +1372,7 @@
my_warn_types :=
my_allowed_types := native:vendor native:vndk
endif
-else ifneq ($(filter $(TARGET_RECOVERY_OUT)/%,$(LOCAL_MODULE_PATH)),)
+else ifneq ($(filter $(TARGET_RECOVERY_OUT)/%,$(call get_non_asan_path,$(LOCAL_MODULE_PATH))),)
my_link_type := native:recovery
my_warn_types :=
# TODO(b/113303515) remove native:platform and my_allowed_ndk_types