}
// Ask the driver at the given path for information for this GccgoInstallation.
-func (inst *GccgoInstallation) InitFromDriver(gccgoPath string) (err error) {
- cmd := exec.Command(gccgoPath, "-###", "-S", "-x", "go", "-")
+// The given arguments are passed directly to the call of the driver.
+func (inst *GccgoInstallation) InitFromDriver(gccgoPath string, args ...string) (err error) {
+ argv := append([]string{"-###", "-S", "-x", "go", "-"}, args...)
+ cmd := exec.Command(gccgoPath, argv...)
stderr, err := cmd.StderrPipe()
if err != nil {
return
}
}
- stdout, err := exec.Command(gccgoPath, "-dumpversion").Output()
+ argv = append([]string{"-dumpversion"}, args...)
+ stdout, err := exec.Command(gccgoPath, argv...).Output()
if err != nil {
return
}