Differentiate between public and module-lib stub variants
The public stubs of libclang_rt.* originate from the same module. When
generating the Androidmk entries for these stubs, we need to add a
suffix to differentiate between the two stub variants.
This is likely an issue specific to libclang_rt.*. The public stubs of
other libraries like libc, liblog, ... come from a separate module
ndk_library which adds an .ndk suffix
Test: lunch module_arm64only && TARGET_BUILD_APPS="build.bazel.examples.apex.minimal" build/soong/soong_ui.bash --make-mode nothing
(with aosp/2535141)
Test: lunch aosp_cf_arm64_phone-userdebug && m nothing
Change-Id: I2b4411cb022b4e27f44d2fce6cb26492dd7e2278
diff --git a/cc/cc.go b/cc/cc.go
index 9c555a1..ae82b9e 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1858,6 +1858,10 @@
if c.SplitPerApiLevel() {
subName += "." + c.SdkVersion()
}
+ } else if c.IsStubs() && c.IsSdkVariant() {
+ // Public API surface (NDK)
+ // Add a suffix to this stub variant to distinguish it from the module-lib stub variant.
+ subName = sdkSuffix
}
return subName