change output name generator + update readme

This commit is contained in:
Loic Gelle 2017-06-28 09:49:53 -07:00
parent 50bfc93217
commit f11a1405aa
2 changed files with 8 additions and 11 deletions

View File

@ -35,9 +35,9 @@ gllvm currently works with clang.
#### Requirements #### Requirements
You need the Go compiler to compile gllvm, and the clang/clang++ executables You need the Go compiler to compile gllvm, and both the clang/clang++
to use gllvm. Follow the instructions here to get started: executables and the llvm tools -- llvm-link, llvm-ar -- to use gllvm. Follow
https://golang.org/doc/install. the instructions here to get started: https://golang.org/doc/install.
As for now, let us name `$GOROOT` your root Go path that you can obtain by As for now, let us name `$GOROOT` your root Go path that you can obtain by
typing `go env GOPATH` in a terminal session -- it is usually `$HOME/go` typing `go env GOPATH` in a terminal session -- it is usually `$HOME/go`
@ -174,7 +174,7 @@ original path, and the store path.
The GLLVM tools can show various levels of output to aid with debugging. The GLLVM tools can show various levels of output to aid with debugging.
To show this output set the `GLLVM_OUTPUT_LEVEL` environment To show this output set the `GLLVM_OUTPUT_LEVEL` environment
variable to one of the following levels: variable to one of the following levels:
* `ERROR` * `ERROR`
@ -187,10 +187,9 @@ For example:
export GLLVM_OUTPUT_LEVEL=DEBUG export GLLVM_OUTPUT_LEVEL=DEBUG
``` ```
Output will be directed to the standard error stream, unless you specify the Output will be directed to the standard error stream, unless you specify the
path of a logfile via the `GLLVM_OUTPUT_FILE` environment variable. path of a logfile via the `GLLVM_OUTPUT_FILE` environment variable.
For example: For example:
``` ```
export GLLVM_OUTPUT_FILE=/tmp/gllvm.log export GLLVM_OUTPUT_FILE=/tmp/gllvm.log
``` ```

View File

@ -128,6 +128,9 @@ func parseExtractingArgs(args []string) ExtractingArgs {
ea.ArArgs = append(ea.ArArgs, "-v") ea.ArArgs = append(ea.ArArgs, "-v")
} }
ea.ObjectTypeInArchive = FT_MACH_OBJECT ea.ObjectTypeInArchive = FT_MACH_OBJECT
default:
log.Fatal("Unsupported platform: ", platform)
}
// Create output filename if not given // Create output filename if not given
if ea.OutputFile == "" { if ea.OutputFile == "" {
@ -144,10 +147,6 @@ func parseExtractingArgs(args []string) ExtractingArgs {
} }
} }
default:
log.Fatal("Unsupported platform: ", platform)
}
return ea return ea
} }
@ -303,7 +302,6 @@ func resolveBitcodePath(bcPath string) string {
} else { } else {
return bcPath return bcPath
} }
return ""
} }
func getFileType(realPath string) (fileType int) { func getFileType(realPath string) (fileType int) {