From 34b49d14028bd508f7e69ac8a6d6cfa680ae96b1 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 6 Sep 2019 14:42:24 -0700 Subject: [PATCH] Use toybox md5sum instead of md5 on macOS. Test: builds locally Change-Id: I04aa52de96e0525a44331cb0c057a8e18a95891d --- java/sdk.go | 11 +---------- ui/build/paths/config.go | 4 +--- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/java/sdk.go b/java/sdk.go index d1e2ae4d1..3451774c0 100644 --- a/java/sdk.go +++ b/java/sdk.go @@ -19,7 +19,6 @@ import ( "android/soong/java/config" "fmt" "path/filepath" - "runtime" "sort" "strconv" "strings" @@ -349,15 +348,7 @@ func createAPIFingerprint(ctx android.SingletonContext) { cmd.Text("cat"). Inputs(android.PathsForSource(ctx, in)). - Text("|") - - if runtime.GOOS == "darwin" { - cmd.Text("md5") - } else { - cmd.Text("md5sum") - } - - cmd.Text("| cut -d' ' -f1 >"). + Text("| md5sum | cut -d' ' -f1 >"). Output(out) } else { // Unbundled build diff --git a/ui/build/paths/config.go b/ui/build/paths/config.go index b97391b20..786e7d391 100644 --- a/ui/build/paths/config.go +++ b/ui/build/paths/config.go @@ -129,12 +129,10 @@ var Configuration = map[string]PathConfig{ func init() { if runtime.GOOS == "darwin" { - // TODO: move Darwin off md5 and onto our md5sum prebuilt. - Configuration["md5"] = Allowed Configuration["sw_vers"] = Allowed Configuration["xcrun"] = Allowed - // We don't have darwin prebuilts for some tools (like toybox), + // We don't have darwin prebuilts for some tools, // so allow the host versions. for name, config := range Configuration { if config.LinuxOnlyPrebuilt {