mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 23:43:40 +00:00
builder: remove environment variables when invoking Clang
This is a problem on Guix, which sets C_INCLUDE_PATH that is not affected by `-nostdlibinc`. And therefore it affects the build in unintended ways. Removing all environmental variables fixes this issue, and perhaps also other issues caused by Clang being affected by environment variables.
This commit is contained in:
committed by
Ron Evans
parent
4ef5109a07
commit
c6acaa981d
@@ -3,7 +3,6 @@ package builder
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
@@ -76,14 +75,3 @@ func LookupCommand(name string) (string, error) {
|
||||
}
|
||||
return "", errors.New("none of these commands were found in your $PATH: " + strings.Join(commands[name], " "))
|
||||
}
|
||||
|
||||
func execCommand(name string, args ...string) error {
|
||||
name, err := LookupCommand(name)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
cmd := exec.Command(name, args...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user