aboutsummaryrefslogtreecommitdiffstats
path: root/cc/cc.go
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-05-03 11:01:58 -0700
committerColin Cross <ccross@android.com>2017-05-03 12:28:27 -0700
commit10d2231d441ac2010f26ed88f0f32d85afe59340 (patch)
treed0fb67b2ad38fc7347def224f736dbd85f13d069 /cc/cc.go
parent5ff51b5caab07ff1933081fb4f3ea1d3b010e98b (diff)
downloadbuild_soong-10d2231d441ac2010f26ed88f0f32d85afe59340.tar.gz
build_soong-10d2231d441ac2010f26ed88f0f32d85afe59340.tar.bz2
build_soong-10d2231d441ac2010f26ed88f0f32d85afe59340.zip
Check reused source files in hasSrcExt
hasSrcExt is used to determine extra flags and dependencies when generated files are used. If the generated files are being handled in a static library whose objects are reused in a shared library, the flags and dependencies still need to apply. Instead of clearing the source files in the shared library, move them to an OriginalSrcs property, and check that in hasSrcExt along with the Srcs property. Also pass extra exported include directories from the static library to the shared library. Bug: 37555583 Test: use protos in a cc_library Change-Id: I709779ec03b66b220b7bd58a1f6f0b9b5067d955
Diffstat (limited to 'cc/cc.go')
-rw-r--r--cc/cc.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cc/cc.go b/cc/cc.go
index bbdcf6f9..f368a133 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -950,7 +950,9 @@ func (c *Module) depsToPaths(ctx android.ModuleContext) PathDeps {
if tag == reuseObjTag {
if l, ok := cc.compiler.(libraryInterface); ok {
- depPaths.Objs = depPaths.Objs.Append(l.reuseObjs())
+ objs, flags := l.reuseObjs()
+ depPaths.Objs = depPaths.Objs.Append(objs)
+ depPaths.ReexportedFlags = append(depPaths.ReexportedFlags, flags...)
return
}
}