Commit 361d2738 authored by David Crawshaw's avatar David Crawshaw

cmd/link: remove the -shared flag

The -shared flag has been superseded by the -buildmode flag.

Change-Id: I3682cc0367b919084c280d7dc64746485c1d4ddd
Reviewed-on: https://go-review.googlesource.com/28852
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarMichael Hudson-Doyle <michael.hudson@canonical.com>
parent 57d4e576
......@@ -125,21 +125,10 @@ func Main() {
obj.Flagfn1("X", "add string value `definition` of the form importpath.name=value", func(s string) { addstrdata1(ctxt, s) })
obj.Flagcount("v", "print link trace", &ctxt.Debugvlog)
obj.Flagfn1("linkmode", "set link `mode` (internal, external, auto)", setlinkmode)
var flagShared bool
if SysArch.InFamily(sys.ARM, sys.AMD64) {
flag.BoolVar(&flagShared, "shared", false, "generate shared object (implies -linkmode external)")
}
obj.Flagparse(usage)
startProfile()
if flagShared {
if Buildmode == BuildmodeUnset {
Buildmode = BuildmodeCShared
} else if Buildmode != BuildmodeCShared {
Exitf("-shared and -buildmode=%s are incompatible", Buildmode.String())
}
}
if Buildmode == BuildmodeUnset {
Buildmode = BuildmodeExe
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment