[Sim] Add device paths for ART simulator
The ART simulator requires both target and host to be built one after
the other but the device paths should stay the same regardless of
which build (target or host) is being performed. Therefore use the
host device paths for whenever the ART simulator is being built as
the ART simulator is run on the host.
Test: Follow instructions in README.simulator.md
Test: ./test.py --host --target --simulator
Change-Id: I7210c254589493ffe52cc459fc268105accf6074
diff --git a/android/configured_jars.go b/android/configured_jars.go
index c7b808f..657826e 100644
--- a/android/configured_jars.go
+++ b/android/configured_jars.go
@@ -264,7 +264,7 @@
subdir = filepath.Join("apex", apex, "javalib")
}
- if ostype.Class == Host {
+ if ostype.Class == Host || cfg.IsEnvTrue("ART_USE_SIMULATOR") {
paths[i] = filepath.Join(cfg.Getenv("OUT_DIR"), "host", cfg.PrebuiltOS(), subdir, name)
} else {
paths[i] = filepath.Join("/", subdir, name)