mirror of
https://github.com/danog/gllvm.git
synced 2024-11-30 06:29:01 +01:00
make sure gsanity-check returns an informative exit code, so we can rely on it in tests.
This commit is contained in:
parent
f66fd9f0fc
commit
37af8fee67
3
Makefile
3
Makefile
@ -11,6 +11,9 @@ clean:
|
||||
go clean
|
||||
rm -f gclang gclang++ get-bc
|
||||
|
||||
fmt:
|
||||
gofmt -s -w shared/*.go cmd/*/*.go
|
||||
|
||||
uninstall:
|
||||
rm -f $(GOROOT)/bin/gclang
|
||||
rm -f $(GOROOT)/bin/gclang++
|
||||
|
@ -110,6 +110,7 @@ func checkCompilers() bool {
|
||||
LogWrite("The CXX compiler %s is:\n\n\t%s\n\n", cxx, extractLine(cxxVersion, 0))
|
||||
}
|
||||
|
||||
//FIXME: why "or" rather than "and"?
|
||||
return ccOK || cxxOK
|
||||
}
|
||||
|
||||
@ -130,6 +131,7 @@ func extractLine(version string, n int) string {
|
||||
|
||||
}
|
||||
|
||||
// FIXME: this and execCmd in utils.go could be one routine, if that seems reasonable, or is it overboard?
|
||||
// Executes a command then returns true for success, false if there was an error, err is either nil or the error.
|
||||
func checkExecutable(cmdExecName string, varg string) (success bool, output string, err error) {
|
||||
cmd := exec.Command(cmdExecName, varg)
|
||||
@ -175,7 +177,7 @@ func checkAuxiliaries() bool {
|
||||
LogWrite("The bitcode archiver %s is:\n\n\t%s\n\n", archiverName, extractLine(archiverVersion, 1))
|
||||
}
|
||||
|
||||
return true
|
||||
return linkerOK && archiverOK
|
||||
}
|
||||
|
||||
func checkStore() {
|
||||
|
Loading…
Reference in New Issue
Block a user