From a2bb806660435e159684c65ad3d85752ab7991e3 Mon Sep 17 00:00:00 2001 From: Ruben Ayrapetyan Date: Wed, 27 Sep 2023 13:58:10 +0100 Subject: Propagate page size agnosticism build switch Define ART_PAGE_SIZE_AGNOSTIC based on the build system settings i.e. ctx.Config().PageSizeAgnostic(). Co-authored-by: Branislav Rankov Co-authored-by: Ruben Ayrapetyan Test: - art/tools/run-gtests.sh -j4 - art/test/testrunner/testrunner.py --target --64 - art/tools/run-libcore-tests.sh --mode=device --variant=X64 - art/tools/run-libjdwp-tests.sh --mode=device --variant=X64 - On 16K device, using: - aosp_cf_arm64_phone_pgagnostic-eng. - On 4K device, using: - armv8_cortex_a55-eng; - aosp_cf_arm64_phone_pgagnostic-eng; - aosp_cf_arm64_phone_pgagnostic-eng ART APEX transferred to 4K chroot environment. - Boot Android (4kB and 16kB pages setups) with the page agnostic ART APEX. - art/test/testrunner/testrunner.py --host --64 - art/test/testrunner/testrunner.py --host --32 Change-Id: I5430741a8494b340ed7fd2d8692c41a59ad9c530 --- build/art.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'build/art.go') diff --git a/build/art.go b/build/art.go index 340b90de4f..8ba3ceda67 100644 --- a/build/art.go +++ b/build/art.go @@ -103,6 +103,10 @@ func globalFlags(ctx android.LoadHookContext) ([]string, []string) { "-DART_STACK_OVERFLOW_GAP_x86_64=8192") } + if (ctx.Config().PageSizeAgnostic()) { + cflags = append(cflags, "-DART_PAGE_SIZE_AGNOSTIC=1") + } + if ctx.Config().IsEnvTrue("ART_ENABLE_ADDRESS_SANITIZER") { // Used to enable full sanitization, i.e., user poisoning, under ASAN. cflags = append(cflags, "-DART_ENABLE_ADDRESS_SANITIZER=1") -- cgit v1.2.3-59-g8ed1b