Add build rules for statically linked oatdump on host.
Also extend oatdump_test to exercise oatdump(d)s.
Test: ART_BUILD_HOST_STATIC=true m test-art-host-gtest-oatdump_test
Bug: 29530992
Change-Id: I6eb6c96f385832733d18d0400abd9974a6d8e45c
diff --git a/build/art.go b/build/art.go
index 4e64dcf..f305c07 100644
--- a/build/art.go
+++ b/build/art.go
@@ -67,6 +67,12 @@
cflags = append(cflags, "-fstack-protector")
}
+ // Are additional statically-linked ART host binaries
+ // (dex2oats, oatdumps, etc.) getting built?
+ if envTrue(ctx, "ART_BUILD_HOST_STATIC") {
+ cflags = append(cflags, "-DART_BUILD_HOST_STATIC=1")
+ }
+
return cflags, asflags
}