]> Cypherpunks repositories - gostls13.git/commitdiff
go/build: allow @ in #cgo directives for OS X
authorRuss Cox <rsc@golang.org>
Wed, 6 Jan 2016 19:33:25 +0000 (14:33 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 7 Jan 2016 00:38:58 +0000 (00:38 +0000)
Fixes #13720.

Change-Id: I2e48454696f37db419370630f913590c435cd9f0
Reviewed-on: https://go-review.googlesource.com/18331
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>

src/go/build/build.go

index 1fadb8d1e94436c035c25fb394b88d2ee5e96d91..c94267077515ac24b34fb710c22c36e02cee816d 100644 (file)
@@ -1256,7 +1256,8 @@ func expandSrcDir(str string, srcdir string) (string, bool) {
 // NOTE: $ is not safe for the shell, but it is allowed here because of linker options like -Wl,$ORIGIN.
 // We never pass these arguments to a shell (just to programs we construct argv for), so this should be okay.
 // See golang.org/issue/6038.
-const safeString = "+-.,/0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz:$"
+// The @ is for OS X. See golang.org/issue/13720.
+const safeString = "+-.,/0123456789=ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz:$@"
 const safeSpaces = " "
 
 var safeBytes = []byte(safeSpaces + safeString)