diff options
author | Jin Qian <jinqian@google.com> | 2017-07-12 13:29:38 -0700 |
---|---|---|
committer | Jin Qian <jinqian@google.com> | 2017-08-01 10:55:32 -0700 |
commit | 06bad82b600493fa584794322b088fcb73787376 (patch) | |
tree | e8657c8160efbdbbd6693fda6c949c68c23d070d | |
parent | 2fff6fb036cbbb6dedd7da3d208b312a9038a5ce (diff) | |
download | e2fsprogs-06bad82b600493fa584794322b088fcb73787376.tar.gz |
build static version of mke2fs and e2fsdroid for host
Statically link those two binaries for host build so that we can
package them with fastboot without including other library files.
Bug: 35219933
Change-Id: Ic4762ba5eda8ac61723a2c4137690d12a0aa57f2
(cherry picked from commit 42297fb01aa2a49ead938c1d24868941a39fd434)
(cherry picked from commit 2967b43fd18e5db50a93bb0a290141c66351427c)
-rw-r--r-- | contrib/android/Android.bp | 37 | ||||
-rw-r--r-- | misc/Android.bp | 38 |
2 files changed, 56 insertions, 19 deletions
diff --git a/contrib/android/Android.bp b/contrib/android/Android.bp index afa335e0..18d38501 100644 --- a/contrib/android/Android.bp +++ b/contrib/android/Android.bp @@ -18,15 +18,34 @@ cc_binary { "hashmap.c", ], cflags: ["-W", "-Wall"], - shared_libs: [ - "libext2fs", - "libext2_com_err", - "libext2_misc", - "libcutils", - "libbase", - "libselinux", - "libcrypto", - ], + target: { + host: { + static_libs: [ + "libext2_com_err", + "libext2_misc", + "libext2fs", + "libsparse", + "libz", + "libcutils", + "libbase", + "libselinux", + "libcrypto", + "liblog", + ], + }, + android: { + shared_libs: [ + "libext2fs", + "libext2_com_err", + "libext2_misc", + "libcutils", + "libbase", + "libselinux", + "libcrypto", + ], + }, + }, + stl: "libc++_static", } //########################################################################## diff --git a/misc/Android.bp b/misc/Android.bp index 5183981f..d307477b 100644 --- a/misc/Android.bp +++ b/misc/Android.bp @@ -35,16 +35,34 @@ cc_binary { "mke2fs.conf", ], cflags: ["-W", "-Wall", "-Wno-macro-redefined"], - shared_libs: [ - "libext2fs", - "libext2_blkid", - "libext2_misc", - "libext2_uuid", - "libext2_quota", - "libext2_com_err", - "libext2_e2p", - ], - system_shared_libs: ["libc"], + target: { + host: { + static_libs: [ + "libext2_blkid", + "libext2_misc", + "libext2_uuid", + "libext2_quota", + "libext2_com_err", + "libext2_e2p", + "libext2fs", + "libsparse", + "libbase", + "libz", + ], + }, + android: { + shared_libs: [ + "libext2fs", + "libext2_blkid", + "libext2_misc", + "libext2_uuid", + "libext2_quota", + "libext2_com_err", + "libext2_e2p", + ], + }, + }, + stl: "libc++_static", include_dirs: ["external/e2fsprogs/e2fsck"], } |