mirror of
https://github.com/danog/gllvm.git
synced 2024-11-30 06:59:05 +01:00
Merge branch 'master' of https://github.com/SRI-CSL/gllvm
This commit is contained in:
commit
4a45aecff2
@ -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 {
|
||||
|
4
gllvm.go
4
gllvm.go
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user