Merge changes from topic "separate_code"

am: 894cdee30a

Change-Id: I8e20f744c85a7439569fe5f0464c74e91d060c30
This commit is contained in:
Nick Desaulniers
2019-12-16 13:20:22 -08:00
committed by android-build-merger
2 changed files with 6 additions and 2 deletions

View File

@@ -68,7 +68,10 @@ func (xom *xom) flags(ctx ModuleContext, flags Flags) Flags {
if !disableXom || (xom.Properties.Xom != nil && *xom.Properties.Xom) {
// XOM is only supported on AArch64 when using lld.
if ctx.Arch().ArchType == android.Arm64 && ctx.useClangLld(ctx) {
flags.Local.LdFlags = append(flags.Local.LdFlags, "-Wl,-execute-only")
flags.Local.LdFlags = append(flags.Local.LdFlags,
"-Wl,--execute-only",
"-Wl,-z,separate-code",
)
}
}

View File

@@ -27,7 +27,8 @@ var (
"-Wl,--icf=safe",
"-Wl,-z,max-page-size=4096",
"-Wl,-execute-only",
"-Wl,--execute-only",
"-Wl,-z,separate-code",
}
Arm64ArchVariantRustFlags = map[string][]string{