Include __BIONIC_NO_PAGE_SIZE_MACRO flag to avoid breaking libraries am: fc5cdcbdf5

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3040413

Change-Id: Iefda868428491d586461c799c8af95c1e184693a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Juan Yescas
2024-04-12 17:25:08 +00:00
committed by Automerger Merge Worker
2 changed files with 6 additions and 2 deletions

View File

@@ -101,7 +101,9 @@ func init() {
pctx.VariableFunc("Arm64Cflags", func(ctx android.PackageVarContext) string {
flags := arm64Cflags
if !ctx.Config().NoBionicPageSizeMacro() {
if ctx.Config().NoBionicPageSizeMacro() {
flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO")
} else {
flags = append(flags, "-D__BIONIC_DEPRECATED_PAGE_SIZE_MACRO")
}
return strings.Join(flags, " ")

View File

@@ -110,7 +110,9 @@ func init() {
// Clang cflags
pctx.VariableFunc("X86_64Cflags", func(ctx android.PackageVarContext) string {
flags := x86_64Cflags
if !ctx.Config().NoBionicPageSizeMacro() {
if ctx.Config().NoBionicPageSizeMacro() {
flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO")
} else {
flags = append(flags, "-D__BIONIC_DEPRECATED_PAGE_SIZE_MACRO")
}
return strings.Join(flags, " ")