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 <branislav.rankov@arm.com>
Co-authored-by: Ruben Ayrapetyan <ruben.ayrapetyan@arm.com>
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
diff --git a/build/art.go b/build/art.go
index 340b90d..8ba3ced 100644
--- a/build/art.go
+++ b/build/art.go
@@ -103,6 +103,10 @@
"-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")