mirror of
https://github.com/danog/gllvm.git
synced 2024-11-30 07:49:00 +01:00
25 lines
371 B
Go
25 lines
371 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"path"
|
|
)
|
|
|
|
func main() {
|
|
// Parse command line
|
|
var args = os.Args
|
|
_, callerName := path.Split(args[0])
|
|
args = args[1:]
|
|
|
|
switch callerName {
|
|
case "gclang":
|
|
compile(args, "clang")
|
|
case "gclang++":
|
|
compile(args, "clang++")
|
|
case "get-bc":
|
|
extract(args)
|
|
default:
|
|
logError("You should call %s with a valid name.", callerName)
|
|
}
|
|
}
|