Add support for AArch64 XOM binaries.

Adds build system support for generating AArch64 binaries with
execute-only memory layouts via a new xom module property. Also adds
support for an ENABLE_XOM build flag for global builds.

Bug: 77958880
Test: make -j ENABLE_XOM=true
Change-Id: Ia2ea981498dd12941aaf5ca807648ae37527e3ee
This commit is contained in:
Ivan Lozano
2018-11-21 08:59:37 -08:00
parent 552b362fdc
commit 074ec480ef
5 changed files with 103 additions and 0 deletions

View File

@@ -360,6 +360,7 @@ type Module struct {
vndkdep *vndkdep
lto *lto
pgo *pgo
xom *xom
androidMkSharedLibDeps []string
@@ -417,6 +418,9 @@ func (c *Module) Init() android.Module {
if c.pgo != nil {
c.AddProperties(c.pgo.props()...)
}
if c.xom != nil {
c.AddProperties(c.xom.props()...)
}
for _, feature := range c.features {
c.AddProperties(feature.props()...)
}
@@ -658,6 +662,7 @@ func newModule(hod android.HostOrDeviceSupported, multilib android.Multilib) *Mo
module.vndkdep = &vndkdep{}
module.lto = &lto{}
module.pgo = &pgo{}
module.xom = &xom{}
return module
}
@@ -774,6 +779,9 @@ func (c *Module) GenerateAndroidBuildActions(actx android.ModuleContext) {
if c.pgo != nil {
flags = c.pgo.flags(ctx, flags)
}
if c.xom != nil {
flags = c.xom.flags(ctx, flags)
}
for _, feature := range c.features {
flags = feature.flags(ctx, flags)
}
@@ -1641,6 +1649,7 @@ func DefaultsFactory(props ...interface{}) android.Module {
&VndkProperties{},
&LTOProperties{},
&PgoProperties{},
&XomProperties{},
&android.ProtoProperties{},
)