mirror of
https://github.com/golang/go
synced 2024-11-19 20:54:39 -07:00
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 <iant@golang.org> Run-TryBot: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
bd7086996c
commit
dba926d7a3
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user