Export include dirs for use by art

Also changed vixl-test-runner to depend on libvixld instead of building
the code to be tested from source again. That avoided having to add
"src" to the local_include_dirs specified in "vixl-test-runner" because
the export_include_dirs specified in the defaults is not supported on
cc_test_host and so was ignored.

Test: m checkbuild
Bug: 134379140
Change-Id: Ia77a393e4fe8f11f64534b47015f1b0fc9de940c
diff --git a/Android.bp b/Android.bp
index 9e7473f..55ef972 100644
--- a/Android.bp
+++ b/Android.bp
@@ -58,7 +58,6 @@
 cc_defaults {
     name: "vixl-common",
     host_supported: true,
-    srcs: ["src/*.cc"],
     clang_cflags: ["-Wimplicit-fallthrough"],
     cflags: [
         "-Wall",
@@ -79,7 +78,6 @@
 
         "-DVIXL_CODE_BUFFER_MALLOC",
     ],
-    local_include_dirs: ["src"],
     native_coverage: false,
     sanitize: {
         recover: ["shift-exponent"],
@@ -137,10 +135,18 @@
     "//art:__subpackages__",
 ]
 
+// Defaults for the libvixl[d] libraries
+cc_defaults {
+    name: "libvixl-defaults",
+    srcs: ["src/*.cc"],
+    export_include_dirs: ["src"],
+}
+
 art_cc_library {
     name: "libvixl",
     visibility: libvixl_visibility,
     defaults: [
+        "libvixl-defaults",
         "vixl-release",
         "vixl-arm",
         "vixl-arm64",
@@ -160,6 +166,7 @@
     name: "libvixld",
     visibility: libvixl_visibility,
     defaults: [
+        "libvixl-defaults",
         "vixl-debug",
         "vixl-arm",
         "vixl-arm64",
@@ -179,12 +186,17 @@
         "vixl-arm",
         "vixl-arm64",
     ],
-    local_include_dirs: ["test"],
+    local_include_dirs: [
+        "test",
+    ],
     srcs: [
         "test/*.cc",
         "test/aarch32/*.cc",
         "test/aarch64/*.cc",
     ],
+    static_libs: [
+        "libvixld",
+    ],
     data: [
         "test/test-trace-reference/*",
     ],