Support building python pars against static or shared musl libc
Support building python pars against musl libc by either adding libc_musl as an install dependency or using the static version of the python launchers. Bug: 179809553 Test: m USE_HOST_MUSL=true apexer deapexer Test: m USE_HOST_MUSL=true BUILD_HOST_static=true apexer deapexer Change-Id: I4a56efb227bea746836eb785d929eb4b5d8e15f1
This commit is contained in:
@@ -423,6 +423,9 @@ func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||||||
if ctx.Target().Os.Bionic() {
|
if ctx.Target().Os.Bionic() {
|
||||||
launcherSharedLibDeps = append(launcherSharedLibDeps, "libc", "libdl", "libm")
|
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 {
|
switch p.properties.Actual_version {
|
||||||
case pyVersion2:
|
case pyVersion2:
|
||||||
@@ -432,6 +435,7 @@ func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||||||
if p.bootstrapper.autorun() {
|
if p.bootstrapper.autorun() {
|
||||||
launcherModule = "py2-launcher-autorun"
|
launcherModule = "py2-launcher-autorun"
|
||||||
}
|
}
|
||||||
|
|
||||||
launcherSharedLibDeps = append(launcherSharedLibDeps, "libc++")
|
launcherSharedLibDeps = append(launcherSharedLibDeps, "libc++")
|
||||||
|
|
||||||
case pyVersion3:
|
case pyVersion3:
|
||||||
@@ -441,6 +445,9 @@ func (p *Module) DepsMutator(ctx android.BottomUpMutatorContext) {
|
|||||||
if p.bootstrapper.autorun() {
|
if p.bootstrapper.autorun() {
|
||||||
launcherModule = "py3-launcher-autorun"
|
launcherModule = "py3-launcher-autorun"
|
||||||
}
|
}
|
||||||
|
if ctx.Config().HostStaticBinaries() && ctx.Target().Os == android.LinuxMusl {
|
||||||
|
launcherModule += "-static"
|
||||||
|
}
|
||||||
|
|
||||||
if ctx.Device() {
|
if ctx.Device() {
|
||||||
launcherSharedLibDeps = append(launcherSharedLibDeps, "liblog")
|
launcherSharedLibDeps = append(launcherSharedLibDeps, "liblog")
|
||||||
|
Reference in New Issue
Block a user