Link all internal libraries statically into dex2oat(d) on host.

All static defaults had to change to whole_static_libs to work with the
new libdex2oat(d)_static libraries, so that they don't lose all symbols
in the static_libs dependency from the dex2oat(d) binaries.

The static unstripped dex2oat binary is 348 MB, 35 MB smaller than the
sum of the dynamic binary + DSO's.

Test: art/build/apex/runtests.sh
Test: runtests in device chroot
Test: art/test/testrunner/run_build_test_target.py art-test
Test: readelf -d out/host/linux-x86/bin/dex2oat(d)
  Check that NEEDED only lists system libraries (libdl, libpthread,
  libm, librt, libgcc_s, libc).
Bug: 145934348
Change-Id: I7abcf1db9b053f71ced6a7dde38ab1b4300b7b5a
diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp
index b24ee97..c80dc4d 100644
--- a/libdexfile/Android.bp
+++ b/libdexfile/Android.bp
@@ -102,7 +102,7 @@
 
 cc_defaults {
     name: "libdexfile_static_base_defaults",
-    static_libs: [
+    whole_static_libs: [
         "libbase",
         "liblog",
         "libz",
@@ -119,7 +119,7 @@
     defaults_visibility: [
         "//art:__subpackages__",
     ],
-    static_libs: ["libdexfile"],
+    whole_static_libs: ["libdexfile"],
 }
 
 cc_defaults {
@@ -128,7 +128,7 @@
         "libartbased_static_defaults",
         "libdexfile_static_base_defaults",
     ],
-    static_libs: ["libdexfiled"],
+    whole_static_libs: ["libdexfiled"],
 }
 
 gensrcs {
@@ -433,7 +433,7 @@
     defaults: [
         "libdexfile_static_defaults",
     ],
-    static_libs: [
+    whole_static_libs: [
         "libdexfile_external",
         "libdexfile_support_static",
     ],
@@ -444,7 +444,7 @@
     defaults: [
         "libdexfiled_static_defaults",
     ],
-    static_libs: [
+    whole_static_libs: [
         "libdexfile_support_static",
         "libdexfiled_external",
     ],