From dba926d7a37bd6b3d740c132e8d6346214b6355c Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 6 Jan 2016 14:33:25 -0500 Subject: [PATCH] go/build: allow @ in #cgo directives for OS X Fixes #13720. Change-Id: I2e48454696f37db419370630f913590c435cd9f0 Reviewed-on: https://go-review.googlesource.com/18331 Reviewed-by: Ian Lance Taylor Run-TryBot: Russ Cox --- src/go/build/build.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/go/build/build.go b/src/go/build/build.go index 1fadb8d1e9..c942670775 100644 --- a/src/go/build/build.go +++ b/src/go/build/build.go @@ -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) -- 2.50.0