aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Freni <dariofreni@google.com>2020-01-06 15:57:14 +0000
committerTheodore Ts'o <tytso@mit.edu>2020-03-20 23:00:14 -0400
commitd4cde4925480eb71510bb81e8fc878cf6a5dc4cc (patch)
tree4cad5368532f837243b121b105093efa49ab6990
parent223479730aa2f4222bec4667af98d1191bcf67a8 (diff)
downloade2fsprogs-d4cde4925480eb71510bb81e8fc878cf6a5dc4cc.tar.gz
AOSP: Allow resize2fs to compile with BUILD_HOST_static
Bug: 144477678 Test: BUILD_HOST_static=1 m resize2fs; m resize2fs Change-Id: I0986deccfe496153e662dcc3cc2fb1ffb6973c21 From AOSP commit: 2c767b86591c64cd7b84c5619e8d8b8a0afd557e
-rw-r--r--resize/Android.bp29
1 files changed, 22 insertions, 7 deletions
diff --git a/resize/Android.bp b/resize/Android.bp
index d55e24c21..399201c3b 100644
--- a/resize/Android.bp
+++ b/resize/Android.bp
@@ -13,12 +13,27 @@ cc_binary {
"sim_progress.c",
"resource_track.c",
],
- shared_libs: [
- "libext2fs",
- "libext2_com_err",
- "libext2_e2p",
- "libext2_uuid",
- "libext2_blkid",
- ],
+ // Host binaries can be compiled statically to be re-used in other environments.
+ // For android binaries, we keep shared libraries to keep the binary size smaller.
+ target: {
+ host: {
+ static_libs: [
+ "libext2fs",
+ "libext2_com_err",
+ "libext2_e2p",
+ "libext2_uuid",
+ "libext2_blkid",
+ ],
+ },
+ android: {
+ shared_libs: [
+ "libext2fs",
+ "libext2_com_err",
+ "libext2_e2p",
+ "libext2_uuid",
+ "libext2_blkid",
+ ],
+ },
+ },
system_shared_libs: ["libc", "libdl"],
}