diff options
author | 2024-02-09 09:58:42 +0000 | |
---|---|---|
committer | 2025-02-26 02:05:49 -0800 | |
commit | c9fd9b7cd6d2eba801e4fdf72a4122b7e731458f (patch) | |
tree | 8baa7bdff24b2b8db3b85e9d62ed75765c7cc75a /build | |
parent | e31ace291919b25146e4d267b233addcd9c65932 (diff) |
[Sim] Support Simulator in the build system.
This patch brings changes to .bp and .go build system files
to support building ART in simulator mode, keeping the
regular host & target builds and rules unaffected.
Arm64 quick code sources are selectively used (instead of the x86_64
quick code sources) in the x86_64 arch section, controlled by a soong
config variable which depends on whether the simulator is in use. This
allows the simulator to use x86_64 native code sources with arm64
quick code sources.
Author: Chris Jones <christopher.jones@arm.com>
Test: test.py --host --target
Test: export ART_USE_SIMULATOR=true && test.py --host
fails to compile quick_entrypoints_arm64.S
Change-Id: I9676c4ae368baba92fbc2d3690621feef33a27c1
Diffstat (limited to 'build')
-rw-r--r-- | build/art.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/build/art.go b/build/art.go index c4df20d3d7..c4e9f9230f 100644 --- a/build/art.go +++ b/build/art.go @@ -52,6 +52,11 @@ func globalFlags(ctx android.LoadHookContext) ([]string, []string) { gcType = "MS" } + if ctx.Config().IsEnvTrue("ART_USE_SIMULATOR") { + cflags = append(cflags, "-DART_USE_SIMULATOR=1") + asflags = append(asflags, "-DART_USE_SIMULATOR=1") + } + cflags = append(cflags, "-DART_DEFAULT_GC_TYPE_IS_"+gcType) if ctx.Config().IsEnvTrue("ART_HEAP_POISONING") { |