mirror of
https://github.com/golang/go
synced 2024-11-12 04:00:23 -07:00
12795c02f3
People invoking the linker directly already have to change their scripts to use the new "go tool link", so this is a good time to make the -X flag behave like all other Go flags and take just a single argument. The old syntax will continue to be accepted (it is rewritten into the new syntax before flag parsing). Maybe some day we will be able to retire it. Even if we never retire the old syntax, having the new syntax at least makes the rewriting much less of a kludge. Change-Id: I91e8df94f4c22b2186e81d7f1016b8767d777eac Reviewed-on: https://go-review.googlesource.com/10310 Reviewed-by: Rob Pike <r@golang.org>
21 lines
392 B
Go
21 lines
392 B
Go
// skip
|
|
|
|
// Copyright 2012 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.
|
|
|
|
// Test the -X facility of the gc linker (6l etc.).
|
|
// This test is run by linkx_run.go.
|
|
|
|
package main
|
|
|
|
import "fmt"
|
|
|
|
var tbd string
|
|
var overwrite string = "dibs"
|
|
|
|
func main() {
|
|
fmt.Println(tbd)
|
|
fmt.Println(overwrite)
|
|
}
|