Convert to Android.bp
See build/soong/README.md for more information.
I tested the following tests on a Nexus9 and linux host, and they
continued to pass:
/data/nativetest{,64}/bootstat_tests/bootstat_tests
out/host/linux-x86/bin/nativetest{,64}/bootstat_tests/bootstat_tests
/data/nativetest64/memunreachable_test/memunreachable_test
out/host/linux-x86/bin/nativetest{,64}/memunreachable_test/memunreachable_test
These continue to fail just like before this change:
/data/nativetest{,64}/sync_test/sync_test (was /system/bin/sync_test)
/data/nativetest{,64}/sync-unit-test/sync-unit-test
/data/nativetest/memunreachable_test/memunreachable_test
Test: See above
Change-Id: I691e564e0cf008dd363e3746223b153d712e024d
diff --git a/libsync/Android.bp b/libsync/Android.bp
new file mode 100644
index 0000000..4948aa5
--- /dev/null
+++ b/libsync/Android.bp
@@ -0,0 +1,42 @@
+cc_defaults {
+ name: "libsync_defaults",
+ srcs: ["sync.c"],
+ local_include_dirs: ["include"],
+ export_include_dirs: ["include"],
+ cflags: ["-Werror"],
+}
+
+cc_library_shared {
+ name: "libsync",
+ defaults: ["libsync_defaults"],
+}
+
+// libsync_recovery is only intended for the recovery binary.
+// Future versions of the kernel WILL require an updated libsync, and will break
+// anything statically linked against the current libsync.
+cc_library_static {
+ name: "libsync_recovery",
+ defaults: ["libsync_defaults"],
+}
+
+cc_test {
+ name: "sync_test",
+ defaults: ["libsync_defaults"],
+ gtest: false,
+ srcs: ["sync_test.c"],
+}
+
+cc_test {
+ name: "sync-unit-tests",
+ shared_libs: ["libsync"],
+ srcs: ["tests/sync_test.cpp"],
+ cflags: [
+ "-g",
+ "-Wall",
+ "-Werror",
+ "-std=gnu++11",
+ "-Wno-missing-field-initializers",
+ "-Wno-sign-compare",
+ ],
+ clang: true,
+}