diff options
author | Colin Cross <ccross@android.com> | 2017-05-03 11:01:58 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2017-05-03 12:28:27 -0700 |
commit | 10d2231d441ac2010f26ed88f0f32d85afe59340 (patch) | |
tree | d0fb67b2ad38fc7347def224f736dbd85f13d069 /cc/cc.go | |
parent | 5ff51b5caab07ff1933081fb4f3ea1d3b010e98b (diff) | |
download | build_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.go | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 } } |