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/runtime/globals.h b/runtime/globals.h
index 9045d40..aba5661 100644
--- a/runtime/globals.h
+++ b/runtime/globals.h
@@ -67,22 +67,30 @@
 #if defined(ART_TARGET)
 // Useful in conditionals where ART_TARGET isn't.
 static constexpr bool kIsTargetBuild = true;
-#if defined(ART_TARGET_LINUX)
+# if defined(ART_TARGET_LINUX)
 static constexpr bool kIsTargetLinux = true;
-#elif defined(ART_TARGET_ANDROID)
+# elif defined(ART_TARGET_ANDROID)
 static constexpr bool kIsTargetLinux = false;
-#else
-#error "Either ART_TARGET_LINUX or ART_TARGET_ANDROID needs to be defined for target builds."
-#endif
+# else
+# error "Either ART_TARGET_LINUX or ART_TARGET_ANDROID needs to be defined for target builds."
+# endif
 #else
 static constexpr bool kIsTargetBuild = false;
-#if defined(ART_TARGET_LINUX)
-#error "ART_TARGET_LINUX defined for host build."
-#elif defined(ART_TARGET_ANDROID)
-#error "ART_TARGET_ANDROID defined for host build."
-#else
+# if defined(ART_TARGET_LINUX)
+# error "ART_TARGET_LINUX defined for host build."
+# elif defined(ART_TARGET_ANDROID)
+# error "ART_TARGET_ANDROID defined for host build."
+# else
 static constexpr bool kIsTargetLinux = false;
+# endif
 #endif
+
+// Are additional statically-linked ART host binaries (dex2oats,
+// oatdumps, etc.) built and available?
+#if !defined(ART_TARGET) && defined(ART_BUILD_HOST_STATIC)
+static constexpr bool kHostStaticBuildEnabled = true;
+#else
+static constexpr bool kHostStaticBuildEnabled = false;
 #endif
 
 // Garbage collector constants.