Merge "Support prebuilt_renderscript_bitcode modules" into main
This commit is contained in:
commit
3996ffbc13
1 changed files with 27 additions and 2 deletions
|
@ -65,6 +65,7 @@ func RegisterPrebuiltEtcBuildComponents(ctx android.RegistrationContext) {
|
||||||
ctx.RegisterModuleType("prebuilt_firmware", PrebuiltFirmwareFactory)
|
ctx.RegisterModuleType("prebuilt_firmware", PrebuiltFirmwareFactory)
|
||||||
ctx.RegisterModuleType("prebuilt_dsp", PrebuiltDSPFactory)
|
ctx.RegisterModuleType("prebuilt_dsp", PrebuiltDSPFactory)
|
||||||
ctx.RegisterModuleType("prebuilt_rfsa", PrebuiltRFSAFactory)
|
ctx.RegisterModuleType("prebuilt_rfsa", PrebuiltRFSAFactory)
|
||||||
|
ctx.RegisterModuleType("prebuilt_renderscript_bitcode", PrebuiltRenderScriptBitcodeFactory)
|
||||||
|
|
||||||
ctx.RegisterModuleType("prebuilt_defaults", defaultsFactory)
|
ctx.RegisterModuleType("prebuilt_defaults", defaultsFactory)
|
||||||
|
|
||||||
|
@ -149,12 +150,15 @@ type PrebuiltEtc struct {
|
||||||
sourceFilePath android.Path
|
sourceFilePath android.Path
|
||||||
outputFilePath android.OutputPath
|
outputFilePath android.OutputPath
|
||||||
// The base install location, e.g. "etc" for prebuilt_etc, "usr/share" for prebuilt_usr_share.
|
// The base install location, e.g. "etc" for prebuilt_etc, "usr/share" for prebuilt_usr_share.
|
||||||
installDirBase string
|
installDirBase string
|
||||||
|
installDirBase64 string
|
||||||
// The base install location when soc_specific property is set to true, e.g. "firmware" for
|
// The base install location when soc_specific property is set to true, e.g. "firmware" for
|
||||||
// prebuilt_firmware.
|
// prebuilt_firmware.
|
||||||
socInstallDirBase string
|
socInstallDirBase string
|
||||||
installDirPath android.InstallPath
|
installDirPath android.InstallPath
|
||||||
additionalDependencies *android.Paths
|
additionalDependencies *android.Paths
|
||||||
|
|
||||||
|
makeClass string
|
||||||
}
|
}
|
||||||
|
|
||||||
type Defaults struct {
|
type Defaults struct {
|
||||||
|
@ -345,6 +349,9 @@ func (p *PrebuiltEtc) GenerateAndroidBuildActions(ctx android.ModuleContext) {
|
||||||
// If soc install dir was specified and SOC specific is set, set the installDirPath to the
|
// If soc install dir was specified and SOC specific is set, set the installDirPath to the
|
||||||
// specified socInstallDirBase.
|
// specified socInstallDirBase.
|
||||||
installBaseDir := p.installDirBase
|
installBaseDir := p.installDirBase
|
||||||
|
if p.Target().Arch.ArchType.Multilib == "lib64" && p.installDirBase64 != "" {
|
||||||
|
installBaseDir = p.installDirBase64
|
||||||
|
}
|
||||||
if p.SocSpecific() && p.socInstallDirBase != "" {
|
if p.SocSpecific() && p.socInstallDirBase != "" {
|
||||||
installBaseDir = p.socInstallDirBase
|
installBaseDir = p.socInstallDirBase
|
||||||
}
|
}
|
||||||
|
@ -404,8 +411,14 @@ func (p *PrebuiltEtc) AndroidMkEntries() []android.AndroidMkEntries {
|
||||||
if p.InRecovery() && !p.onlyInRecovery() {
|
if p.InRecovery() && !p.onlyInRecovery() {
|
||||||
nameSuffix = ".recovery"
|
nameSuffix = ".recovery"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class := p.makeClass
|
||||||
|
if class == "" {
|
||||||
|
class = "ETC"
|
||||||
|
}
|
||||||
|
|
||||||
return []android.AndroidMkEntries{android.AndroidMkEntries{
|
return []android.AndroidMkEntries{android.AndroidMkEntries{
|
||||||
Class: "ETC",
|
Class: class,
|
||||||
SubName: nameSuffix,
|
SubName: nameSuffix,
|
||||||
OutputFile: android.OptionalPathForPath(p.outputFilePath),
|
OutputFile: android.OptionalPathForPath(p.outputFilePath),
|
||||||
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
ExtraEntries: []android.AndroidMkExtraEntriesFunc{
|
||||||
|
@ -572,6 +585,18 @@ func PrebuiltDSPFactory() android.Module {
|
||||||
return module
|
return module
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prebuilt_renderscript_bitcode installs a *.bc file into /system/lib or /system/lib64.
|
||||||
|
func PrebuiltRenderScriptBitcodeFactory() android.Module {
|
||||||
|
module := &PrebuiltEtc{}
|
||||||
|
module.makeClass = "RENDERSCRIPT_BITCODE"
|
||||||
|
module.installDirBase64 = "lib64"
|
||||||
|
InitPrebuiltEtcModule(module, "lib")
|
||||||
|
// This module is device-only
|
||||||
|
android.InitAndroidArchModule(module, android.DeviceSupported, android.MultilibBoth)
|
||||||
|
android.InitDefaultableModule(module)
|
||||||
|
return module
|
||||||
|
}
|
||||||
|
|
||||||
// prebuilt_rfsa installs a firmware file that will be available through Qualcomm's RFSA
|
// prebuilt_rfsa installs a firmware file that will be available through Qualcomm's RFSA
|
||||||
// to the <partition>/lib/rfsa directory.
|
// to the <partition>/lib/rfsa directory.
|
||||||
func PrebuiltRFSAFactory() android.Module {
|
func PrebuiltRFSAFactory() android.Module {
|
||||||
|
|
Loading…
Reference in a new issue