Revert "Revert "cc: use platform sdk version for vendor/product ..."
Revert submission 3341364-revert-3334193-no-llndk-versioning-YOLDNTJGYM
Reason for revert: with broken target fixed.
- LLNDK stubs with all symbols (999999 as "future" vendor api level)
Reverted changes: /q/submissionid:3341364-revert-3334193-no-llndk-versioning-YOLDNTJGYM
Bug: 362658565
Test: builds
Change-Id: Iadef279c10d3050c8fe7bff2465e22cb63080a1f
diff --git a/cc/library.go b/cc/library.go
index 7dffa72..4ce506e 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -566,16 +566,10 @@
func (library *libraryDecorator) compile(ctx ModuleContext, flags Flags, deps PathDeps) Objects {
if ctx.IsLlndk() {
- vendorApiLevel := ctx.Config().VendorApiLevel()
- if vendorApiLevel == "" {
- // TODO(b/321892570): Some tests relying on old fixtures which
- // doesn't set vendorApiLevel. Needs to fix them.
- vendorApiLevel = ctx.Config().PlatformSdkVersion().String()
- }
- // This is the vendor variant of an LLNDK library, build the LLNDK stubs.
+ futureVendorApiLevel := android.ApiLevelOrPanic(ctx, "999999")
nativeAbiResult := parseNativeAbiDefinition(ctx,
String(library.Properties.Llndk.Symbol_file),
- android.ApiLevelOrPanic(ctx, vendorApiLevel), "--llndk")
+ futureVendorApiLevel, "--llndk")
objs := compileStubLibrary(ctx, flags, nativeAbiResult.stubSrc)
if !Bool(library.Properties.Llndk.Unversioned) {
library.versionScriptPath = android.OptionalPathForPath(