Include __BIONIC_NO_PAGE_SIZE_MACRO flag to avoid breaking libraries
The __BIONIC_NO_PAGE_SIZE_MACRO flag has to be passed to the build system because there are C/C++ libraries using __BIONIC_NO_PAGE_SIZE_MACRO to decide whether to use getpagesize() or PAGE_SIZE macro. Bug: 333973679 Test: Build manually Change-Id: Ie5d71f4b2b256ab8f429ed4724b8d249b364d5da
This commit is contained in:
parent
a115e2615b
commit
fc5cdcbdf5
2 changed files with 6 additions and 2 deletions
|
@ -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, " ")
|
||||
|
|
|
@ -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, " ")
|
||||
|
|
Loading…
Reference in a new issue