diff --git a/cc/cc.go b/cc/cc.go
index bda9c9d..ba06be2 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -35,6 +35,7 @@
 
 	android.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {
 		ctx.BottomUp("link", linkageMutator).Parallel()
+		ctx.BottomUp("vndk", vndkMutator).Parallel()
 		ctx.BottomUp("image", vendorMutator).Parallel()
 		ctx.BottomUp("ndk_api", ndkApiMutator).Parallel()
 		ctx.BottomUp("test_per_src", testPerSrcMutator).Parallel()
@@ -464,7 +465,7 @@
 
 // Create source abi dumps if the module belongs to the list of VndkLibraries.
 func (ctx *moduleContextImpl) createVndkSourceAbiDump() bool {
-	return ctx.ctx.Device() && (ctx.mod.isVndk() || inList(ctx.baseModuleName(), config.LLndkLibraries()))
+	return ctx.ctx.Device() && (ctx.mod.isVndk() || inList(ctx.baseModuleName(), llndkLibraries))
 }
 
 func (ctx *moduleContextImpl) selectedStl() string {
@@ -762,7 +763,7 @@
 					} else {
 						variantLibs = append(variantLibs, entry+ndkLibrarySuffix)
 					}
-				} else if ctx.vndk() && inList(entry, config.LLndkLibraries()) {
+				} else if ctx.vndk() && inList(entry, llndkLibraries) {
 					nonvariantLibs = append(nonvariantLibs, entry+llndkLibrarySuffix)
 				} else {
 					nonvariantLibs = append(nonvariantLibs, entry)
@@ -1126,7 +1127,7 @@
 		case sharedDepTag, sharedExportDepTag, lateSharedDepTag:
 			libName := strings.TrimSuffix(name, llndkLibrarySuffix)
 			libName = strings.TrimPrefix(libName, "prebuilt_")
-			isLLndk := inList(libName, config.LLndkLibraries())
+			isLLndk := inList(libName, llndkLibraries)
 			if c.vndk() && (Bool(cc.Properties.Vendor_available) || isLLndk) {
 				libName += vendorSuffix
 			}
diff --git a/cc/config/global.go b/cc/config/global.go
index 64fbd32..82a44e6 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -191,17 +191,6 @@
 	}, " ")
 }
 
-func VndkLibraries() []string {
-	return []string{}
-}
-
-// This needs to be kept up to date with the list in system/core/rootdir/etc/ld.config.txt:
-// [vendor]
-// namespace.default.link.system.shared_libs
-func LLndkLibraries() []string {
-	return []string{"libc", "libm", "libdl", "liblog", "libandroid_net", "ld-android"}
-}
-
 func replaceFirst(slice []string, from, to string) {
 	if slice[0] != from {
 		panic(fmt.Errorf("Expected %q, found %q", from, to))
diff --git a/cc/library.go b/cc/library.go
index 4e3e2b3..4a173a5 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -21,7 +21,6 @@
 	"github.com/google/blueprint/pathtools"
 
 	"android/soong/android"
-	"android/soong/cc/config"
 )
 
 type LibraryProperties struct {
@@ -621,7 +620,7 @@
 }
 
 func vndkVsNdk(ctx ModuleContext) bool {
-	if inList(ctx.baseModuleName(), config.LLndkLibraries()) {
+	if inList(ctx.baseModuleName(), llndkLibraries) {
 		return false
 	}
 	return true
diff --git a/cc/makevars.go b/cc/makevars.go
index 294f3e6..8bdcf9f 100644
--- a/cc/makevars.go
+++ b/cc/makevars.go
@@ -59,6 +59,10 @@
 		ctx.Strict("BOARD_VNDK_VERSION", "")
 	}
 
+	ctx.Strict("VNDK_CORE_LIBRARIES", strings.Join(vndkCoreLibraries, " "))
+	ctx.Strict("VNDK_SAMEPROCESS_LIBRARIES", strings.Join(vndkSpLibraries, " "))
+	ctx.Strict("LLNDK_LIBRARIES", strings.Join(llndkLibraries, " "))
+
 	ctx.Strict("ADDRESS_SANITIZER_CONFIG_EXTRA_CFLAGS", strings.Join(asanCflags, " "))
 	ctx.Strict("ADDRESS_SANITIZER_CONFIG_EXTRA_LDFLAGS", strings.Join(asanLdflags, " "))
 	ctx.Strict("ADDRESS_SANITIZER_CONFIG_EXTRA_STATIC_LIBRARIES", strings.Join(asanLibs, " "))
diff --git a/cc/sabi.go b/cc/sabi.go
index 1a5361d..15d980c 100644
--- a/cc/sabi.go
+++ b/cc/sabi.go
@@ -79,7 +79,7 @@
 
 func sabiDepsMutator(mctx android.TopDownMutatorContext) {
 	if c, ok := mctx.Module().(*Module); ok &&
-		(c.isVndk() || inList(c.Name(), config.LLndkLibraries()) ||
+		(c.isVndk() || inList(c.Name(), llndkLibraries) ||
 			(c.sabi != nil && c.sabi.Properties.CreateSAbiDumps)) {
 		mctx.VisitDirectDeps(func(m blueprint.Module) {
 			tag := mctx.OtherModuleDependencyTag(m)
diff --git a/cc/util.go b/cc/util.go
index eeb64eb..cc89af6 100644
--- a/cc/util.go
+++ b/cc/util.go
@@ -131,3 +131,10 @@
 	}
 	return list
 }
+
+func addSuffix(list []string, suffix string) []string {
+	for i := range list {
+		list[i] = list[i] + suffix
+	}
+	return list
+}
diff --git a/cc/vndk.go b/cc/vndk.go
index fd1bdcb..2e6ac13 100644
--- a/cc/vndk.go
+++ b/cc/vndk.go
@@ -15,6 +15,9 @@
 package cc
 
 import (
+	"strings"
+	"sync"
+
 	"android/soong/android"
 )
 
@@ -96,3 +99,38 @@
 		return
 	}
 }
+
+var (
+	vndkCoreLibraries []string
+	vndkSpLibraries   []string
+	llndkLibraries    []string
+	vndkLibrariesLock sync.Mutex
+)
+
+// gather list of vndk-core, vndk-sp, and ll-ndk libs
+func vndkMutator(mctx android.BottomUpMutatorContext) {
+	if m, ok := mctx.Module().(*Module); ok {
+		if _, ok := m.linker.(*llndkStubDecorator); ok {
+			vndkLibrariesLock.Lock()
+			defer vndkLibrariesLock.Unlock()
+			name := strings.TrimSuffix(m.Name(), llndkLibrarySuffix)
+			if !inList(name, llndkLibraries) {
+				llndkLibraries = append(llndkLibraries, name)
+			}
+		} else if lib, ok := m.linker.(*libraryDecorator); ok && lib.shared() {
+			if m.vndkdep.isVndk() {
+				vndkLibrariesLock.Lock()
+				defer vndkLibrariesLock.Unlock()
+				if m.vndkdep.isVndkSp() {
+					if !inList(m.Name(), vndkSpLibraries) {
+						vndkSpLibraries = append(vndkSpLibraries, m.Name())
+					}
+				} else {
+					if !inList(m.Name(), vndkCoreLibraries) {
+						vndkCoreLibraries = append(vndkCoreLibraries, m.Name())
+					}
+				}
+			}
+		}
+	}
+}
