gllvm/gllvm.go

25 lines
409 B
Go
Raw Normal View History

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
var callerName = args[0]
args = args[1:]
2017-06-21 16:34:56 -07:00
switch callerName {
2017-06-27 10:09:39 -07:00
case "gclang":
compile(args, "clang")
2017-06-27 10:09:39 -07:00
case "gclang++":
compile(args, "clang++")
2017-06-27 10:09:39 -07:00
case "get-bc":
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
}
}