Convert more of art to Android.bp

Convert dex2oat, imgdiag, patchoat, and profman to Android.bp.

Test: m -j test-art-host
Test: mmma -j art
Change-Id: If2acd47189e5a944732c2c00c2bf31265f887161
diff --git a/build/Android.executable.mk b/build/Android.executable.mk
index c35833d..f38a14d 100644
--- a/build/Android.executable.mk
+++ b/build/Android.executable.mk
@@ -249,20 +249,3 @@
     )
   )
 endef
-
-# Note: the order is important because of static linking resolution.
-ART_STATIC_DEPENDENCIES := \
-  libziparchive \
-  libnativehelper \
-  libnativebridge \
-  libnativeloader \
-  libsigchain_dummy \
-  liblog \
-  libz \
-  libbacktrace \
-  libcutils \
-  libunwindbacktrace \
-  libutils \
-  libbase \
-  liblz4 \
-  liblzma
diff --git a/build/art.go b/build/art.go
index da4609d..f694505 100644
--- a/build/art.go
+++ b/build/art.go
@@ -181,6 +181,7 @@
 func init() {
 	soong.RegisterModuleType("art_cc_library", artLibrary)
 	soong.RegisterModuleType("art_cc_binary", artBinary)
+	soong.RegisterModuleType("art_cc_test", artTest)
 	soong.RegisterModuleType("art_cc_defaults", artDefaultsFactory)
 	soong.RegisterModuleType("art_global_defaults", artGlobalDefaultsFactory)
 }
@@ -221,6 +222,15 @@
 	return module, props
 }
 
+func artTest() (blueprint.Module, []interface{}) {
+	test := cc.NewTest(android.HostAndDeviceSupported)
+	module, props := test.Init()
+
+	android.AddCustomizer(test, &artCustomLinkerCustomizer{})
+	android.AddCustomizer(test, &artPrefer32BitCustomizer{})
+	return module, props
+}
+
 func envDefault(ctx android.BaseContext, key string, defaultValue string) string {
 	ret := ctx.AConfig().Getenv(key)
 	if ret == "" {