mirror of
https://github.com/golang/go.git
synced 2025-11-10 21:51:05 +00:00
cmd/compile, cmd/link: create from 5g, 5l, etc
Trivial merging of 5g, 6g, ... into go tool compile, and similarlly 5l, 6l, ... into go tool link. The files compile/main.go and link/main.go are new. Everything else in those directories is a move followed by change of imports and package name. This CL breaks the build. Manual fixups are in the next CL. See golang-dev thread titled "go tool compile, etc" for background. Change-Id: Id35ff5a5859ad9037c61275d637b1bd51df6828b Reviewed-on: https://go-review.googlesource.com/10287 Reviewed-by: Dave Cheney <dave@cheney.net> Reviewed-by: Rob Pike <r@golang.org>
This commit is contained in:
parent
2a141dedc4
commit
17eba6e6b7
156 changed files with 186 additions and 118 deletions
34
src/cmd/compile/main.go
Normal file
34
src/cmd/compile/main.go
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
// 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"
|
||||
"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()
|
||||
case "ppc64", "ppc64le":
|
||||
ppc64.Main()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue