aboutsummaryrefslogtreecommitdiff
path: root/cc/config/arm64_device.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/config/arm64_device.go')
-rw-r--r--cc/config/arm64_device.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/cc/config/arm64_device.go b/cc/config/arm64_device.go
index 66087e6f0..5dcfdafa1 100644
--- a/cc/config/arm64_device.go
+++ b/cc/config/arm64_device.go
@@ -48,8 +48,7 @@ var (
"-Wl,-z,separate-code",
}
- arm64Lldflags = append(arm64Ldflags,
- "-Wl,-z,max-page-size=4096")
+ arm64Lldflags = arm64Ldflags
arm64Cppflags = []string{}
@@ -97,7 +96,13 @@ func init() {
"prebuilts/gcc/${HostPrebuiltTag}/aarch64/aarch64-linux-android-${arm64GccVersion}")
exportedVars.ExportStringListStaticVariable("Arm64Ldflags", arm64Ldflags)
- exportedVars.ExportStringListStaticVariable("Arm64Lldflags", arm64Lldflags)
+
+ exportedVars.ExportStringList("Arm64Lldflags", arm64Lldflags)
+ pctx.VariableFunc("Arm64Lldflags", func(ctx android.PackageVarContext) string {
+ maxPageSizeFlag := "-Wl,-z,max-page-size=" + ctx.Config().MaxPageSizeSupported()
+ flags := append(arm64Lldflags, maxPageSizeFlag)
+ return strings.Join(flags, " ")
+ })
exportedVars.ExportStringListStaticVariable("Arm64Cflags", arm64Cflags)
exportedVars.ExportStringListStaticVariable("Arm64Cppflags", arm64Cppflags)