Install VNDK snapshot libraries for system build
When BOARD_VNDK_VERSION := <VNDK version>, or PRODUCT_EXTRA_VNDK_VERSIONS includes the needed <VNDK version> list, the prebuilt VNDK libs in prebuilts/vndk/ directory will be installed. Each prebuilt VNDK module uses "vndk_prebuilt_shared" for shared VNDK/VNDK-SP libs. Following is the sample configuration of a vndk snapshot module: vndk_prebuilt_shared { name: "libfoo", version: "27", vendor_available: true, vndk: { enabled: true, }, arch: { arm64: { srcs: ["arm/lib64/libfoo.so"], }, arm: { srcs: ["arm/lib/libfoo.so"], }, }, } The Android.bp for the snapshot modules will be auto-generated by a script. Bug: 38304393 Bug: 65377115 Bug: 68123344 Test: set BOARD_VNDK_VERSION := 27 copy a snapshot for v27 build with make command Change-Id: Ib93107530dbabb4a24583f4d6e4f0c513c9adfec
This commit is contained in:
@@ -348,3 +348,24 @@ func (c *llndkStubDecorator) AndroidMk(ctx AndroidMkContext, ret *android.Androi
|
||||
fmt.Fprintln(w, "LOCAL_USE_VNDK := true")
|
||||
})
|
||||
}
|
||||
|
||||
func (c *vndkPrebuiltLibraryDecorator) AndroidMk(ctx AndroidMkContext, ret *android.AndroidMkData) {
|
||||
ret.Class = "SHARED_LIBRARIES"
|
||||
|
||||
ret.SubName = vndkSuffix + c.version()
|
||||
|
||||
ret.Extra = append(ret.Extra, func(w io.Writer, outputFile android.Path) {
|
||||
c.libraryDecorator.androidMkWriteExportedFlags(w)
|
||||
|
||||
path := c.path.RelPathString()
|
||||
dir, file := filepath.Split(path)
|
||||
stem := strings.TrimSuffix(file, filepath.Ext(file))
|
||||
fmt.Fprintln(w, "LOCAL_STRIP_MODULE := false")
|
||||
fmt.Fprintln(w, "LOCAL_SYSTEM_SHARED_LIBRARIES :=")
|
||||
fmt.Fprintln(w, "LOCAL_USE_VNDK := true")
|
||||
fmt.Fprintln(w, "LOCAL_BUILT_MODULE_STEM := $(LOCAL_MODULE)"+outputFile.Ext())
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_SUFFIX := "+filepath.Ext(file))
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_PATH := $(OUT_DIR)/"+filepath.Clean(dir))
|
||||
fmt.Fprintln(w, "LOCAL_MODULE_STEM := "+stem)
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user