Otapreopt: Move binary to Soong
Add a helper library using ART defaults to expose the image relocation
constants. Then move the otapreopt module to Android.bp.
Bug: 115993344
Test: mmma frameworks/native/cmds/installd
Change-Id: Ia5e114783150273c7806c1f1292ee7d3eff53e7c
diff --git a/cmds/installd/Android.bp b/cmds/installd/Android.bp
index 94c3102..9d0d8ba 100644
--- a/cmds/installd/Android.bp
+++ b/cmds/installd/Android.bp
@@ -108,10 +108,8 @@
"-Wall",
"-Werror"
],
- clang: true,
- srcs: [
- "otapreopt_parameters.cpp"],
+ srcs: ["otapreopt_parameters.cpp"],
export_include_dirs: ["."],
@@ -123,4 +121,39 @@
],
}
-subdirs = ["tests"]
+//
+// OTA Executable
+//
+
+cc_binary {
+ name: "otapreopt",
+ cflags: [
+ "-Wall",
+ "-Werror"
+ ],
+
+ srcs: [
+ "dexopt.cpp",
+ "globals.cpp",
+ "otapreopt.cpp",
+ "utils.cpp",
+ ],
+
+ header_libs: ["dex2oat_headers"],
+
+ static_libs: [
+ "libartimagevalues",
+ "libdiskusage",
+ "libotapreoptparameters",
+ ],
+
+ shared_libs: [
+ "libbase",
+ "libcrypto",
+ "libcutils",
+ "liblog",
+ "liblogwrap",
+ "libselinux",
+ "libutils",
+ ],
+}