Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a74b22e8 authored by Juan Yescas's avatar Juan Yescas
Browse files

16k: soong: Add the C flag -D__BIONIC_NO_PAGE_SIZE_MACRO flag to x86-64

To simulate 16k page size in x86-64 cuttefish, it is necessary
to compile the shared libraries and binaries with max-page-size greater
than 4096.

Bug: 309816695
Test: source build/envsetup.sh
      lunch aosp_cf_x86_64_phone_pgagnostic-trunk-userdebug
      m
Change-Id: I32670ef2c25fdcefec11bd07ba41cd0ea96c92bd
parent 3db51d25
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -104,7 +104,15 @@ func init() {
	})
	})


	// Clang cflags
	// Clang cflags
	exportedVars.ExportStringListStaticVariable("X86_64Cflags", x86_64Cflags)
	exportedVars.ExportStringList("X86_64Cflags", x86_64Cflags)
	pctx.VariableFunc("X86_64Cflags", func(ctx android.PackageVarContext) string {
		flags := x86_64Cflags
		if ctx.Config().PageSizeAgnostic() {
			flags = append(flags, "-D__BIONIC_NO_PAGE_SIZE_MACRO")
		}
		return strings.Join(flags, " ")
	})

	exportedVars.ExportStringListStaticVariable("X86_64Cppflags", x86_64Cppflags)
	exportedVars.ExportStringListStaticVariable("X86_64Cppflags", x86_64Cppflags)


	// Yasm flags
	// Yasm flags