List of VNDK-related libs are exported to make

LL-NDK, VNDK-core, VNDK-SP libraries are exported to make as
SOONG_LLNDK_LIBRARIES, SOONG_VNDK_CORE_LIBRARIES, and
SOONG_VNDK_SAMEPROCESS_LIBRARIES. This can be used to auto-generate
ld.config.txt from a template.

Bug: 64013660
Test: BOARD_VNDK_VERSION=current m -j successful
Test: check out/soong/make_vars*.mk and look for SOONG_*_LIBRARIES

Merged-In: I0f4c5d05d9cd28c3fc9fdcca6ce0e6eaeaacbe8d
Change-Id: I0f4c5d05d9cd28c3fc9fdcca6ce0e6eaeaacbe8d
diff --git a/cc/cc.go b/cc/cc.go
index 0f754a6..983ffc0 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()
@@ -457,7 +458,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 {
@@ -745,7 +746,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)
@@ -1109,7 +1110,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
 			}