summaryrefslogtreecommitdiff
path: root/cc
diff options
context:
space:
mode:
authorYi-Yo Chiang <yochiang@google.com>2021-06-07 20:22:35 +0800
committerYi-Yo Chiang <yochiang@google.com>2021-06-08 15:53:46 +0800
commit0de94db3942efbfbe859c396b519e62cd8f5190b (patch)
tree6b4527c4cec884a90a5327344229d7f5d0907403 /cc
parentab5f042d9f458f12e00fef0f81b578941d72adcc (diff)
cc/sabi.go: Propagate ShouldCreateSourceAbiDump to reuseObjTag deps
`reuseObjTag` is a dependency from the shared variant of a `cc_library` to the static variant. When such dependency exist, the shared variant would reuse the object files of the static variant. Thus if the shared variant requires ABI dump, then the static variant would need to generate ABI dump as well. Bug: 190339664 Test: m findlsdump Change-Id: I015328d74acbeb89ff7622397e59b68864af34a4 Merged-In: I015328d74acbeb89ff7622397e59b68864af34a4 (cherry picked from commit 21d1c6d637deca8b4a5757ea1f30a45a29131b97)
Diffstat (limited to 'cc')
-rw-r--r--cc/sabi.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/sabi.go b/cc/sabi.go
index 384dcc165..1f331cb3d 100644
--- a/cc/sabi.go
+++ b/cc/sabi.go
@@ -192,7 +192,7 @@ func sabiDepsMutator(mctx android.TopDownMutatorContext) {
// Mark all of its static library dependencies.
mctx.VisitDirectDeps(func(child android.Module) {
depTag := mctx.OtherModuleDependencyTag(child)
- if libDepTag, ok := depTag.(libraryDependencyTag); ok && libDepTag.static() {
+ if IsStaticDepTag(depTag) || depTag == reuseObjTag {
if c, ok := child.(*Module); ok && c.sabi != nil {
// Mark this module so that .sdump for this static library can be generated.
c.sabi.Properties.ShouldCreateSourceAbiDump = true