summaryrefslogtreecommitdiff
path: root/python/python.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2022-03-09 15:40:26 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-03-09 15:40:26 +0000
commitce73506a856e53859b00c92179a3c5909365eb76 (patch)
tree0fc708ebd2ab0722068fe79f425272c376be6afd /python/python.go
parent5ffb223ebbe1c60fba8c2d208ffad0e606ddc0bb (diff)
parent7e2092a274f215dee379dbe8c1bc4803d55ea93a (diff)
Merge changes Iac0f4ca9,I4a56efb2
* changes: Support BUILD_HOST_static=1 for musl and linux_bionic builds Support building python pars against static or shared musl libc
Diffstat (limited to 'python/python.go')
-rw-r--r--python/python.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/python.go b/python/python.go
index 734ac57f1..b100cc318 100644
--- a/python/python.go
+++ b/python/python.go
@@ -423,6 +423,9 @@ func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
if ctx.Target().Os.Bionic() {
launcherSharedLibDeps = append(launcherSharedLibDeps, "libc", "libdl", "libm")
}
+ if ctx.Target().Os == android.LinuxMusl && !ctx.Config().HostStaticBinaries() {
+ launcherSharedLibDeps = append(launcherSharedLibDeps, "libc_musl")
+ }
switch p.properties.Actual_version {
case pyVersion2:
@@ -432,6 +435,7 @@ func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
if p.bootstrapper.autorun() {
launcherModule = "py2-launcher-autorun"
}
+
launcherSharedLibDeps = append(launcherSharedLibDeps, "libc++")
case pyVersion3:
@@ -441,6 +445,9 @@ func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
if p.bootstrapper.autorun() {
launcherModule = "py3-launcher-autorun"
}
+ if ctx.Config().HostStaticBinaries() && ctx.Target().Os == android.LinuxMusl {
+ launcherModule += "-static"
+ }
if ctx.Device() {
launcherSharedLibDeps = append(launcherSharedLibDeps, "liblog")