summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2020-11-10 18:12:15 -0800
committerColin Cross <ccross@android.com>2020-11-23 18:06:08 -0800
commite9fe2949b887deba2b46b2a8c043f228a95e99e3 (patch)
treee285b9eafe019735fa83ff24f9b4b9da4c93b924 /python
parentb893f8766c4fe8b494f92b4c9c9097224bb307fc (diff)
Annotate dependency tags for dependencies of installed files
Relands Ic22603a5c0718b5a21686672a7471f952b4d1017 with a minor change to track libc++ dependencies for python hosts and after a fix to an internal genrule that depended on transitively installed java libraries (ag/13068670). Soong currently assumes that installed files should depend on installed files of all transitive dependencies, which results in extra installed file dependencies through genrules, static libs, etc. Annotate dependency tags for dependencies for which the installed files are necessary such as shared libraries and JNI libraries. This avoids extra installed files, and is also a first step towards genrules using their own copy of tools instead of the installed copy. Bug: 124313442 Test: m checkbuild Test: java.TestBinary Test: cc.TestInstallSharedLibs Test: deptag_test.go Change-Id: I725871249d561428e6f67bba6a7c65b580012b72
Diffstat (limited to 'python')
-rw-r--r--python/python.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/python/python.go b/python/python.go
index e4c8e9481..456e1670e 100644
--- a/python/python.go
+++ b/python/python.go
@@ -214,10 +214,16 @@ type dependencyTag struct {
name string
}
+type installDependencyTag struct {
+ blueprint.BaseDependencyTag
+ android.InstallAlwaysNeededDependencyTag
+ name string
+}
+
var (
pythonLibTag = dependencyTag{name: "pythonLib"}
launcherTag = dependencyTag{name: "launcher"}
- launcherSharedLibTag = dependencyTag{name: "launcherSharedLib"}
+ launcherSharedLibTag = installDependencyTag{name: "launcherSharedLib"}
pyIdentifierRegexp = regexp.MustCompile(`^[a-zA-Z_][a-zA-Z0-9_-]*$`)
pyExt = ".py"
protoExt = ".proto"
@@ -328,6 +334,7 @@ func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
// cannot read the property at this stage and it will be too late to add
// dependencies later.
ctx.AddFarVariationDependencies(ctx.Target().Variations(), launcherSharedLibTag, "libsqlite")
+ ctx.AddFarVariationDependencies(ctx.Target().Variations(), launcherSharedLibTag, "libc++")
if ctx.Target().Os.Bionic() {
ctx.AddFarVariationDependencies(ctx.Target().Variations(), launcherSharedLibTag,