diff options
| -rw-r--r-- | Android.bp | 1 | ||||
| -rw-r--r-- | compiler/Android.bp | 3 | ||||
| -rw-r--r-- | dex2oat/Android.bp | 4 | ||||
| -rw-r--r-- | dexdump/Android.bp | 1 | ||||
| -rw-r--r-- | dexlayout/Android.bp | 11 | ||||
| -rw-r--r-- | libdexfile/Android.bp | 8 | ||||
| -rw-r--r-- | oatdump/Android.bp | 4 | ||||
| -rw-r--r-- | openjdkjvmti/Android.bp | 3 | ||||
| -rw-r--r-- | profman/Android.bp | 3 | ||||
| -rw-r--r-- | runtime/Android.bp | 10 | ||||
| -rw-r--r-- | runtime/base/stringpiece.cc | 7 | ||||
| -rw-r--r-- | runtime/base/stringpiece.h | 7 | ||||
| -rw-r--r-- | test/Android.bp | 28 | ||||
| -rwxr-xr-x | test/etc/run-test-jar | 2 | ||||
| -rw-r--r-- | tools/hiddenapi/Android.bp | 3 | ||||
| -rw-r--r-- | tools/public.libraries.buildbot.txt | 1 |
16 files changed, 60 insertions, 36 deletions
diff --git a/Android.bp b/Android.bp index ad42d3f2c7..bb92e5f2f8 100644 --- a/Android.bp +++ b/Android.bp @@ -1,7 +1,6 @@ // TODO: These should be handled with transitive static library dependencies art_static_dependencies = [ // Note: the order is important because of static linking resolution. - "libdexfile", "libziparchive", "libnativehelper", "libnativebridge", diff --git a/compiler/Android.bp b/compiler/Android.bp index 453965947d..ba08d7975b 100644 --- a/compiler/Android.bp +++ b/compiler/Android.bp @@ -184,7 +184,6 @@ art_cc_defaults { }, generated_sources: ["art_compiler_operator_srcs"], shared_libs: [ - "libdexfile", "libbase", "libcutils", // for atrace. "liblzma", @@ -250,6 +249,7 @@ art_cc_library { }, shared_libs: [ "libart", + "libdexfile", ], pgo: { @@ -295,6 +295,7 @@ art_cc_library { }, shared_libs: [ "libartd", + "libdexfiled", ], } diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp index ab06ddda2d..dd16ba4909 100644 --- a/dex2oat/Android.bp +++ b/dex2oat/Android.bp @@ -152,7 +152,7 @@ art_cc_binary { "libartd-compiler", "libartd-dexlayout", "libartd", - "libdexfile", + "libdexfiled", "libbase", "liblz4", "libsigchain", @@ -185,6 +185,7 @@ art_cc_binary { "libart-compiler", "libart-dexlayout", "libart", + "libdexfile", "libvixl-arm", "libvixl-arm64", ] + art_static_dependencies, @@ -216,6 +217,7 @@ art_cc_binary { "libartd-compiler", "libartd-dexlayout", "libartd", + "libdexfiled", "libvixld-arm", "libvixld-arm64", ] + art_static_dependencies, diff --git a/dexdump/Android.bp b/dexdump/Android.bp index f6b7a6b68a..eca08448bc 100644 --- a/dexdump/Android.bp +++ b/dexdump/Android.bp @@ -45,6 +45,7 @@ art_cc_binary { host_supported: true, device_supported: false, static_libs: [ + "libdexfile", "libbase", ] + art_static_dependencies, target: { diff --git a/dexlayout/Android.bp b/dexlayout/Android.bp index 3ea7f4ba82..bea61d0c71 100644 --- a/dexlayout/Android.bp +++ b/dexlayout/Android.bp @@ -27,7 +27,6 @@ art_cc_defaults { ], export_include_dirs: ["."], shared_libs: [ - "libdexfile", "libbase", ], static_libs: ["libz"], @@ -36,7 +35,10 @@ art_cc_defaults { art_cc_library { name: "libart-dexlayout", defaults: ["libart-dexlayout-defaults"], - shared_libs: ["libart"], + shared_libs: [ + "libart", + "libdexfile", + ], pgo: { instrumentation: true, @@ -51,7 +53,10 @@ art_cc_library { "libart-dexlayout-defaults", "art_debug_defaults", ], - shared_libs: ["libartd"], + shared_libs: [ + "libartd", + "libdexfiled", + ], } cc_defaults { diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp index bcf2bdb5a0..90c603f290 100644 --- a/libdexfile/Android.bp +++ b/libdexfile/Android.bp @@ -93,6 +93,14 @@ art_cc_library { }, } +art_cc_library { + name: "libdexfiled", + defaults: [ + "art_debug_defaults", + "libdexfile_defaults", + ], +} + art_cc_test { name: "art_libdexfile_tests", defaults: [ diff --git a/oatdump/Android.bp b/oatdump/Android.bp index c93c172eb4..012100d470 100644 --- a/oatdump/Android.bp +++ b/oatdump/Android.bp @@ -51,7 +51,7 @@ art_cc_binary { "libartd", "libartd-compiler", "libartd-disassembler", - "libdexfile", + "libdexfiled", "libbase", ], } @@ -76,6 +76,7 @@ art_cc_binary { ], static_libs: [ "libart", + "libdexfile", "libart-compiler", "libart-disassembler", "libvixl-arm", @@ -106,6 +107,7 @@ art_cc_binary { ], static_libs: [ "libartd", + "libdexfiled", "libartd-compiler", "libartd-disassembler", "libvixld-arm", diff --git a/openjdkjvmti/Android.bp b/openjdkjvmti/Android.bp index 1500bcae24..1553b78f46 100644 --- a/openjdkjvmti/Android.bp +++ b/openjdkjvmti/Android.bp @@ -58,7 +58,6 @@ cc_defaults { "libopenjdkjvmti_headers", ], shared_libs: [ - "libdexfile", "libbase", ], } @@ -70,6 +69,7 @@ art_cc_library { "libart", "libart-compiler", "libart-dexlayout", + "libdexfile", ], } @@ -83,5 +83,6 @@ art_cc_library { "libartd", "libartd-compiler", "libartd-dexlayout", + "libdexfiled", ], } diff --git a/profman/Android.bp b/profman/Android.bp index 6592b9dec0..163be2b64f 100644 --- a/profman/Android.bp +++ b/profman/Android.bp @@ -31,7 +31,6 @@ cc_defaults { }, shared_libs: [ - "libdexfile", "libbase", ], } @@ -41,6 +40,7 @@ art_cc_binary { defaults: ["profman-defaults"], shared_libs: [ "libart", + "libdexfile", ], } @@ -52,6 +52,7 @@ art_cc_binary { ], shared_libs: [ "libartd", + "libdexfiled", ], } diff --git a/runtime/Android.bp b/runtime/Android.bp index 110b04f06f..1ac770fd06 100644 --- a/runtime/Android.bp +++ b/runtime/Android.bp @@ -409,7 +409,6 @@ cc_defaults { "jni_platform_headers", ], shared_libs: [ - "libdexfile", "libnativebridge", "libnativeloader", "libbacktrace", @@ -430,10 +429,7 @@ cc_defaults { // 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 // generically. dex2oat takes care of it itself. - export_shared_lib_headers: [ - "libbase", - "libdexfile", - ], + export_shared_lib_headers: ["libbase"], } gensrcs { @@ -490,6 +486,8 @@ art_cc_library { strip: { keep_symbols: true, }, + shared_libs: ["libdexfile"], + export_shared_lib_headers: ["libdexfile"], } art_cc_library { @@ -498,6 +496,8 @@ art_cc_library { "art_debug_defaults", "libart_defaults", ], + shared_libs: ["libdexfiled"], + export_shared_lib_headers: ["libdexfiled"], } art_cc_library { diff --git a/runtime/base/stringpiece.cc b/runtime/base/stringpiece.cc index 672431cf9d..aea4e74bb1 100644 --- a/runtime/base/stringpiece.cc +++ b/runtime/base/stringpiece.cc @@ -23,13 +23,6 @@ namespace art { -#if !defined(NDEBUG) -char StringPiece::operator[](size_type i) const { - CHECK_LT(i, length_); - return ptr_[i]; -} -#endif - void StringPiece::CopyToString(std::string* target) const { target->assign(ptr_, length_); } diff --git a/runtime/base/stringpiece.h b/runtime/base/stringpiece.h index 46743e9643..e7109dc18a 100644 --- a/runtime/base/stringpiece.h +++ b/runtime/base/stringpiece.h @@ -20,6 +20,8 @@ #include <string.h> #include <string> +#include <android-base/logging.h> + namespace art { // A string-like object that points to a sized piece of memory. @@ -84,13 +86,10 @@ class StringPiece { length_ = len; } -#if defined(NDEBUG) char operator[](size_type i) const { + DCHECK_LT(i, length_); return ptr_[i]; } -#else - char operator[](size_type i) const; -#endif void remove_prefix(size_type n) { ptr_ += n; diff --git a/test/Android.bp b/test/Android.bp index 8b88b09f7c..25556adf65 100644 --- a/test/Android.bp +++ b/test/Android.bp @@ -62,7 +62,7 @@ art_cc_defaults { "libvixld-arm", "libvixld-arm64", "libart-gtest", - "libdexfile", + "libdexfiled", "libbase", "libicuuc", @@ -114,7 +114,7 @@ art_cc_defaults { shared_libs: [ "libartd", "libartd-compiler", - "libdexfile", + "libdexfiled", ], static_libs: [ "libgtest", @@ -151,7 +151,7 @@ art_cc_library { shared_libs: [ "libartd", "libartd-compiler", - "libdexfile", + "libdexfiled", "libbase", "libbacktrace", ], @@ -294,14 +294,16 @@ art_cc_defaults { ], shared_libs: [ "libbase", - "libdexfile", ], } art_cc_test_library { name: "libtiagent", defaults: ["libtiagent-defaults"], - shared_libs: ["libart"], + shared_libs: [ + "libart", + "libdexfile", + ], } art_cc_test_library { @@ -310,7 +312,10 @@ art_cc_test_library { "art_debug_defaults", "libtiagent-defaults", ], - shared_libs: ["libartd"], + shared_libs: [ + "libartd", + "libdexfiled", + ], } art_cc_test_library { @@ -420,7 +425,6 @@ cc_defaults { "708-jit-cache-churn/jit.cc", ], shared_libs: [ - "libdexfile", "libbacktrace", "libbase", "libnativehelper", @@ -430,7 +434,10 @@ cc_defaults { art_cc_test_library { name: "libarttest", defaults: ["libarttest-defaults"], - shared_libs: ["libart"], + shared_libs: [ + "libart", + "libdexfile", + ], } art_cc_test_library { @@ -439,7 +446,10 @@ art_cc_test_library { "art_debug_defaults", "libarttest-defaults", ], - shared_libs: ["libartd"], + shared_libs: [ + "libartd", + "libdexfiled", + ], } art_cc_test_library { diff --git a/test/etc/run-test-jar b/test/etc/run-test-jar index bb6ace1b06..b8427f491b 100755 --- a/test/etc/run-test-jar +++ b/test/etc/run-test-jar @@ -850,7 +850,7 @@ if [ "$HOST" = "n" ]; then fi # System libraries needed by libarttestd.so - PUBLIC_LIBS=libart.so:libartd.so:libc++.so:libbacktrace.so:libdexfile.so:libbase.so:libnativehelper.so + PUBLIC_LIBS=libart.so:libartd.so:libc++.so:libbacktrace.so:libdexfile.so:libdexfiled.so:libbase.so:libnativehelper.so # Create a script with the command. The command can get longer than the longest # allowed adb command and there is no way to get the exit status from a adb shell diff --git a/tools/hiddenapi/Android.bp b/tools/hiddenapi/Android.bp index f9824f1fa3..af87d31e53 100644 --- a/tools/hiddenapi/Android.bp +++ b/tools/hiddenapi/Android.bp @@ -30,7 +30,6 @@ cc_defaults { }, shared_libs: [ - "libdexfile", "libbase", ], } @@ -40,6 +39,7 @@ art_cc_binary { defaults: ["hiddenapi-defaults"], shared_libs: [ "libart", + "libdexfile", ], } @@ -51,6 +51,7 @@ art_cc_binary { ], shared_libs: [ "libartd", + "libdexfiled", ], } diff --git a/tools/public.libraries.buildbot.txt b/tools/public.libraries.buildbot.txt index 734fd1e50b..de636a813a 100644 --- a/tools/public.libraries.buildbot.txt +++ b/tools/public.libraries.buildbot.txt @@ -1,6 +1,7 @@ libart.so libartd.so libdexfile.so +libdexfiled.so libbacktrace.so libc.so libc++.so |