From 9991227229a711b8c606bc93ea0731f8b43823bf Mon Sep 17 00:00:00 2001 From: Rob Pike Date: Mon, 3 Aug 2015 11:05:05 +1000 Subject: [PATCH] doc: document new linker -X syntax in go1.5.html Fixes #11973. Change-Id: Icffa3213246663982b7cc795982e0923e272f405 Reviewed-on: https://go-review.googlesource.com/12919 Reviewed-by: Ian Lance Taylor --- doc/go1.5.html | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/doc/go1.5.html b/doc/go1.5.html index 16620e34ae..23874efff4 100644 --- a/doc/go1.5.html +++ b/doc/go1.5.html @@ -416,8 +416,8 @@ by the environment variables GOOS and GOARCH.

-There are a couple of other changes. -The more significant is the addition of a -buildmode option that +There are several other changes. +The most significant is the addition of a -buildmode option that expands the style of linking; it now supports situations such as building shared libraries and allowing other languages to call into Go libraries. @@ -436,6 +436,29 @@ Also, although this may be fixed, Windows cgo executables are missing some DWARF information.

+

+Finally, the -X flag, which takes two arguments, +as in +

+ +
+-X importpath.name value
+
+ +

+now also accepts a more common Go flag style with a single argument +that is itself a name=value pair: +

+ +
+-X importpath.name=value
+
+ +

+Although the old syntax still works, it is recommended that uses of this +flag in scripts and the like be updated to the new form. +

+

Go command

-- 2.48.1