This commit is contained in:
Loïc Gelle 2017-07-03 11:17:12 -07:00
commit 4a45aecff2
2 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@ func compile(args []string, compilerName string) (exitCode int) {
exitCode = 0
//in the configureOnly case we have to know the exit code of the compile
//because that is how configure figures out what it can and cannot do.
var ok bool = true
var compilerExecName = getCompilerExecName(compilerName)
@ -52,7 +52,7 @@ func compile(args []string, compilerName string) (exitCode int) {
go buildAndAttachBitcode(compilerExecName, pr, &bcObjLinks, &newObjectFiles, &wg)
wg.Wait()
//grok the exit code
//grok the exit code
if !ok {
exitCode = 1
}
@ -195,7 +195,7 @@ func execCompile(compilerExecName string, pr parserResult, wg *sync.WaitGroup, o
if !success {
logError("Failed to compile using given arguments: %v\n", err)
*ok = false
}
}
}
func getCompilerExecName(compilerName string) string {

View File

@ -10,7 +10,7 @@ func main() {
var args = os.Args
_, callerName := path.Split(args[0])
args = args[1:]
var exitCode int
switch callerName {
@ -24,7 +24,7 @@ func main() {
logError("You should call %s with a valid name.", callerName)
}
logInfo("Calling %v returned %v\n", os.Args, exitCode)
logInfo("Calling %v returned %v\n", os.Args, exitCode)
//important to pretend to look like the actual wrapped command
os.Exit(exitCode)