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
This commit is contained in:
Spandan Das 2023-04-13 18:15:05 +00:00
parent 748fd189b5
commit b2b41d57cd

View file

@ -1858,6 +1858,10 @@ func GetSubnameProperty(actx android.ModuleContext, c LinkableInterface) string
if c.SplitPerApiLevel() { if c.SplitPerApiLevel() {
subName += "." + c.SdkVersion() 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 return subName