2017-06-21 16:34:56 -07:00
|
|
|
package main
|
|
|
|
|
|
|
|
import(
|
|
|
|
"os"
|
2017-06-22 12:14:00 -07:00
|
|
|
"log"
|
2017-06-21 16:34:56 -07:00
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
// Parse command line
|
|
|
|
var args = os.Args
|
2017-06-26 13:08:15 -07:00
|
|
|
var callerName = args[0]
|
|
|
|
args = args[1:]
|
2017-06-21 16:34:56 -07:00
|
|
|
|
2017-06-26 13:08:15 -07:00
|
|
|
switch callerName {
|
|
|
|
case "gowclang":
|
|
|
|
compile(args, "clang")
|
|
|
|
case "gowclang++":
|
|
|
|
compile(args, "clang++")
|
|
|
|
case "gowextract":
|
2017-06-23 14:08:46 -07:00
|
|
|
extract(args)
|
2017-06-21 16:34:56 -07:00
|
|
|
default:
|
2017-06-22 12:14:00 -07:00
|
|
|
log.Fatal("You should call gowllvm with a valid mode.")
|
2017-06-21 16:34:56 -07:00
|
|
|
}
|
|
|
|
}
|