github.com/q45/go@v0.0.0-20151101211701-a4fb8c13db3f/src/cmd/compile/main.go (about) 1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package main 6 7 import ( 8 "cmd/compile/internal/amd64" 9 "cmd/compile/internal/arm" 10 "cmd/compile/internal/arm64" 11 "cmd/compile/internal/ppc64" 12 "cmd/compile/internal/x86" 13 "cmd/internal/obj" 14 "fmt" 15 "os" 16 ) 17 18 func main() { 19 switch obj.Getgoarch() { 20 default: 21 fmt.Fprintf(os.Stderr, "compile: unknown architecture %q\n", obj.Getgoarch()) 22 os.Exit(2) 23 case "386": 24 x86.Main() 25 case "amd64", "amd64p32": 26 amd64.Main() 27 case "arm": 28 arm.Main() 29 case "arm64": 30 arm64.Main() 31 case "ppc64", "ppc64le": 32 ppc64.Main() 33 } 34 }