16e91a067d
This change fixes following problem: 1) a native lib having stubs is defined. 2) the lib is included in an APEX. 3) a static binary is linking the lib from outside of the APEX. 4) then, the dependency from the binary to the lib is vanishing. This is happening because cc.depsToPaths() mistakely does not distinguish static lib deps from shared lib deps. For shared lib deps, it creates two dependencies (one for stubs variant and the other for non-stubs variant) and choose the stubs variant when the lib and the current module is not in the same APEX (i.e. dependency to the non-stubs variant is discarded). However, since we don't have stubs variant for static library, it ends up having no dependency to the library if the link is static. Fixing the issue by skipping the variant selection routine when the link is static. Test: m (apex_test added) Test: build with https://android-review.googlesource.com/c/platform/bionic/+/849044 Change-Id: I21102a31cc5c0b105da2affdd035bd5cc571a6ab |
||
---|---|---|
.. | ||
apex.go | ||
apex_test.go | ||
key.go |