Revert "Link lzma and lz4 compression libs statically into libartbase and use that"

This reverts commit 21579bec04bea8a9a6ca65ad5493016d1fcb9dcc.

Reason for revert: Build failure

Change-Id: Ia941425b9462f478be78058b3d63a30106421de6
diff --git a/compiler/Android.bp b/compiler/Android.bp
index 8e4e383..c2f8e3c 100644
--- a/compiler/Android.bp
+++ b/compiler/Android.bp
@@ -180,6 +180,7 @@
     shared_libs: [
         "libbase",
         "libcutils",  // for atrace.
+        "liblzma",
     ],
     include_dirs: ["art/disassembler"],
     header_libs: [
@@ -195,6 +196,7 @@
     static_libs: [
         "libbase",
         "libcutils",
+        "liblzma",
     ],
 }
 
diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp
index 897dbfb..666db42 100644
--- a/dex2oat/Android.bp
+++ b/dex2oat/Android.bp
@@ -71,8 +71,11 @@
     generated_sources: ["art_dex2oat_operator_srcs"],
     shared_libs: [
         "libbase",
+        "liblz4",
+        "liblzma",
     ],
     include_dirs: [
+        "external/lz4/lib",
         "external/zlib",
     ],
     export_include_dirs: ["."],
@@ -95,6 +98,8 @@
     },
     static_libs: [
         "libbase",
+        "liblz4",
+        "liblzma",
     ],
 }
 
@@ -242,6 +247,7 @@
         "libdexfile",
         "libartbase",
         "libbase",
+        "liblz4",
         "libsigchain",
     ],
     static_libs: [
@@ -279,6 +285,7 @@
         "libdexfiled",
         "libartbased",
         "libbase",
+        "liblz4",
         "libsigchain",
     ],
     static_libs: [
@@ -308,6 +315,7 @@
     ],
     static_libs: [
         "libbase",
+        "liblz4",
         "libsigchain_dummy",
     ],
 }
@@ -403,11 +411,11 @@
         "external/zlib",
     ],
     shared_libs: [
-        "libartbased",
+        "libprofiled",
         "libartd-compiler",
         "libartd-dexlayout",
         "libbase",
-        "libprofiled",
+        "liblz4",
         "libsigchain",
         "libziparchive",
     ],
diff --git a/libartbase/Android.bp b/libartbase/Android.bp
index 1e776ae..5010f68 100644
--- a/libartbase/Android.bp
+++ b/libartbase/Android.bp
@@ -71,16 +71,6 @@
         // For common macros.
         "libbase",
     ],
-
-    // Utilities used by various ART libs and tools are linked in statically
-    // here to avoid shared lib dependencies outside the ART APEX. No target
-    // there should depend on these separately.
-    whole_static_libs: [
-        "liblz4",
-        "liblzma",
-    ],
-    version_script: "libartbase.map",
-
     export_include_dirs: ["."],
     // ART's macros.h depends on libbase's macros.h.
     // Note: runtime_options.h depends on cmdline. But we don't really want to export this
diff --git a/libartbase/libartbase.map b/libartbase/libartbase.map
deleted file mode 100644
index 6249930..0000000
--- a/libartbase/libartbase.map
+++ /dev/null
@@ -1,15 +0,0 @@
-# This is used only to hide data symbols that get imported through
-# whole_static_libs, or else they might trigger the ASan odr-violation check.
-# Before adding symbols here, please make sure that it doesn't give rise to a
-# real ODR problem. All these symbols are either in .rodata or .data.rel.ro
-# sections.
-LIBARTBASE {
-  local:
-    PPMD7_kExpEscape;
-    XZ_SIG;
-    g_AlignedAlloc;
-    g_Alloc;
-    g_BigAlloc;
-    g_MidAlloc;
-    k7zSignature;
-};
diff --git a/runtime/Android.bp b/runtime/Android.bp
index 4c1b288..86ee952 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -377,6 +377,7 @@
     include_dirs: [
         "art/sigchainlib",
         "external/icu/icu4c/source/common",
+        "external/lz4/lib",
         "external/zlib",
     ],
     header_libs: [
@@ -389,6 +390,7 @@
         "libnativebridge",
         "libnativeloader",
         "libbacktrace",
+        "liblz4",
         "liblog",
         // For atrace, properties, ashmem, set_sched_policy.
         "libcutils",
@@ -420,6 +422,8 @@
         "libbase",
         "libcutils",
         "liblog",
+        "liblz4",
+        "liblzma",
         "libnativebridge",
         "libnativeloader",
         "libunwindstack",