Loading cc/cc.go +6 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,7 @@ type ModuleContextIntf interface { baseModuleName() string getVndkExtendsModuleName() string isPgoCompile() bool useClangLld(actx ModuleContext) bool } type ModuleContext interface { Loading Loading @@ -287,6 +288,7 @@ type linker interface { linkerDeps(ctx DepsContext, deps Deps) Deps linkerFlags(ctx ModuleContext, flags Flags) Flags linkerProps() []interface{} useClangLld(actx ModuleContext) bool link(ctx ModuleContext, flags Flags, deps PathDeps, objs Objects) android.Path appendLdflags([]string) Loading Loading @@ -635,6 +637,10 @@ func (ctx *moduleContextImpl) selectedStl() string { return "" } func (ctx *moduleContextImpl) useClangLld(actx ModuleContext) bool { return ctx.mod.linker.useClangLld(actx) } func (ctx *moduleContextImpl) baseModuleName() string { return ctx.mod.ModuleBase.BaseModuleName() } Loading cc/xom.go +2 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,8 @@ func (xom *xom) flags(ctx ModuleContext, flags Flags) Flags { // Enable execute-only if none of the dependencies disable it, // also if it's explicitly set true (allows overriding dependencies disabling it). if !disableXom || (xom.Properties.Xom != nil && *xom.Properties.Xom) { if ctx.Arch().ArchType == android.Arm64 { // XOM is only supported on AArch64 when using lld. if ctx.Arch().ArchType == android.Arm64 && ctx.useClangLld(ctx) { flags.LdFlags = append(flags.LdFlags, "-Wl,-execute-only") } } Loading Loading
cc/cc.go +6 −0 Original line number Diff line number Diff line Loading @@ -247,6 +247,7 @@ type ModuleContextIntf interface { baseModuleName() string getVndkExtendsModuleName() string isPgoCompile() bool useClangLld(actx ModuleContext) bool } type ModuleContext interface { Loading Loading @@ -287,6 +288,7 @@ type linker interface { linkerDeps(ctx DepsContext, deps Deps) Deps linkerFlags(ctx ModuleContext, flags Flags) Flags linkerProps() []interface{} useClangLld(actx ModuleContext) bool link(ctx ModuleContext, flags Flags, deps PathDeps, objs Objects) android.Path appendLdflags([]string) Loading Loading @@ -635,6 +637,10 @@ func (ctx *moduleContextImpl) selectedStl() string { return "" } func (ctx *moduleContextImpl) useClangLld(actx ModuleContext) bool { return ctx.mod.linker.useClangLld(actx) } func (ctx *moduleContextImpl) baseModuleName() string { return ctx.mod.ModuleBase.BaseModuleName() } Loading
cc/xom.go +2 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,8 @@ func (xom *xom) flags(ctx ModuleContext, flags Flags) Flags { // Enable execute-only if none of the dependencies disable it, // also if it's explicitly set true (allows overriding dependencies disabling it). if !disableXom || (xom.Properties.Xom != nil && *xom.Properties.Xom) { if ctx.Arch().ArchType == android.Arm64 { // XOM is only supported on AArch64 when using lld. if ctx.Arch().ArchType == android.Arm64 && ctx.useClangLld(ctx) { flags.LdFlags = append(flags.LdFlags, "-Wl,-execute-only") } } Loading