diff --git a/cc/androidmk.go b/cc/androidmk.go
index a92a95c..940e7c7 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -23,6 +23,10 @@
 	"android/soong/android"
 )
 
+var (
+	vendorSuffix = ".vendor"
+)
+
 type AndroidMkContext interface {
 	Target() android.Target
 	subAndroidMk(*android.AndroidMkData, interface{})
@@ -81,8 +85,10 @@
 	}
 	c.subAndroidMk(&ret, c.installer)
 
-	if c.vndk() {
-		ret.SubName += ".vendor"
+	if c.vndk() && Bool(c.Properties.Vendor_available) {
+		// .vendor suffix is added only when we will have two variants: core and vendor.
+		// The suffix is not added for vendor-only module.
+		ret.SubName += vendorSuffix
 	}
 
 	return ret, nil
diff --git a/cc/cc.go b/cc/cc.go
index ae48250..0f754a6 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -720,9 +720,6 @@
 
 	deps := c.deps(ctx)
 
-	c.Properties.AndroidMkSharedLibs = append(c.Properties.AndroidMkSharedLibs, deps.SharedLibs...)
-	c.Properties.AndroidMkSharedLibs = append(c.Properties.AndroidMkSharedLibs, deps.LateSharedLibs...)
-
 	variantNdkLibs := []string{}
 	variantLateNdkLibs := []string{}
 	if ctx.Os() == android.Android {
@@ -1101,6 +1098,26 @@
 			}
 			*depPtr = append(*depPtr, dep.Path())
 		}
+
+		// Export the shared libs to the make world. In doing so, .vendor suffix
+		// is added if the lib has both core and vendor variants and this module
+		// is building against vndk. This is because the vendor variant will be
+		// have .vendor suffix in its name in the make world. However, if the
+		// lib is a vendor-only lib or this lib is not building against vndk,
+		// then the suffix is not added.
+		switch tag {
+		case sharedDepTag, sharedExportDepTag, lateSharedDepTag:
+			libName := strings.TrimSuffix(name, llndkLibrarySuffix)
+			libName = strings.TrimPrefix(libName, "prebuilt_")
+			isLLndk := inList(libName, config.LLndkLibraries())
+			if c.vndk() && (Bool(cc.Properties.Vendor_available) || isLLndk) {
+				libName += vendorSuffix
+			}
+			// Note: the order of libs in this list is not important because
+			// they merely serve as dependencies in the make world and do not
+			// affect this lib itself.
+			c.Properties.AndroidMkSharedLibs = append(c.Properties.AndroidMkSharedLibs, libName)
+		}
 	})
 
 	// Dedup exported flags from dependencies
diff --git a/cc/sanitize.go b/cc/sanitize.go
index 385b565..1fcb32c 100644
--- a/cc/sanitize.go
+++ b/cc/sanitize.go
@@ -116,7 +116,8 @@
 type sanitize struct {
 	Properties SanitizeProperties
 
-	runtimeLibrary string
+	runtimeLibrary          string
+	androidMkRuntimeLibrary string
 }
 
 func (sanitize *sanitize) props() []interface{} {
@@ -419,12 +420,18 @@
 		runtimeLibrary = config.UndefinedBehaviorSanitizerRuntimeLibrary(ctx.toolchain())
 	}
 
-	// ASan runtime library must be the first in the link order.
 	if runtimeLibrary != "" {
+		// ASan runtime library must be the first in the link order.
 		flags.libFlags = append([]string{
 			"${config.ClangAsanLibDir}/" + runtimeLibrary + ctx.toolchain().ShlibSuffix(),
 		}, flags.libFlags...)
 		sanitize.runtimeLibrary = runtimeLibrary
+
+		// When linking against VNDK, use the vendor variant of the runtime lib
+		sanitize.androidMkRuntimeLibrary = sanitize.runtimeLibrary
+		if ctx.vndk() {
+			sanitize.androidMkRuntimeLibrary = sanitize.runtimeLibrary + vendorSuffix
+		}
 	}
 
 	blacklist := android.OptionalPathForModuleSrc(ctx, sanitize.Properties.Sanitize.Blacklist)
@@ -438,8 +445,8 @@
 
 func (sanitize *sanitize) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
 	ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) error {
-		if sanitize.runtimeLibrary != "" {
-			fmt.Fprintln(w, "LOCAL_SHARED_LIBRARIES += "+sanitize.runtimeLibrary)
+		if sanitize.androidMkRuntimeLibrary != "" {
+			fmt.Fprintln(w, "LOCAL_SHARED_LIBRARIES += "+sanitize.androidMkRuntimeLibrary)
 		}
 
 		return nil
