Merge "Don't install static snapshot to device" am: bbd42fa946
am: 0e280f68fd
am: bbdecd852f
am: a419d38f10
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1956009 Change-Id: I5e3fbf528b2f072c918b23101ca2b1e53ec1bd42
This commit is contained in:
@@ -15,6 +15,8 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/google/blueprint/proptools"
|
||||
|
||||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
@@ -532,7 +534,13 @@ func (c *snapshotLibraryDecorator) AndroidMkEntries(ctx AndroidMkContext, entrie
|
||||
c.libraryDecorator.androidMkWriteExportedFlags(entries)
|
||||
|
||||
if c.shared() || c.static() {
|
||||
path, file := filepath.Split(c.path.String())
|
||||
src := c.path.String()
|
||||
// For static libraries which aren't installed, directly use Src to extract filename.
|
||||
// This is safe: generated snapshot modules have a real path as Src, not a module
|
||||
if c.static() {
|
||||
src = proptools.String(c.properties.Src)
|
||||
}
|
||||
path, file := filepath.Split(src)
|
||||
stem, suffix, ext := android.SplitFileExt(file)
|
||||
entries.SetString("LOCAL_BUILT_MODULE_STEM", "$(LOCAL_MODULE)"+ext)
|
||||
entries.SetString("LOCAL_MODULE_SUFFIX", suffix)
|
||||
|
@@ -506,7 +506,7 @@ func (p *snapshotLibraryDecorator) link(ctx ModuleContext, flags Flags, deps Pat
|
||||
}
|
||||
|
||||
func (p *snapshotLibraryDecorator) install(ctx ModuleContext, file android.Path) {
|
||||
if p.MatchesWithDevice(ctx.DeviceConfig()) && (p.shared() || p.static()) {
|
||||
if p.MatchesWithDevice(ctx.DeviceConfig()) && p.shared() {
|
||||
p.baseInstaller.install(ctx, file)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user