diff options
author | Andreas Gampe <agampe@google.com> | 2017-08-23 09:43:46 -0700 |
---|---|---|
committer | Andreas Gampe <agampe@google.com> | 2017-08-23 16:06:00 -0700 |
commit | 3157fc26d96951ff4acfb4feb4597e74a92da2a7 (patch) | |
tree | 93c3a03a8eae4fc9f430531f25d8be3d4d8b5af7 | |
parent | 27bd4dd81962b0e59df9318ae8efc83df99ebe0a (diff) | |
download | android_art-3157fc26d96951ff4acfb4feb4597e74a92da2a7.tar.gz android_art-3157fc26d96951ff4acfb4feb4597e74a92da2a7.tar.bz2 android_art-3157fc26d96951ff4acfb4feb4597e74a92da2a7.zip |
ART: Move cmdline parser to header library
Express the cmdline parser as a header library.
TODO: Express the libart dependency correctly.
Test: m
Change-Id: I9e90029d047ab0d75a455a2361d5213a8fa6f361
-rw-r--r-- | cmdline/Android.bp | 7 | ||||
-rw-r--r-- | cmdline/cmdline_parser.h | 8 | ||||
-rw-r--r-- | dex2oat/Android.bp | 7 | ||||
-rw-r--r-- | dexoptanalyzer/Android.bp | 4 | ||||
-rw-r--r-- | imgdiag/Android.bp | 4 | ||||
-rw-r--r-- | oatdump/Android.bp | 4 | ||||
-rw-r--r-- | profman/Android.bp | 4 | ||||
-rw-r--r-- | runtime/Android.bp | 9 | ||||
-rw-r--r-- | test/Android.bp | 1 |
9 files changed, 27 insertions, 21 deletions
diff --git a/cmdline/Android.bp b/cmdline/Android.bp index c811cbdd33..b46e987972 100644 --- a/cmdline/Android.bp +++ b/cmdline/Android.bp @@ -14,6 +14,13 @@ // limitations under the License. // +// TODO: this header library depends on libart. Find a way to express that. +cc_library_headers { + name: "art_cmdlineparser_headers", + host_supported: true, + export_include_dirs: ["."], +} + art_cc_test { name: "art_cmdline_tests", defaults: [ diff --git a/cmdline/cmdline_parser.h b/cmdline/cmdline_parser.h index 804727bdcd..fef39ad930 100644 --- a/cmdline/cmdline_parser.h +++ b/cmdline/cmdline_parser.h @@ -19,9 +19,9 @@ #define CMDLINE_NDEBUG 1 // Do not output any debugging information for parsing. -#include "cmdline/detail/cmdline_debug_detail.h" -#include "cmdline/detail/cmdline_parse_argument_detail.h" -#include "cmdline/detail/cmdline_parser_detail.h" +#include "detail/cmdline_debug_detail.h" +#include "detail/cmdline_parse_argument_detail.h" +#include "detail/cmdline_parser_detail.h" #include "cmdline_parse_result.h" #include "cmdline_result.h" @@ -29,7 +29,7 @@ #include "cmdline_types.h" #include "token_range.h" -#include "runtime/base/variant_map.h" +#include "base/variant_map.h" #include <memory> #include <vector> diff --git a/dex2oat/Android.bp b/dex2oat/Android.bp index 0d453efc0c..f13f01cabe 100644 --- a/dex2oat/Android.bp +++ b/dex2oat/Android.bp @@ -33,11 +33,10 @@ cc_defaults { }, }, - - include_dirs: [ - "art/cmdline", + header_libs: [ + "dex2oat_headers", + "art_cmdlineparser_headers", ], - header_libs: ["dex2oat_headers"], } art_cc_binary { diff --git a/dexoptanalyzer/Android.bp b/dexoptanalyzer/Android.bp index da6663dd6b..715c209d7f 100644 --- a/dexoptanalyzer/Android.bp +++ b/dexoptanalyzer/Android.bp @@ -28,10 +28,6 @@ cc_defaults { }, }, - include_dirs: [ - "art/cmdline", - ], - shared_libs: [ "libbase", ], diff --git a/imgdiag/Android.bp b/imgdiag/Android.bp index 9459bb5504..2b89497e8e 100644 --- a/imgdiag/Android.bp +++ b/imgdiag/Android.bp @@ -38,8 +38,8 @@ cc_defaults { shared_libs: ["libziparchive"], }, }, - include_dirs: [ - "art/cmdline", + header_libs: [ + "art_cmdlineparser_headers", ], multilib: { lib32: { diff --git a/oatdump/Android.bp b/oatdump/Android.bp index 1cd97c2b53..4851722734 100644 --- a/oatdump/Android.bp +++ b/oatdump/Android.bp @@ -24,7 +24,9 @@ cc_defaults { shared_libs: ["libcutils"], }, }, - include_dirs: ["art/cmdline"], + header_libs: [ + "art_cmdlineparser_headers", + ], } art_cc_binary { diff --git a/profman/Android.bp b/profman/Android.bp index 2a45c462b0..ea682b40a0 100644 --- a/profman/Android.bp +++ b/profman/Android.bp @@ -30,10 +30,6 @@ cc_defaults { }, }, - include_dirs: [ - "art/cmdline", - ], - shared_libs: [ "libbase", ], diff --git a/runtime/Android.bp b/runtime/Android.bp index 0f5a1a8079..71b803de31 100644 --- a/runtime/Android.bp +++ b/runtime/Android.bp @@ -400,10 +400,12 @@ cc_defaults { export_generated_headers: ["cpp-define-generator-asm-support"], clang: true, include_dirs: [ - "art/cmdline", "art/sigchainlib", "art", ], + header_libs: [ + "art_cmdlineparser_headers", + ], shared_libs: [ "libnativehelper", "libnativebridge", @@ -424,6 +426,8 @@ cc_defaults { }, 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 + // generically. dex2oat takes care of it itself. export_shared_lib_headers: ["libbase"], } @@ -609,6 +613,9 @@ art_cc_test { shared_libs: [ "libbacktrace", ], + header_libs: [ + "art_cmdlineparser_headers", // For parsed_options_test. + ], } art_cc_test { diff --git a/test/Android.bp b/test/Android.bp index fcb8788e32..26b9b84ca5 100644 --- a/test/Android.bp +++ b/test/Android.bp @@ -73,7 +73,6 @@ art_cc_defaults { ], include_dirs: [ "art", - "art/cmdline", ], target: { |