aboutsummaryrefslogtreecommitdiff
path: root/Android.bp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-05-01 08:23:30 -0700
committerElliott Hughes <enh@google.com>2019-05-01 08:23:30 -0700
commit0a281c2d6585e0e9863c73dd2c11fd6037ad9ef8 (patch)
tree0afbd0c4cfa7ef9d13ca8710bd97045f12f073b8 /Android.bp
parent94564420429f92b4bc3e48f973ed8faf81f8a269 (diff)
downloadtoybox-0a281c2d6585e0e9863c73dd2c11fd6037ad9ef8.tar.gz
Decrease host startup time by avoiding unnecessary dependencies.
Saves about 1ms per invocation. Before: enh-p920$ time ./toybox basename arg.h arg.h real 0m0.007s user 0m0.004s sys 0m0.003s After: enh-p920$ time toybox basename arg.h arg.h real 0m0.006s user 0m0.005s sys 0m0.000s Test: see above Change-Id: Id791fa432e825596ec8ce073a9b73051bb15e148
Diffstat (limited to 'Android.bp')
-rw-r--r--Android.bp30
1 files changed, 16 insertions, 14 deletions
diff --git a/Android.bp b/Android.bp
index 43b2e0db..aebbe1d1 100644
--- a/Android.bp
+++ b/Android.bp
@@ -432,22 +432,26 @@ cc_defaults {
"yes",
"zcat",
],
+
+ shared_libs: [
+ // libcutils is needed only for <cutils/sched_policy.h>
+ // inclusion from lib/portability.h. When it's changed to include
+ // <processgroup/sched_policy.h> this dependency should be dropped
+ "libcutils",
+ "liblog",
+ "libprocessgroup",
+ ],
+ },
+ linux: {
+ shared_libs: [
+ "libcrypto",
+ "libselinux",
+ "libz",
+ ],
},
},
}
-toybox_libraries = [
- "liblog",
- "libselinux",
- // libcutils dependency is needed only for <cutils/sched_policy.h>
- // inclusion from lib/portability.h. When it's changed to include
- // <processgroup/sched_policy.h> this dependency should be dropped
- "libcutils",
- "libprocessgroup",
- "libcrypto",
- "libz",
-]
-
//###########################################
// toybox for /system, /vendor, and /recovery
//###########################################
@@ -457,7 +461,6 @@ cc_binary {
defaults: ["toybox-defaults"],
host_supported: true,
recovery_available: true,
- shared_libs: toybox_libraries,
target: {
darwin: {
enabled: false,
@@ -468,6 +471,5 @@ cc_binary {
cc_binary {
name: "toybox_vendor",
defaults: ["toybox-defaults"],
- shared_libs: toybox_libraries,
vendor: true,
}