Commit dba926d7 authored by Russ Cox's avatar Russ Cox

go/build: allow @ in #cgo directives for OS X

Fixes #13720.

Change-Id: I2e48454696f37db419370630f913590c435cd9f0
Reviewed-on: https://go-review.googlesource.com/18331Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
parent bd708699
......@@ -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)
......
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