Start using the toybox prebuilt
Prepend the toybox symlink directory to $PATH, and stop generating
symlinks into out/.path for tools used from toybox.
We don't (yet?) have toybox prebuilts for darwin, so apply the above only to Linux, and preserve existing behavior on Darwin.
Test: check the build banner for uname results
Test: m
Change-Id: I37fc380381e65a628cdc131d462fd4441eacfe9d
diff --git a/ui/build/path.go b/ui/build/path.go
index 52658ef..8260ff9 100644
--- a/ui/build/path.go
+++ b/ui/build/path.go
@@ -19,6 +19,7 @@
"io/ioutil"
"os"
"path/filepath"
+ "runtime"
"strings"
"github.com/google/blueprint/microfactory"
@@ -144,6 +145,13 @@
}
myPath, _ = filepath.Abs(myPath)
+
+ // Use the toybox prebuilts on linux
+ if runtime.GOOS == "linux" {
+ toyboxPath, _ := filepath.Abs("prebuilts/build-tools/toybox/linux-x86")
+ myPath = toyboxPath + string(os.PathListSeparator) + myPath
+ }
+
config.Environment().Set("PATH", myPath)
config.pathReplaced = true
}