summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Jiakai Zhang <jiakaiz@google.com> 2023-11-17 13:57:37 +0000
committer Jiakai Zhang <jiakaiz@google.com> 2023-11-20 10:25:42 +0000
commit58310a99bcda9a45bc1e07f8d36f4c847f345457 (patch)
tree5fe17c3c47654a92db8ae748e77eef8bc10c58ec
parentcb7cfe5dec30e5ec802cfd4eb872f9a7669bac8e (diff)
Restructure the files in libarttools.
- Move headers into an "include" dir. - Move cc files to the root of libarttools. Bug: 311377497 Test: m com.android.art Change-Id: I2f83d38051bbc24082db5aba7278a07fb14b8c29
-rw-r--r--libarttools/Android.bp34
-rw-r--r--libarttools/art_exec.cc (renamed from libarttools/tools/art_exec.cc)0
-rw-r--r--libarttools/art_exec_test.cc (renamed from libarttools/tools/art_exec_test.cc)0
-rw-r--r--libarttools/cmdline_builder_test.cc (renamed from libarttools/tools/cmdline_builder_test.cc)2
-rw-r--r--libarttools/include/tools/cmdline_builder.h (renamed from libarttools/tools/cmdline_builder.h)6
-rw-r--r--libarttools/include/tools/system_properties.h (renamed from libarttools/tools/system_properties.h)6
-rw-r--r--libarttools/include/tools/tools.h (renamed from libarttools/tools/tools.h)6
-rw-r--r--libarttools/system_properties_test.cc (renamed from libarttools/tools/system_properties_test.cc)2
-rw-r--r--libarttools/tools.cc (renamed from libarttools/tools/tools.cc)2
-rw-r--r--libarttools/tools_test.cc (renamed from libarttools/tools/tools_test.cc)2
10 files changed, 28 insertions, 32 deletions
diff --git a/libarttools/Android.bp b/libarttools/Android.bp
index 5c0f1f21c4..5997e5d3c1 100644
--- a/libarttools/Android.bp
+++ b/libarttools/Android.bp
@@ -23,27 +23,23 @@ package {
default_applicable_licenses: ["art_license"],
}
-cc_defaults {
- // This library contains low-level interfaces used to call dex2oat and related tools. This will
- // allow other libraries or programs besides the ART Service to make use of this functionality.
-
- name: "libarttools_defaults",
+// This library contains low-level interfaces used to call dex2oat and related tools. This will
+// allow other libraries or programs besides the ART Service to make use of this functionality.
+cc_library {
+ name: "libarttools",
defaults: ["art_defaults"],
host_supported: true,
srcs: [
- "tools/tools.cc",
+ "tools.cc",
],
- export_include_dirs: ["."],
+ export_include_dirs: ["include"],
header_libs: ["art_libartbase_headers"],
shared_libs: [
"libbase",
],
- export_shared_lib_headers: ["libbase"],
-}
-
-cc_library {
- name: "libarttools",
- defaults: ["libarttools_defaults"],
+ export_shared_lib_headers: [
+ "libbase",
+ ],
whole_static_libs: [
// TODO(b/270049598): Investigate the cost of libc++fs compared to its utility.
"libc++fs",
@@ -56,14 +52,14 @@ cc_library {
art_cc_defaults {
name: "art_libarttools_tests_defaults",
- defaults: ["libarttools_defaults"],
srcs: [
- "tools/art_exec_test.cc",
- "tools/cmdline_builder_test.cc",
- "tools/system_properties_test.cc",
- "tools/tools_test.cc",
+ "art_exec_test.cc",
+ "cmdline_builder_test.cc",
+ "system_properties_test.cc",
+ "tools_test.cc",
],
shared_libs: [
+ "libarttools",
"libbase",
],
static_libs: [
@@ -102,7 +98,7 @@ cc_binary {
"art_defaults",
],
srcs: [
- "tools/art_exec.cc",
+ "art_exec.cc",
],
shared_libs: [
"libartbase",
diff --git a/libarttools/tools/art_exec.cc b/libarttools/art_exec.cc
index 8f3365885b..8f3365885b 100644
--- a/libarttools/tools/art_exec.cc
+++ b/libarttools/art_exec.cc
diff --git a/libarttools/tools/art_exec_test.cc b/libarttools/art_exec_test.cc
index a5a0b01ead..a5a0b01ead 100644
--- a/libarttools/tools/art_exec_test.cc
+++ b/libarttools/art_exec_test.cc
diff --git a/libarttools/tools/cmdline_builder_test.cc b/libarttools/cmdline_builder_test.cc
index 59f41e17ca..1acf2e3f0b 100644
--- a/libarttools/tools/cmdline_builder_test.cc
+++ b/libarttools/cmdline_builder_test.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "cmdline_builder.h"
+#include "tools/cmdline_builder.h"
#include <utility>
diff --git a/libarttools/tools/cmdline_builder.h b/libarttools/include/tools/cmdline_builder.h
index fd11ee87ba..4f3727b133 100644
--- a/libarttools/tools/cmdline_builder.h
+++ b/libarttools/include/tools/cmdline_builder.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_LIBARTTOOLS_TOOLS_CMDLINE_BUILDER_H_
-#define ART_LIBARTTOOLS_TOOLS_CMDLINE_BUILDER_H_
+#ifndef ART_LIBARTTOOLS_INCLUDE_TOOLS_CMDLINE_BUILDER_H_
+#define ART_LIBARTTOOLS_INCLUDE_TOOLS_CMDLINE_BUILDER_H_
#include <algorithm>
#include <iterator>
@@ -153,4 +153,4 @@ class CmdlineBuilder {
} // namespace tools
} // namespace art
-#endif // ART_LIBARTTOOLS_TOOLS_CMDLINE_BUILDER_H_
+#endif // ART_LIBARTTOOLS_INCLUDE_TOOLS_CMDLINE_BUILDER_H_
diff --git a/libarttools/tools/system_properties.h b/libarttools/include/tools/system_properties.h
index 06b7bcb340..af5aea46e3 100644
--- a/libarttools/tools/system_properties.h
+++ b/libarttools/include/tools/system_properties.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_LIBARTTOOLS_TOOLS_SYSTEM_PROPERTIES_H_
-#define ART_LIBARTTOOLS_TOOLS_SYSTEM_PROPERTIES_H_
+#ifndef ART_LIBARTTOOLS_INCLUDE_TOOLS_SYSTEM_PROPERTIES_H_
+#define ART_LIBARTTOOLS_INCLUDE_TOOLS_SYSTEM_PROPERTIES_H_
#include <string>
@@ -101,4 +101,4 @@ class SystemProperties {
} // namespace tools
} // namespace art
-#endif // ART_LIBARTTOOLS_TOOLS_SYSTEM_PROPERTIES_H_
+#endif // ART_LIBARTTOOLS_INCLUDE_TOOLS_SYSTEM_PROPERTIES_H_
diff --git a/libarttools/tools/tools.h b/libarttools/include/tools/tools.h
index 142d19b239..1bf47e4f6b 100644
--- a/libarttools/tools/tools.h
+++ b/libarttools/include/tools/tools.h
@@ -14,8 +14,8 @@
* limitations under the License.
*/
-#ifndef ART_LIBARTTOOLS_TOOLS_TOOLS_H_
-#define ART_LIBARTTOOLS_TOOLS_TOOLS_H_
+#ifndef ART_LIBARTTOOLS_INCLUDE_TOOLS_TOOLS_H_
+#define ART_LIBARTTOOLS_INCLUDE_TOOLS_TOOLS_H_
#include <string>
#include <string_view>
@@ -43,4 +43,4 @@ std::string EscapeGlob(const std::string& str);
} // namespace tools
} // namespace art
-#endif // ART_LIBARTTOOLS_TOOLS_TOOLS_H_
+#endif // ART_LIBARTTOOLS_INCLUDE_TOOLS_TOOLS_H_
diff --git a/libarttools/tools/system_properties_test.cc b/libarttools/system_properties_test.cc
index 80300f0343..acffd9727c 100644
--- a/libarttools/tools/system_properties_test.cc
+++ b/libarttools/system_properties_test.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "system_properties.h"
+#include "tools/system_properties.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
diff --git a/libarttools/tools/tools.cc b/libarttools/tools.cc
index 3a59321b4e..a72217e6ef 100644
--- a/libarttools/tools/tools.cc
+++ b/libarttools/tools.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "tools.h"
+#include "tools/tools.h"
#include <errno.h>
#include <fnmatch.h>
diff --git a/libarttools/tools/tools_test.cc b/libarttools/tools_test.cc
index 09ec35fba3..ca39c947a6 100644
--- a/libarttools/tools/tools_test.cc
+++ b/libarttools/tools_test.cc
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-#include "tools.h"
+#include "tools/tools.h"
#include <algorithm>
#include <filesystem>