Skip to content

Commit

Permalink
cmd/go, make: remove ccflags
Browse files Browse the repository at this point in the history
cc is no more.

Change-Id: I8d1bc0d2e471cd9357274204c9bc1fa67cbc272d
Reviewed-on: https://go-review.googlesource.com/3833
Reviewed-by: Ian Lance Taylor <[email protected]>
Reviewed-by: Andrew Gerrand <[email protected]>
  • Loading branch information
josharian committed Feb 4, 2015
1 parent 3fa90ea commit 22f3376
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 23 deletions.
5 changes: 0 additions & 5 deletions src/cmd/go/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,6 @@ and test commands:
-x
print the commands.
-ccflags 'arg list'
arguments to pass on each 5c, 6c, or 8c compiler invocation.
-compiler name
name of compiler to use, as in runtime.Compiler (gccgo or gc).
-gccgoflags 'arg list'
Expand Down Expand Up @@ -131,7 +129,6 @@ var buildI bool // -i flag
var buildO = cmdBuild.Flag.String("o", "", "output file")
var buildWork bool // -work flag
var buildGcflags []string // -gcflags flag
var buildCcflags []string // -ccflags flag
var buildLdflags []string // -ldflags flag
var buildGccgoflags []string // -gccgoflags flag
var buildRace bool // -race flag
Expand Down Expand Up @@ -183,7 +180,6 @@ func addBuildFlags(cmd *Command) {
cmd.Flag.BoolVar(&buildX, "x", false, "")
cmd.Flag.BoolVar(&buildWork, "work", false, "")
cmd.Flag.Var((*stringsFlag)(&buildGcflags), "gcflags", "")
cmd.Flag.Var((*stringsFlag)(&buildCcflags), "ccflags", "")
cmd.Flag.Var((*stringsFlag)(&buildLdflags), "ldflags", "")
cmd.Flag.Var((*stringsFlag)(&buildGccgoflags), "gccgoflags", "")
cmd.Flag.Var((*stringsFlag)(&buildContext.BuildTags), "tags", "")
Expand Down Expand Up @@ -2648,7 +2644,6 @@ func raceInit() {
}
buildGcflags = append(buildGcflags, "-race")
buildLdflags = append(buildLdflags, "-race")
buildCcflags = append(buildCcflags, "-D", "RACE")
if buildContext.InstallSuffix != "" {
buildContext.InstallSuffix += "_"
}
Expand Down
2 changes: 0 additions & 2 deletions src/cmd/go/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ and test commands:
-x
print the commands.
-ccflags 'arg list'
arguments to pass on each 5c, 6c, or 8c compiler invocation.
-compiler name
name of compiler to use, as in runtime.Compiler (gccgo or gc).
-gccgoflags 'arg list'
Expand Down
6 changes: 0 additions & 6 deletions src/cmd/go/testflag.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ var testFlagDefn = []*testFlagSpec{
{name: "x", boolVar: &buildX},
{name: "i", boolVar: &buildI},
{name: "work", boolVar: &buildWork},
{name: "ccflags"},
{name: "gcflags"},
{name: "exec"},
{name: "ldflags"},
Expand Down Expand Up @@ -165,11 +164,6 @@ func testFlags(args []string) (packageNames, passToTest []string) {
if err != nil {
fatalf("invalid flag argument for -%s: %v", f.name, err)
}
case "ccflags":
buildCcflags, err = splitQuotedFields(value)
if err != nil {
fatalf("invalid flag argument for -%s: %v", f.name, err)
}
case "gcflags":
buildGcflags, err = splitQuotedFields(value)
if err != nil {
Expand Down
7 changes: 2 additions & 5 deletions src/make.bash
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
# GO_LDFLAGS: Additional 5l/6l/8l arguments to use when
# building the commands.
#
# GO_CCFLAGS: Additional 5c/6c/8c arguments to use when
# building.
#
# CGO_ENABLED: Controls cgo usage during the build. Set it to 1
# to include all cgo related files, .c and .go file with "cgo"
# build directive, in the build. Set it to 0 to ignore them.
Expand Down Expand Up @@ -158,12 +155,12 @@ if [ "$GOHOSTARCH" != "$GOARCH" -o "$GOHOSTOS" != "$GOOS" ]; then
# CC_FOR_TARGET is recorded as the default compiler for the go tool. When building for the host, however,
# use the host compiler, CC, from `cmd/dist/dist env` instead.
CC=$CC GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
"$GOTOOLDIR"/go_bootstrap install -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std
"$GOTOOLDIR"/go_bootstrap install -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std
echo
fi

echo "##### Building packages and commands for $GOOS/$GOARCH."
CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -ccflags "$GO_CCFLAGS" -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std
CC=$CC_FOR_TARGET "$GOTOOLDIR"/go_bootstrap install $GO_FLAGS -gcflags "$GO_GCFLAGS" -ldflags "$GO_LDFLAGS" -v std
echo

rm -f "$GOTOOLDIR"/go_bootstrap
Expand Down
7 changes: 2 additions & 5 deletions src/make.rc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
# GO_LDFLAGS: Additional 5l/6l/8l arguments to use when
# building the commands.
#
# GO_CCFLAGS: Additional 5c/6c/8c arguments to use when
# building.
#
# CGO_ENABLED: Controls cgo usage during the build. Set it to 1
# to include all cgo related files, .c and .go file with "cgo"
# build directive, in the build. Set it to 0 to ignore them.
Expand Down Expand Up @@ -89,12 +86,12 @@ if(~ $sysname vx32)
if(! ~ $GOHOSTARCH $GOARCH || ! ~ $GOHOSTOS $GOOS){
echo '# Building packages and commands for host,' $GOHOSTOS/$GOHOSTARCH^.
GOOS=$GOHOSTOS GOARCH=$GOHOSTARCH \
$GOTOOLDIR/go_bootstrap install -ccflags $"GO_CCFLAGS -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std
$GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std
echo
}
echo '# Building packages and commands for' $GOOS/$GOARCH^.
$GOTOOLDIR/go_bootstrap install -ccflags $"GO_CCFLAGS -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std
$GOTOOLDIR/go_bootstrap install -gcflags $"GO_GCFLAGS -ldflags $"GO_LDFLAGS -v $pflag std
echo
rm -f $GOTOOLDIR/go_bootstrap
Expand Down

0 comments on commit 22f3376

Please sign in to comment.