2015-05-21 11:28:10 -06:00
|
|
|
// Copyright 2015 The Go Authors. All rights reserved.
|
|
|
|
// Use of this source code is governed by a BSD-style
|
|
|
|
// license that can be found in the LICENSE file.
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"cmd/compile/internal/amd64"
|
|
|
|
"cmd/compile/internal/arm"
|
|
|
|
"cmd/compile/internal/arm64"
|
2015-09-10 09:33:09 -06:00
|
|
|
"cmd/compile/internal/mips64"
|
2015-05-21 11:28:10 -06:00
|
|
|
"cmd/compile/internal/ppc64"
|
|
|
|
"cmd/compile/internal/x86"
|
|
|
|
"cmd/internal/obj"
|
|
|
|
"fmt"
|
|
|
|
"os"
|
|
|
|
)
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
switch obj.Getgoarch() {
|
|
|
|
default:
|
|
|
|
fmt.Fprintf(os.Stderr, "compile: unknown architecture %q\n", obj.Getgoarch())
|
|
|
|
os.Exit(2)
|
|
|
|
case "386":
|
|
|
|
x86.Main()
|
|
|
|
case "amd64", "amd64p32":
|
|
|
|
amd64.Main()
|
|
|
|
case "arm":
|
|
|
|
arm.Main()
|
|
|
|
case "arm64":
|
|
|
|
arm64.Main()
|
2015-09-10 09:33:09 -06:00
|
|
|
case "mips64", "mips64le":
|
|
|
|
mips64.Main()
|
2015-05-21 11:28:10 -06:00
|
|
|
case "ppc64", "ppc64le":
|
|
|
|
ppc64.Main()
|
|
|
|
}
|
|
|
|
}
|