summaryrefslogtreecommitdiff
path: root/python/binary.go
diff options
context:
space:
mode:
author Alex Márquez Pérez Muñíz Díaz Púras Thaureaux <alexmarquez@google.com> 2021-09-17 20:30:21 +0000
committer Alex Márquez Pérez Muñíz Díaz Púras Thaureaux <alexmarquez@google.com> 2021-10-01 19:51:02 +0000
commit19d399d4c58e2883c6aa453d6fad834313ce6d44 (patch)
treeec0a27307e4498bbd35762a0ee677d70a6c212c0 /python/binary.go
parent1b5262bd69ad18b66166bd7279ef5cebd068c952 (diff)
Have python_*{,_host} handle arch-variants
Bug: 196081778 Test: TestPython*{,Host}ArchVariance Test: go test Test: mixed_{libc,droid}.sh Change-Id: I89304e58f5bacd61534732bade4ad6bb5f2671c0
Diffstat (limited to 'python/binary.go')
-rw-r--r--python/binary.go12
1 files changed, 5 insertions, 7 deletions
diff --git a/python/binary.go b/python/binary.go
index bc2768c72..afcc53a65 100644
--- a/python/binary.go
+++ b/python/binary.go
@@ -63,6 +63,7 @@ func PythonBinaryBp2Build(ctx android.TopDownMutatorContext) {
}
}
}
+
// TODO(b/182306917): this doesn't fully handle all nested props versioned
// by the python version, which would have been handled by the version split
// mutator. This is sufficient for very simple python_binary_host modules
@@ -80,15 +81,12 @@ func PythonBinaryBp2Build(ctx android.TopDownMutatorContext) {
// do nothing, since python_version defaults to PY3.
}
- srcs := android.BazelLabelForModuleSrcExcludes(ctx, m.properties.Srcs, m.properties.Exclude_srcs)
- data := android.BazelLabelForModuleSrc(ctx, m.properties.Data)
- deps := android.BazelLabelForModuleDeps(ctx, m.properties.Libs)
-
+ baseAttrs := m.makeArchVariantBaseAttributes(ctx)
attrs := &bazelPythonBinaryAttributes{
Main: main,
- Srcs: bazel.MakeLabelListAttribute(srcs),
- Data: bazel.MakeLabelListAttribute(data),
- Deps: bazel.MakeLabelListAttribute(deps),
+ Srcs: baseAttrs.Srcs,
+ Data: baseAttrs.Data,
+ Deps: baseAttrs.Deps,
Python_version: python_version,
}