diff options
author | 2025-03-13 00:38:10 -0700 | |
---|---|---|
committer | 2025-03-13 00:38:10 -0700 | |
commit | 94c261bcb01e2ae05121c171592de5b502953793 (patch) | |
tree | 78b2ce0d29bd94656a85dc6af7f137c6035d6abd /python/binary.go | |
parent | 5509f0867e4bb4857cc93ee5ae7b9c2697af81b8 (diff) | |
parent | 8c7c65ee0ad573eac46b6a1549abb2abbcb554f5 (diff) |
Merge "Add Shared libraries support for Android python libraries" into main
Diffstat (limited to 'python/binary.go')
-rw-r--r-- | python/binary.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/python/binary.go b/python/binary.go index af7d30faa..f894299f9 100644 --- a/python/binary.go +++ b/python/binary.go @@ -125,6 +125,7 @@ func (p *PythonBinaryModule) GenerateAndroidBuildActions(ctx android.ModuleConte func (p *PythonBinaryModule) buildBinary(ctx android.ModuleContext) { embeddedLauncher := p.isEmbeddedLauncherEnabled() depsSrcsZips := p.collectPathsFromTransitiveDeps(ctx, embeddedLauncher) + bundleSharedLibs := p.collectSharedLibDeps(ctx) main := "" if p.autorun() { main = p.getPyMainFile(ctx, p.srcsPathMappings) @@ -149,6 +150,11 @@ func (p *PythonBinaryModule) buildBinary(ctx android.ModuleContext) { srcsZips = append(srcsZips, p.srcsZip) } srcsZips = append(srcsZips, depsSrcsZips...) + if ctx.Host() && len(bundleSharedLibs) > 0 { + // only bundle shared libs for host binaries + sharedLibZip := p.zipSharedLibs(ctx, bundleSharedLibs) + srcsZips = append(srcsZips, sharedLibZip) + } p.installSource = registerBuildActionForParFile(ctx, embeddedLauncher, launcherPath, "python3", main, p.getStem(ctx), srcsZips) |