Hard-wire the path to xcrun as /usr/bin/xcrun.

This lets us not leak $PATH to soong_build. It was only needed for
Darwin tests anyway.

Test: Will ask jingwen@ who has a Mac.
Change-Id: I4647e41275b323fe6283580f8f92718c6229f23e
This commit is contained in:
Lukacs T. Berki
2021-03-11 08:52:39 +01:00
parent dfa33be445
commit 21d5c7aaa9
3 changed files with 1 additions and 28 deletions

View File

@@ -177,14 +177,6 @@ func runSoong(ctx Context, config Config) {
ninjaEnv.Set("TOP", os.Getenv("TOP"))
ninjaEnv.Set("SOONG_OUTDIR", config.SoongOutDir())
// Needed for NonHermeticHostSystemTool() and that, only in tests. We should
// probably find a better way of running tests other than making $PATH
// available also to production builds. Note that this is not get same as
// os.Getenv("PATH"): config.Environment() contains the $PATH that redirects
// every binary through the path interposer.
configPath, _ := config.Environment().Get("PATH")
ninjaEnv.Set("PATH", configPath)
// For debugging
if os.Getenv("SOONG_DELVE") != "" {
ninjaEnv.Set("SOONG_DELVE", os.Getenv("SOONG_DELVE"))