mirror of
https://github.com/danog/gllvm.git
synced 2024-12-02 13:17:50 +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
|
exitCode = 0
|
||||||
//in the configureOnly case we have to know the exit code of the compile
|
//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.
|
//because that is how configure figures out what it can and cannot do.
|
||||||
|
|
||||||
var ok bool = true
|
var ok bool = true
|
||||||
|
|
||||||
var compilerExecName = getCompilerExecName(compilerName)
|
var compilerExecName = getCompilerExecName(compilerName)
|
||||||
@ -52,7 +52,7 @@ func compile(args []string, compilerName string) (exitCode int) {
|
|||||||
go buildAndAttachBitcode(compilerExecName, pr, &bcObjLinks, &newObjectFiles, &wg)
|
go buildAndAttachBitcode(compilerExecName, pr, &bcObjLinks, &newObjectFiles, &wg)
|
||||||
wg.Wait()
|
wg.Wait()
|
||||||
|
|
||||||
//grok the exit code
|
//grok the exit code
|
||||||
if !ok {
|
if !ok {
|
||||||
exitCode = 1
|
exitCode = 1
|
||||||
}
|
}
|
||||||
@ -195,7 +195,7 @@ func execCompile(compilerExecName string, pr parserResult, wg *sync.WaitGroup, o
|
|||||||
if !success {
|
if !success {
|
||||||
logError("Failed to compile using given arguments: %v\n", err)
|
logError("Failed to compile using given arguments: %v\n", err)
|
||||||
*ok = false
|
*ok = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func getCompilerExecName(compilerName string) string {
|
func getCompilerExecName(compilerName string) string {
|
||||||
|
4
gllvm.go
4
gllvm.go
@ -10,7 +10,7 @@ func main() {
|
|||||||
var args = os.Args
|
var args = os.Args
|
||||||
_, callerName := path.Split(args[0])
|
_, callerName := path.Split(args[0])
|
||||||
args = args[1:]
|
args = args[1:]
|
||||||
|
|
||||||
var exitCode int
|
var exitCode int
|
||||||
|
|
||||||
switch callerName {
|
switch callerName {
|
||||||
@ -24,7 +24,7 @@ func main() {
|
|||||||
logError("You should call %s with a valid name.", callerName)
|
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
|
//important to pretend to look like the actual wrapped command
|
||||||
os.Exit(exitCode)
|
os.Exit(exitCode)
|
||||||
|
Loading…
Reference in New Issue
Block a user