diff options
author | 2018-02-12 18:27:56 -0800 | |
---|---|---|
committer | 2018-02-14 10:57:05 -0800 | |
commit | 334b9d73482fba9c335d9b758041fc0865ef74d4 (patch) | |
tree | 1e0d2050065110c37ee03ee8010ec24c8d31f32e | |
parent | db8d9091bbab41060584ab80882b60df20337da7 (diff) |
Move libdexfile out of runtime
Move the files out of runtime, leaving unfortunate dependences still
there on runtime/base (for the moment). Also separates the build logic
into two Android.bp files.
Bug: 22322814
Test: make -j 50 test-art-host
Change-Id: Ib0a1cda833b29ecfa4c8c50f23fab89ba666f491
-rw-r--r-- | Android.bp | 1 | ||||
-rw-r--r-- | build/Android.gtest.mk | 1 | ||||
-rw-r--r-- | libdexfile/Android.bp | 117 | ||||
-rw-r--r-- | libdexfile/dex/base64_test_util.h (renamed from runtime/dex/base64_test_util.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/code_item_accessors-inl.h (renamed from runtime/dex/code_item_accessors-inl.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/code_item_accessors.h (renamed from runtime/dex/code_item_accessors.h) | 7 | ||||
-rw-r--r-- | libdexfile/dex/code_item_accessors_test.cc (renamed from runtime/dex/code_item_accessors_test.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/compact_dex_debug_info.cc (renamed from runtime/dex/compact_dex_debug_info.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/compact_dex_debug_info.h (renamed from runtime/dex/compact_dex_debug_info.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/compact_dex_debug_info_test.cc (renamed from runtime/dex/compact_dex_debug_info_test.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/compact_dex_file.cc (renamed from runtime/dex/compact_dex_file.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/compact_dex_file.h (renamed from runtime/dex/compact_dex_file.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/compact_dex_file_test.cc (renamed from runtime/dex/compact_dex_file_test.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/compact_dex_level.h (renamed from runtime/dex/compact_dex_level.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/compact_dex_utils.h (renamed from runtime/dex/compact_dex_utils.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/descriptors_names.cc (renamed from runtime/dex/descriptors_names.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/descriptors_names.h (renamed from runtime/dex/descriptors_names.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_file-inl.h (renamed from runtime/dex/dex_file-inl.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_file.cc (renamed from runtime/dex/dex_file.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_file.h (renamed from runtime/dex/dex_file.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_exception_helpers.cc (renamed from runtime/dex/dex_file_exception_helpers.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_exception_helpers.h (renamed from runtime/dex/dex_file_exception_helpers.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_loader.cc (renamed from runtime/dex/dex_file_loader.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_loader.h (renamed from runtime/dex/dex_file_loader.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_loader_test.cc (renamed from runtime/dex/dex_file_loader_test.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_reference.h (renamed from runtime/dex/dex_file_reference.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_tracking_registrar.cc (renamed from runtime/dex/dex_file_tracking_registrar.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_tracking_registrar.h (renamed from runtime/dex/dex_file_tracking_registrar.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_types.h (renamed from runtime/dex/dex_file_types.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_verifier.cc (renamed from runtime/dex/dex_file_verifier.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_verifier.h (renamed from runtime/dex/dex_file_verifier.h) | 7 | ||||
-rw-r--r-- | libdexfile/dex/dex_file_verifier_test.cc (renamed from runtime/dex/dex_file_verifier_test.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_instruction-inl.h (renamed from runtime/dex/dex_instruction-inl.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_instruction.cc (renamed from runtime/dex/dex_instruction.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_instruction.h (renamed from runtime/dex/dex_instruction.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_instruction_iterator.h (renamed from runtime/dex/dex_instruction_iterator.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/dex_instruction_list.h (renamed from runtime/dex/dex_instruction_list.h) | 8 | ||||
-rw-r--r-- | libdexfile/dex/dex_instruction_test.cc (renamed from runtime/dex/dex_instruction_test.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/dex_instruction_utils.h (renamed from runtime/dex/dex_instruction_utils.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/invoke_type.h (renamed from runtime/dex/invoke_type.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/modifiers.cc (renamed from runtime/dex/modifiers.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/modifiers.h (renamed from runtime/dex/modifiers.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/standard_dex_file.cc (renamed from runtime/dex/standard_dex_file.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/standard_dex_file.h (renamed from runtime/dex/standard_dex_file.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/utf-inl.h (renamed from runtime/dex/utf-inl.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/utf.cc (renamed from runtime/dex/utf.cc) | 0 | ||||
-rw-r--r-- | libdexfile/dex/utf.h (renamed from runtime/dex/utf.h) | 6 | ||||
-rw-r--r-- | libdexfile/dex/utf_test.cc (renamed from runtime/dex/utf_test.cc) | 0 | ||||
l--------- | libdexfile/generate-operator-out.py | 1 | ||||
-rw-r--r-- | runtime/Android.bp | 93 | ||||
-rw-r--r-- | runtime/dex/art_dex_file_loader.cc | 8 | ||||
-rw-r--r-- | runtime/dex/art_dex_file_loader.h | 2 | ||||
-rw-r--r-- | runtime/dex/art_dex_file_loader_test.cc | 13 | ||||
-rw-r--r-- | runtime/dex/dex_file_annotations.cc | 2 | ||||
-rw-r--r-- | runtime/dex/dex_file_annotations.h | 2 | ||||
-rw-r--r-- | runtime/dex/dex_file_layout.cc | 3 | ||||
-rw-r--r-- | tools/cpp-define-generator/Android.bp | 5 | ||||
-rw-r--r-- | tools/titrace/Android.bp | 3 |
58 files changed, 224 insertions, 187 deletions
diff --git a/Android.bp b/Android.bp index 4bcceffcd1..ad42d3f2c7 100644 --- a/Android.bp +++ b/Android.bp @@ -36,6 +36,7 @@ subdirs = [ "dt_fd_forward", "dt_fd_forward/export", "imgdiag", + "libdexfile", "oatdump", "openjdkjvm", "openjdkjvmti", diff --git a/build/Android.gtest.mk b/build/Android.gtest.mk index d6c87b6bf4..59a1046135 100644 --- a/build/Android.gtest.mk +++ b/build/Android.gtest.mk @@ -333,6 +333,7 @@ ART_TEST_MODULES := \ art_dexoptanalyzer_tests \ art_hiddenapi_tests \ art_imgdiag_tests \ + art_libdexfile_tests \ art_oatdump_tests \ art_patchoat_tests \ art_profman_tests \ diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp new file mode 100644 index 0000000000..bcf2bdb5a0 --- /dev/null +++ b/libdexfile/Android.bp @@ -0,0 +1,117 @@ +// +// Copyright (C) 2011 The Android Open Source Project +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +cc_defaults { + name: "libdexfile_defaults", + defaults: ["art_defaults"], + host_supported: true, + srcs: [ + "dex/compact_dex_debug_info.cc", + "dex/compact_dex_file.cc", + "dex/descriptors_names.cc", + "dex/dex_file.cc", + "dex/dex_file_exception_helpers.cc", + "dex/dex_file_loader.cc", + "dex/dex_file_tracking_registrar.cc", + "dex/dex_file_verifier.cc", + "dex/dex_instruction.cc", + "dex/modifiers.cc", + "dex/standard_dex_file.cc", + "dex/utf.cc", + ], + + target: { + android: { + static_libs: [ + "libziparchive", + "libz", + "libbase", + ], + shared_libs: [ + "libutils", + ], + }, + host: { + shared_libs: [ + "libziparchive", + "libz", + ], + }, + }, + generated_sources: ["dexfile_operator_srcs"], + shared_libs: [ + "liblog", + // For common macros. + "libbase", + "libz", + ], + header_libs: [ + // This is needed to resolve the base/ header file inclusions here. + // TODO: move those headers to art/ rather than under runtime. + "libart_runtime_headers", + ], + export_include_dirs: ["."], + export_shared_lib_headers: [ + "libbase", + ], +} + +gensrcs { + name: "dexfile_operator_srcs", + cmd: "$(location generate-operator-out.py) art/libdexfile $(in) > $(out)", + tool_files: ["generate-operator-out.py"], + srcs: [ + "dex/dex_file.h", + "dex/dex_instruction.h", + "dex/dex_instruction_utils.h", + "dex/invoke_type.h", + ], + output_extension: "operator_out.cc", +} + +// TODO: add build support for libdexfiled, as we use DCHECK, etc. +art_cc_library { + name: "libdexfile", + defaults: ["libdexfile_defaults"], + // Leave the symbols in the shared library so that stack unwinders can + // produce meaningful name resolution. + strip: { + keep_symbols: true, + }, +} + +art_cc_test { + name: "art_libdexfile_tests", + defaults: [ + "art_gtest_defaults", + ], + srcs: [ + "dex/code_item_accessors_test.cc", + "dex/compact_dex_debug_info_test.cc", + "dex/compact_dex_file_test.cc", + "dex/dex_file_loader_test.cc", + "dex/dex_file_verifier_test.cc", + "dex/dex_instruction_test.cc", + "dex/utf_test.cc", + ], + shared_libs: [ + "libbacktrace", + "libziparchive", + ], + include_dirs: [ + "external/zlib", + ], +} diff --git a/runtime/dex/base64_test_util.h b/libdexfile/dex/base64_test_util.h index 0657f9fd01..683e429e11 100644 --- a/runtime/dex/base64_test_util.h +++ b/libdexfile/dex/base64_test_util.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_BASE64_TEST_UTIL_H_ -#define ART_RUNTIME_DEX_BASE64_TEST_UTIL_H_ +#ifndef ART_LIBDEXFILE_DEX_BASE64_TEST_UTIL_H_ +#define ART_LIBDEXFILE_DEX_BASE64_TEST_UTIL_H_ #include <base/logging.h> #include <stdint.h> @@ -96,4 +96,4 @@ static inline uint8_t* DecodeBase64(const char* src, size_t* dst_size) { } // namespace art -#endif // ART_RUNTIME_DEX_BASE64_TEST_UTIL_H_ +#endif // ART_LIBDEXFILE_DEX_BASE64_TEST_UTIL_H_ diff --git a/runtime/dex/code_item_accessors-inl.h b/libdexfile/dex/code_item_accessors-inl.h index 9c39935d3b..c166f5f19e 100644 --- a/runtime/dex/code_item_accessors-inl.h +++ b/libdexfile/dex/code_item_accessors-inl.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_CODE_ITEM_ACCESSORS_INL_H_ -#define ART_RUNTIME_DEX_CODE_ITEM_ACCESSORS_INL_H_ +#ifndef ART_LIBDEXFILE_DEX_CODE_ITEM_ACCESSORS_INL_H_ +#define ART_LIBDEXFILE_DEX_CODE_ITEM_ACCESSORS_INL_H_ #include "code_item_accessors.h" @@ -201,4 +201,4 @@ inline bool CodeItemDebugInfoAccessor::DecodeDebugLocalInfo(bool is_static, } // namespace art -#endif // ART_RUNTIME_DEX_CODE_ITEM_ACCESSORS_INL_H_ +#endif // ART_LIBDEXFILE_DEX_CODE_ITEM_ACCESSORS_INL_H_ diff --git a/runtime/dex/code_item_accessors.h b/libdexfile/dex/code_item_accessors.h index beb78f6e4f..ba7c126ed8 100644 --- a/runtime/dex/code_item_accessors.h +++ b/libdexfile/dex/code_item_accessors.h @@ -16,10 +16,9 @@ // TODO: Dex helpers have ART specific APIs, we may want to refactor these for use in dexdump. -#ifndef ART_RUNTIME_DEX_CODE_ITEM_ACCESSORS_H_ -#define ART_RUNTIME_DEX_CODE_ITEM_ACCESSORS_H_ +#ifndef ART_LIBDEXFILE_DEX_CODE_ITEM_ACCESSORS_H_ +#define ART_LIBDEXFILE_DEX_CODE_ITEM_ACCESSORS_H_ -#include "base/mutex.h" #include "compact_dex_file.h" #include "dex_file.h" #include "dex_instruction_iterator.h" @@ -164,4 +163,4 @@ class CodeItemDebugInfoAccessor : public CodeItemDataAccessor { } // namespace art -#endif // ART_RUNTIME_DEX_CODE_ITEM_ACCESSORS_H_ +#endif // ART_LIBDEXFILE_DEX_CODE_ITEM_ACCESSORS_H_ diff --git a/runtime/dex/code_item_accessors_test.cc b/libdexfile/dex/code_item_accessors_test.cc index 2bb4dde649..2bb4dde649 100644 --- a/runtime/dex/code_item_accessors_test.cc +++ b/libdexfile/dex/code_item_accessors_test.cc diff --git a/runtime/dex/compact_dex_debug_info.cc b/libdexfile/dex/compact_dex_debug_info.cc index 19495ca92c..19495ca92c 100644 --- a/runtime/dex/compact_dex_debug_info.cc +++ b/libdexfile/dex/compact_dex_debug_info.cc diff --git a/runtime/dex/compact_dex_debug_info.h b/libdexfile/dex/compact_dex_debug_info.h index 1aff75879e..bfd0bbe65c 100644 --- a/runtime/dex/compact_dex_debug_info.h +++ b/libdexfile/dex/compact_dex_debug_info.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_COMPACT_DEX_DEBUG_INFO_H_ -#define ART_RUNTIME_DEX_COMPACT_DEX_DEBUG_INFO_H_ +#ifndef ART_LIBDEXFILE_DEX_COMPACT_DEX_DEBUG_INFO_H_ +#define ART_LIBDEXFILE_DEX_COMPACT_DEX_DEBUG_INFO_H_ #include <cstdint> #include <vector> @@ -62,4 +62,4 @@ class CompactDexDebugInfoOffsetTable { } // namespace art -#endif // ART_RUNTIME_DEX_COMPACT_DEX_DEBUG_INFO_H_ +#endif // ART_LIBDEXFILE_DEX_COMPACT_DEX_DEBUG_INFO_H_ diff --git a/runtime/dex/compact_dex_debug_info_test.cc b/libdexfile/dex/compact_dex_debug_info_test.cc index 3267612443..3267612443 100644 --- a/runtime/dex/compact_dex_debug_info_test.cc +++ b/libdexfile/dex/compact_dex_debug_info_test.cc diff --git a/runtime/dex/compact_dex_file.cc b/libdexfile/dex/compact_dex_file.cc index ce289d4d7b..ce289d4d7b 100644 --- a/runtime/dex/compact_dex_file.cc +++ b/libdexfile/dex/compact_dex_file.cc diff --git a/runtime/dex/compact_dex_file.h b/libdexfile/dex/compact_dex_file.h index 31aeb27872..47b170c4a8 100644 --- a/runtime/dex/compact_dex_file.h +++ b/libdexfile/dex/compact_dex_file.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_COMPACT_DEX_FILE_H_ -#define ART_RUNTIME_DEX_COMPACT_DEX_FILE_H_ +#ifndef ART_LIBDEXFILE_DEX_COMPACT_DEX_FILE_H_ +#define ART_LIBDEXFILE_DEX_COMPACT_DEX_FILE_H_ #include "base/casts.h" #include "dex_file.h" @@ -288,4 +288,4 @@ class CompactDexFile : public DexFile { } // namespace art -#endif // ART_RUNTIME_DEX_COMPACT_DEX_FILE_H_ +#endif // ART_LIBDEXFILE_DEX_COMPACT_DEX_FILE_H_ diff --git a/runtime/dex/compact_dex_file_test.cc b/libdexfile/dex/compact_dex_file_test.cc index 517c5873ed..517c5873ed 100644 --- a/runtime/dex/compact_dex_file_test.cc +++ b/libdexfile/dex/compact_dex_file_test.cc diff --git a/runtime/dex/compact_dex_level.h b/libdexfile/dex/compact_dex_level.h index de9ca3c783..2325ac2cae 100644 --- a/runtime/dex/compact_dex_level.h +++ b/libdexfile/dex/compact_dex_level.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_COMPACT_DEX_LEVEL_H_ -#define ART_RUNTIME_DEX_COMPACT_DEX_LEVEL_H_ +#ifndef ART_LIBDEXFILE_DEX_COMPACT_DEX_LEVEL_H_ +#define ART_LIBDEXFILE_DEX_COMPACT_DEX_LEVEL_H_ #include <string> @@ -47,4 +47,4 @@ static constexpr CompactDexLevel kDefaultCompactDexLevel = ART_DEFAULT_COMPACT_D } // namespace art -#endif // ART_RUNTIME_DEX_COMPACT_DEX_LEVEL_H_ +#endif // ART_LIBDEXFILE_DEX_COMPACT_DEX_LEVEL_H_ diff --git a/runtime/dex/compact_dex_utils.h b/libdexfile/dex/compact_dex_utils.h index 1c7e9514fd..c88b799e1f 100644 --- a/runtime/dex/compact_dex_utils.h +++ b/libdexfile/dex/compact_dex_utils.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_COMPACT_DEX_UTILS_H_ -#define ART_RUNTIME_DEX_COMPACT_DEX_UTILS_H_ +#ifndef ART_LIBDEXFILE_DEX_COMPACT_DEX_UTILS_H_ +#define ART_LIBDEXFILE_DEX_COMPACT_DEX_UTILS_H_ #include <vector> @@ -34,4 +34,4 @@ static inline void AlignmentPadVector(std::vector<T, Allocator<T>>* dest, } // namespace art -#endif // ART_RUNTIME_DEX_COMPACT_DEX_UTILS_H_ +#endif // ART_LIBDEXFILE_DEX_COMPACT_DEX_UTILS_H_ diff --git a/runtime/dex/descriptors_names.cc b/libdexfile/dex/descriptors_names.cc index 8124e7256f..8124e7256f 100644 --- a/runtime/dex/descriptors_names.cc +++ b/libdexfile/dex/descriptors_names.cc diff --git a/runtime/dex/descriptors_names.h b/libdexfile/dex/descriptors_names.h index 22e9573556..10738eead0 100644 --- a/runtime/dex/descriptors_names.h +++ b/libdexfile/dex/descriptors_names.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DESCRIPTORS_NAMES_H_ -#define ART_RUNTIME_DEX_DESCRIPTORS_NAMES_H_ +#ifndef ART_LIBDEXFILE_DEX_DESCRIPTORS_NAMES_H_ +#define ART_LIBDEXFILE_DEX_DESCRIPTORS_NAMES_H_ #include <string> @@ -60,4 +60,4 @@ bool IsValidMemberName(const char* s); } // namespace art -#endif // ART_RUNTIME_DEX_DESCRIPTORS_NAMES_H_ +#endif // ART_LIBDEXFILE_DEX_DESCRIPTORS_NAMES_H_ diff --git a/runtime/dex/dex_file-inl.h b/libdexfile/dex/dex_file-inl.h index aa53daac35..b424b50f21 100644 --- a/runtime/dex/dex_file-inl.h +++ b/libdexfile/dex/dex_file-inl.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_FILE_INL_H_ -#define ART_RUNTIME_DEX_DEX_FILE_INL_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_FILE_INL_H_ +#define ART_LIBDEXFILE_DEX_DEX_FILE_INL_H_ #include "base/bit_utils.h" #include "base/casts.h" @@ -518,4 +518,4 @@ inline const uint8_t* DexFile::GetCatchHandlerData(const DexInstructionIterator& } // namespace art -#endif // ART_RUNTIME_DEX_DEX_FILE_INL_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_FILE_INL_H_ diff --git a/runtime/dex/dex_file.cc b/libdexfile/dex/dex_file.cc index 18eb903551..18eb903551 100644 --- a/runtime/dex/dex_file.cc +++ b/libdexfile/dex/dex_file.cc diff --git a/runtime/dex/dex_file.h b/libdexfile/dex/dex_file.h index cf8c840b59..a38e76cfd0 100644 --- a/runtime/dex/dex_file.h +++ b/libdexfile/dex/dex_file.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_FILE_H_ -#define ART_RUNTIME_DEX_DEX_FILE_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_FILE_H_ +#define ART_LIBDEXFILE_DEX_DEX_FILE_H_ #include <memory> #include <string> @@ -1440,4 +1440,4 @@ std::ostream& operator<<(std::ostream& os, const CallSiteArrayValueIterator::Val } // namespace art -#endif // ART_RUNTIME_DEX_DEX_FILE_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_FILE_H_ diff --git a/runtime/dex/dex_file_exception_helpers.cc b/libdexfile/dex/dex_file_exception_helpers.cc index 8e597fd3dd..8e597fd3dd 100644 --- a/runtime/dex/dex_file_exception_helpers.cc +++ b/libdexfile/dex/dex_file_exception_helpers.cc diff --git a/runtime/dex/dex_file_exception_helpers.h b/libdexfile/dex/dex_file_exception_helpers.h index bd6cb7e747..a05fd68e86 100644 --- a/runtime/dex/dex_file_exception_helpers.h +++ b/libdexfile/dex/dex_file_exception_helpers.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_FILE_EXCEPTION_HELPERS_H_ -#define ART_RUNTIME_DEX_DEX_FILE_EXCEPTION_HELPERS_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_FILE_EXCEPTION_HELPERS_H_ +#define ART_LIBDEXFILE_DEX_DEX_FILE_EXCEPTION_HELPERS_H_ #include "dex_file.h" @@ -65,4 +65,4 @@ class CatchHandlerIterator { } // namespace art -#endif // ART_RUNTIME_DEX_DEX_FILE_EXCEPTION_HELPERS_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_FILE_EXCEPTION_HELPERS_H_ diff --git a/runtime/dex/dex_file_loader.cc b/libdexfile/dex/dex_file_loader.cc index 2c75c5b5d9..2c75c5b5d9 100644 --- a/runtime/dex/dex_file_loader.cc +++ b/libdexfile/dex/dex_file_loader.cc diff --git a/runtime/dex/dex_file_loader.h b/libdexfile/dex/dex_file_loader.h index 508397cb00..41d9b1691b 100644 --- a/runtime/dex/dex_file_loader.h +++ b/libdexfile/dex/dex_file_loader.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_FILE_LOADER_H_ -#define ART_RUNTIME_DEX_DEX_FILE_LOADER_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_FILE_LOADER_H_ +#define ART_LIBDEXFILE_DEX_DEX_FILE_LOADER_H_ #include <cstdint> #include <memory> @@ -195,4 +195,4 @@ class DexFileLoader { } // namespace art -#endif // ART_RUNTIME_DEX_DEX_FILE_LOADER_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_FILE_LOADER_H_ diff --git a/runtime/dex/dex_file_loader_test.cc b/libdexfile/dex/dex_file_loader_test.cc index ab5c3f9a26..ab5c3f9a26 100644 --- a/runtime/dex/dex_file_loader_test.cc +++ b/libdexfile/dex/dex_file_loader_test.cc diff --git a/runtime/dex/dex_file_reference.h b/libdexfile/dex/dex_file_reference.h index 6f882900c6..3ac778121a 100644 --- a/runtime/dex/dex_file_reference.h +++ b/libdexfile/dex/dex_file_reference.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_FILE_REFERENCE_H_ -#define ART_RUNTIME_DEX_DEX_FILE_REFERENCE_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_FILE_REFERENCE_H_ +#define ART_LIBDEXFILE_DEX_DEX_FILE_REFERENCE_H_ #include <cstdint> @@ -49,4 +49,4 @@ inline bool operator==(const DexFileReference& a, const DexFileReference& b) { } // namespace art -#endif // ART_RUNTIME_DEX_DEX_FILE_REFERENCE_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_FILE_REFERENCE_H_ diff --git a/runtime/dex/dex_file_tracking_registrar.cc b/libdexfile/dex/dex_file_tracking_registrar.cc index 78ea9c16cb..78ea9c16cb 100644 --- a/runtime/dex/dex_file_tracking_registrar.cc +++ b/libdexfile/dex/dex_file_tracking_registrar.cc diff --git a/runtime/dex/dex_file_tracking_registrar.h b/libdexfile/dex/dex_file_tracking_registrar.h index 71b8ed7bde..8b7716e729 100644 --- a/runtime/dex/dex_file_tracking_registrar.h +++ b/libdexfile/dex/dex_file_tracking_registrar.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_FILE_TRACKING_REGISTRAR_H_ -#define ART_RUNTIME_DEX_DEX_FILE_TRACKING_REGISTRAR_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_FILE_TRACKING_REGISTRAR_H_ +#define ART_LIBDEXFILE_DEX_DEX_FILE_TRACKING_REGISTRAR_H_ #include <deque> #include <tuple> @@ -78,4 +78,4 @@ void RegisterDexFile(const DexFile* dex_file); } // namespace dex } // namespace art -#endif // ART_RUNTIME_DEX_DEX_FILE_TRACKING_REGISTRAR_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_FILE_TRACKING_REGISTRAR_H_ diff --git a/runtime/dex/dex_file_types.h b/libdexfile/dex/dex_file_types.h index 2c508f9c99..2bb70ff261 100644 --- a/runtime/dex/dex_file_types.h +++ b/libdexfile/dex/dex_file_types.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_FILE_TYPES_H_ -#define ART_RUNTIME_DEX_DEX_FILE_TYPES_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_FILE_TYPES_H_ +#define ART_LIBDEXFILE_DEX_DEX_FILE_TYPES_H_ #include <limits> #include <ostream> @@ -114,4 +114,4 @@ template<> struct hash<art::dex::TypeIndex> { } // namespace std -#endif // ART_RUNTIME_DEX_DEX_FILE_TYPES_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_FILE_TYPES_H_ diff --git a/runtime/dex/dex_file_verifier.cc b/libdexfile/dex/dex_file_verifier.cc index 62667052ad..62667052ad 100644 --- a/runtime/dex/dex_file_verifier.cc +++ b/libdexfile/dex/dex_file_verifier.cc diff --git a/runtime/dex/dex_file_verifier.h b/libdexfile/dex/dex_file_verifier.h index 6cb5d4c629..c4982c24c9 100644 --- a/runtime/dex/dex_file_verifier.h +++ b/libdexfile/dex/dex_file_verifier.h @@ -14,12 +14,11 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_FILE_VERIFIER_H_ -#define ART_RUNTIME_DEX_DEX_FILE_VERIFIER_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_FILE_VERIFIER_H_ +#define ART_LIBDEXFILE_DEX_DEX_FILE_VERIFIER_H_ #include <unordered_set> -#include "base/allocator.h" #include "base/hash_map.h" #include "dex_file.h" #include "dex_file_types.h" @@ -254,4 +253,4 @@ class DexFileVerifier { } // namespace art -#endif // ART_RUNTIME_DEX_DEX_FILE_VERIFIER_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_FILE_VERIFIER_H_ diff --git a/runtime/dex/dex_file_verifier_test.cc b/libdexfile/dex/dex_file_verifier_test.cc index 1cd4b2c07b..1cd4b2c07b 100644 --- a/runtime/dex/dex_file_verifier_test.cc +++ b/libdexfile/dex/dex_file_verifier_test.cc diff --git a/runtime/dex/dex_instruction-inl.h b/libdexfile/dex/dex_instruction-inl.h index a6b8414e62..6bef18c85f 100644 --- a/runtime/dex/dex_instruction-inl.h +++ b/libdexfile/dex/dex_instruction-inl.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_INSTRUCTION_INL_H_ -#define ART_RUNTIME_DEX_DEX_INSTRUCTION_INL_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_INL_H_ +#define ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_INL_H_ #include "dex_instruction.h" @@ -555,4 +555,4 @@ inline void Instruction::GetVarArgs(uint32_t arg[kMaxVarArgRegs], uint16_t inst_ } // namespace art -#endif // ART_RUNTIME_DEX_DEX_INSTRUCTION_INL_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_INL_H_ diff --git a/runtime/dex/dex_instruction.cc b/libdexfile/dex/dex_instruction.cc index 886218129e..886218129e 100644 --- a/runtime/dex/dex_instruction.cc +++ b/libdexfile/dex/dex_instruction.cc diff --git a/runtime/dex/dex_instruction.h b/libdexfile/dex/dex_instruction.h index de14ed3c41..c9533656d3 100644 --- a/runtime/dex/dex_instruction.h +++ b/libdexfile/dex/dex_instruction.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_INSTRUCTION_H_ -#define ART_RUNTIME_DEX_DEX_INSTRUCTION_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_H_ +#define ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_H_ #include <android-base/logging.h> @@ -754,4 +754,4 @@ class NoReceiverInstructionOperands FINAL : public InstructionOperands { } // namespace art -#endif // ART_RUNTIME_DEX_DEX_INSTRUCTION_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_H_ diff --git a/runtime/dex/dex_instruction_iterator.h b/libdexfile/dex/dex_instruction_iterator.h index c1b3118f85..db3ff95e02 100644 --- a/runtime/dex/dex_instruction_iterator.h +++ b/libdexfile/dex/dex_instruction_iterator.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_INSTRUCTION_ITERATOR_H_ -#define ART_RUNTIME_DEX_DEX_INSTRUCTION_ITERATOR_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_ITERATOR_H_ +#define ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_ITERATOR_H_ #include <iterator> @@ -234,4 +234,4 @@ class SafeDexInstructionIterator : public DexInstructionIteratorBase { } // namespace art -#endif // ART_RUNTIME_DEX_DEX_INSTRUCTION_ITERATOR_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_ITERATOR_H_ diff --git a/runtime/dex/dex_instruction_list.h b/libdexfile/dex/dex_instruction_list.h index aa63fadb66..9f0aba421a 100644 --- a/runtime/dex/dex_instruction_list.h +++ b/libdexfile/dex/dex_instruction_list.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_INSTRUCTION_LIST_H_ -#define ART_RUNTIME_DEX_DEX_INSTRUCTION_LIST_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_LIST_H_ +#define ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_LIST_H_ // V(opcode, instruction_code, name, format, index, flags, extended_flags, verifier_flags); #define DEX_INSTRUCTION_LIST(V) \ @@ -304,5 +304,5 @@ V(k4rcc) \ V(k51l) -#endif // ART_RUNTIME_DEX_DEX_INSTRUCTION_LIST_H_ -#undef ART_RUNTIME_DEX_DEX_INSTRUCTION_LIST_H_ // the guard in this file is just for cpplint +#endif // ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_LIST_H_ +#undef ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_LIST_H_ // the guard in this file is just for cpplint diff --git a/runtime/dex/dex_instruction_test.cc b/libdexfile/dex/dex_instruction_test.cc index c944085b9e..c944085b9e 100644 --- a/runtime/dex/dex_instruction_test.cc +++ b/libdexfile/dex/dex_instruction_test.cc diff --git a/runtime/dex/dex_instruction_utils.h b/libdexfile/dex/dex_instruction_utils.h index 27501927e7..e7614ada31 100644 --- a/runtime/dex/dex_instruction_utils.h +++ b/libdexfile/dex/dex_instruction_utils.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_DEX_INSTRUCTION_UTILS_H_ -#define ART_RUNTIME_DEX_DEX_INSTRUCTION_UTILS_H_ +#ifndef ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_UTILS_H_ +#define ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_UTILS_H_ #include "dex_instruction.h" @@ -216,4 +216,4 @@ constexpr DexMemAccessType AGetOrAPutMemAccessType(Instruction::Code code) { } // namespace art -#endif // ART_RUNTIME_DEX_DEX_INSTRUCTION_UTILS_H_ +#endif // ART_LIBDEXFILE_DEX_DEX_INSTRUCTION_UTILS_H_ diff --git a/runtime/dex/invoke_type.h b/libdexfile/dex/invoke_type.h index 726d269a3e..9b3af673a8 100644 --- a/runtime/dex/invoke_type.h +++ b/libdexfile/dex/invoke_type.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_INVOKE_TYPE_H_ -#define ART_RUNTIME_DEX_INVOKE_TYPE_H_ +#ifndef ART_LIBDEXFILE_DEX_INVOKE_TYPE_H_ +#define ART_LIBDEXFILE_DEX_INVOKE_TYPE_H_ #include <iosfwd> @@ -35,4 +35,4 @@ std::ostream& operator<<(std::ostream& os, const InvokeType& rhs); } // namespace art -#endif // ART_RUNTIME_DEX_INVOKE_TYPE_H_ +#endif // ART_LIBDEXFILE_DEX_INVOKE_TYPE_H_ diff --git a/runtime/dex/modifiers.cc b/libdexfile/dex/modifiers.cc index 30daefb172..30daefb172 100644 --- a/runtime/dex/modifiers.cc +++ b/libdexfile/dex/modifiers.cc diff --git a/runtime/dex/modifiers.h b/libdexfile/dex/modifiers.h index 2998f602d4..2425a588df 100644 --- a/runtime/dex/modifiers.h +++ b/libdexfile/dex/modifiers.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_MODIFIERS_H_ -#define ART_RUNTIME_DEX_MODIFIERS_H_ +#ifndef ART_LIBDEXFILE_DEX_MODIFIERS_H_ +#define ART_LIBDEXFILE_DEX_MODIFIERS_H_ #include <stdint.h> @@ -144,5 +144,5 @@ std::string PrettyJavaAccessFlags(uint32_t access_flags); } // namespace art -#endif // ART_RUNTIME_DEX_MODIFIERS_H_ +#endif // ART_LIBDEXFILE_DEX_MODIFIERS_H_ diff --git a/runtime/dex/standard_dex_file.cc b/libdexfile/dex/standard_dex_file.cc index f7317eb997..f7317eb997 100644 --- a/runtime/dex/standard_dex_file.cc +++ b/libdexfile/dex/standard_dex_file.cc diff --git a/runtime/dex/standard_dex_file.h b/libdexfile/dex/standard_dex_file.h index e0e9f2f11c..9b13caa2be 100644 --- a/runtime/dex/standard_dex_file.h +++ b/libdexfile/dex/standard_dex_file.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_STANDARD_DEX_FILE_H_ -#define ART_RUNTIME_DEX_STANDARD_DEX_FILE_H_ +#ifndef ART_LIBDEXFILE_DEX_STANDARD_DEX_FILE_H_ +#define ART_LIBDEXFILE_DEX_STANDARD_DEX_FILE_H_ #include <iosfwd> @@ -115,4 +115,4 @@ class StandardDexFile : public DexFile { } // namespace art -#endif // ART_RUNTIME_DEX_STANDARD_DEX_FILE_H_ +#endif // ART_LIBDEXFILE_DEX_STANDARD_DEX_FILE_H_ diff --git a/runtime/dex/utf-inl.h b/libdexfile/dex/utf-inl.h index 4f626a8580..5355766aae 100644 --- a/runtime/dex/utf-inl.h +++ b/libdexfile/dex/utf-inl.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_UTF_INL_H_ -#define ART_RUNTIME_DEX_UTF_INL_H_ +#ifndef ART_LIBDEXFILE_DEX_UTF_INL_H_ +#define ART_LIBDEXFILE_DEX_UTF_INL_H_ #include "utf.h" @@ -96,4 +96,4 @@ inline int CompareModifiedUtf8ToModifiedUtf8AsUtf16CodePointValues(const char* u } // namespace art -#endif // ART_RUNTIME_DEX_UTF_INL_H_ +#endif // ART_LIBDEXFILE_DEX_UTF_INL_H_ diff --git a/runtime/dex/utf.cc b/libdexfile/dex/utf.cc index 772a610140..772a610140 100644 --- a/runtime/dex/utf.cc +++ b/libdexfile/dex/utf.cc diff --git a/runtime/dex/utf.h b/libdexfile/dex/utf.h index 4adfc4af8c..c86b389175 100644 --- a/runtime/dex/utf.h +++ b/libdexfile/dex/utf.h @@ -14,8 +14,8 @@ * limitations under the License. */ -#ifndef ART_RUNTIME_DEX_UTF_H_ -#define ART_RUNTIME_DEX_UTF_H_ +#ifndef ART_LIBDEXFILE_DEX_UTF_H_ +#define ART_LIBDEXFILE_DEX_UTF_H_ #include "base/macros.h" @@ -132,4 +132,4 @@ std::string PrintableString(const char* utf8); } // namespace art -#endif // ART_RUNTIME_DEX_UTF_H_ +#endif // ART_LIBDEXFILE_DEX_UTF_H_ diff --git a/runtime/dex/utf_test.cc b/libdexfile/dex/utf_test.cc index d2f22d16ef..d2f22d16ef 100644 --- a/runtime/dex/utf_test.cc +++ b/libdexfile/dex/utf_test.cc diff --git a/libdexfile/generate-operator-out.py b/libdexfile/generate-operator-out.py new file mode 120000 index 0000000000..cc291d20c1 --- /dev/null +++ b/libdexfile/generate-operator-out.py @@ -0,0 +1 @@ +../tools/generate-operator-out.py
\ No newline at end of file diff --git a/runtime/Android.bp b/runtime/Android.bp index 832d50e691..e011c2ec57 100644 --- a/runtime/Android.bp +++ b/runtime/Android.bp @@ -14,83 +14,6 @@ // limitations under the License. // -cc_defaults { - name: "libdexfile_defaults", - defaults: ["art_defaults"], - host_supported: true, - srcs: [ - "dex/compact_dex_debug_info.cc", - "dex/compact_dex_file.cc", - "dex/descriptors_names.cc", - "dex/dex_file.cc", - "dex/dex_file_exception_helpers.cc", - "dex/dex_file_loader.cc", - "dex/dex_file_tracking_registrar.cc", - "dex/dex_file_verifier.cc", - "dex/dex_instruction.cc", - "dex/modifiers.cc", - "dex/standard_dex_file.cc", - "dex/utf.cc", - ], - - target: { - android: { - static_libs: [ - "libziparchive", - "libz", - "libbase", - ], - shared_libs: [ - "libutils", - ], - }, - host: { - shared_libs: [ - "libziparchive", - "libz", - ], - }, - }, - generated_sources: ["dexfile_operator_srcs"], - include_dirs: [ - "external/zlib", - ], - shared_libs: [ - "liblog", - // For common macros. - "libbase", - "libz", - ], - - // Exporting "." would shadow the system elf.h with our elf.h, - // which in turn breaks any tools that reference this library. - // export_include_dirs: ["."], -} - -gensrcs { - name: "dexfile_operator_srcs", - cmd: "$(location generate-operator-out.py) art/runtime $(in) > $(out)", - tool_files: ["generate-operator-out.py"], - srcs: [ - "dex/dex_file.h", - "dex/dex_file_layout.h", - "dex/dex_instruction.h", - "dex/dex_instruction_utils.h", - "dex/invoke_type.h", - ], - output_extension: "operator_out.cc", -} - -art_cc_library { - name: "libdexfile", - defaults: ["libdexfile_defaults"], - // Leave the symbols in the shared library so that stack unwinders can - // produce meaningful name resolution. - strip: { - keep_symbols: true, - }, -} - // Keep the __jit_debug_register_code symbol as a unique symbol during ICF for architectures where // we use gold as the linker (arm, x86, x86_64). The symbol is used by the debuggers to detect when // new jit code is generated. We don't want it to be called when a different function with the same @@ -133,9 +56,9 @@ cc_defaults { "common_throws.cc", "compiler_filter.cc", "debugger.cc", + "dex/art_dex_file_loader.cc", "dex/dex_file_annotations.cc", "dex/dex_file_layout.cc", - "dex/art_dex_file_loader.cc", "dex_to_dex_decompiler.cc", "elf_file.cc", "exec_utils.cc", @@ -508,7 +431,10 @@ 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"], + export_shared_lib_headers: [ + "libbase", + "libdexfile", + ], } gensrcs { @@ -521,9 +447,9 @@ gensrcs { "base/callee_save_type.h", "base/enums.h", "base/mutex.h", - "debugger.h", "base/unix_file/fd_file.h", "class_status.h", + "debugger.h", "dex/dex_file_layout.h", "gc_root.h", "gc/allocator_type.h", @@ -638,13 +564,6 @@ art_cc_test { "class_table_test.cc", "compiler_filter_test.cc", "dex/art_dex_file_loader_test.cc", - "dex/code_item_accessors_test.cc", - "dex/compact_dex_debug_info_test.cc", - "dex/compact_dex_file_test.cc", - "dex/dex_file_loader_test.cc", - "dex/dex_file_verifier_test.cc", - "dex/dex_instruction_test.cc", - "dex/utf_test.cc", "entrypoints/math_entrypoints_test.cc", "entrypoints/quick/quick_trampoline_entrypoints_test.cc", "entrypoints_order_test.cc", diff --git a/runtime/dex/art_dex_file_loader.cc b/runtime/dex/art_dex_file_loader.cc index 08cf30d5bf..0817cb4b6a 100644 --- a/runtime/dex/art_dex_file_loader.cc +++ b/runtime/dex/art_dex_file_loader.cc @@ -25,10 +25,10 @@ #include "base/stl_util.h" #include "base/systrace.h" #include "base/unix_file/fd_file.h" -#include "compact_dex_file.h" -#include "dex_file.h" -#include "dex_file_verifier.h" -#include "standard_dex_file.h" +#include "dex/compact_dex_file.h" +#include "dex/dex_file.h" +#include "dex/dex_file_verifier.h" +#include "dex/standard_dex_file.h" #include "zip_archive.h" namespace art { diff --git a/runtime/dex/art_dex_file_loader.h b/runtime/dex/art_dex_file_loader.h index b31d1e94e0..3585381f9b 100644 --- a/runtime/dex/art_dex_file_loader.h +++ b/runtime/dex/art_dex_file_loader.h @@ -22,8 +22,8 @@ #include <string> #include <vector> -#include "dex_file_loader.h" #include "base/macros.h" +#include "dex/dex_file_loader.h" namespace art { diff --git a/runtime/dex/art_dex_file_loader_test.cc b/runtime/dex/art_dex_file_loader_test.cc index f4013810a4..25d4dd0875 100644 --- a/runtime/dex/art_dex_file_loader_test.cc +++ b/runtime/dex/art_dex_file_loader_test.cc @@ -14,8 +14,6 @@ * limitations under the License. */ -#include "dex_file.h" - #include <sys/mman.h> #include <memory> @@ -23,12 +21,13 @@ #include "art_dex_file_loader.h" #include "base/stl_util.h" #include "base/unix_file/fd_file.h" -#include "base64_test_util.h" -#include "code_item_accessors-inl.h" #include "common_runtime_test.h" -#include "descriptors_names.h" -#include "dex_file-inl.h" -#include "dex_file_loader.h" +#include "dex/base64_test_util.h" +#include "dex/code_item_accessors-inl.h" +#include "dex/descriptors_names.h" +#include "dex/dex_file.h" +#include "dex/dex_file-inl.h" +#include "dex/dex_file_loader.h" #include "mem_map.h" #include "os.h" #include "scoped_thread_state_change-inl.h" diff --git a/runtime/dex/dex_file_annotations.cc b/runtime/dex/dex_file_annotations.cc index e01890f541..3431bb7efb 100644 --- a/runtime/dex/dex_file_annotations.cc +++ b/runtime/dex/dex_file_annotations.cc @@ -23,7 +23,7 @@ #include "art_field-inl.h" #include "art_method-inl.h" #include "class_linker-inl.h" -#include "dex_file-inl.h" +#include "dex/dex_file-inl.h" #include "jni_internal.h" #include "jvalue-inl.h" #include "mirror/field.h" diff --git a/runtime/dex/dex_file_annotations.h b/runtime/dex/dex_file_annotations.h index 26773729c2..d7ebf84b1c 100644 --- a/runtime/dex/dex_file_annotations.h +++ b/runtime/dex/dex_file_annotations.h @@ -17,7 +17,7 @@ #ifndef ART_RUNTIME_DEX_DEX_FILE_ANNOTATIONS_H_ #define ART_RUNTIME_DEX_DEX_FILE_ANNOTATIONS_H_ -#include "dex_file.h" +#include "dex/dex_file.h" #include "handle.h" #include "mirror/dex_cache.h" diff --git a/runtime/dex/dex_file_layout.cc b/runtime/dex/dex_file_layout.cc index 312898d82f..d85d61d56b 100644 --- a/runtime/dex/dex_file_layout.cc +++ b/runtime/dex/dex_file_layout.cc @@ -19,8 +19,7 @@ #include <sys/mman.h> #include "base/file_utils.h" -#include "descriptors_names.h" -#include "dex_file.h" +#include "dex/dex_file.h" namespace art { diff --git a/tools/cpp-define-generator/Android.bp b/tools/cpp-define-generator/Android.bp index 57c9c095f8..f3342d39f6 100644 --- a/tools/cpp-define-generator/Android.bp +++ b/tools/cpp-define-generator/Android.bp @@ -28,7 +28,10 @@ cc_binary { // Do not use art_cc_binary because HOST_PREFER_32_BIT is incompatib "art_debug_defaults", "art_defaults", ], - include_dirs: ["art/runtime"], + include_dirs: [ + "art/libdexfile", + "art/runtime", + ], srcs: ["main.cc"], shared_libs: [ "libbase", diff --git a/tools/titrace/Android.bp b/tools/titrace/Android.bp index 097622e756..21f266c087 100644 --- a/tools/titrace/Android.bp +++ b/tools/titrace/Android.bp @@ -40,9 +40,8 @@ cc_defaults { }, header_libs: [ "libopenjdkjvmti_headers", - "libart_runtime_headers", // for dex_instruction_list.h only - // "libbase_headers", ], + include_dirs: ["art/libdexfile"], // for dex_instruction_list.h only multilib: { lib32: { suffix: "32", |