mirror of https://github.com/golang/go.git
fix tests
Signed-off-by: Pedro Tôrres <t0rr3sp3dr0@gmail.com>
This commit is contained in:
parent
8223b5c5b8
commit
25d06ffe81
|
|
@ -236,7 +236,7 @@ var validLinkerFlagsOnDarwin = []*lazyregexp.Regexp{
|
|||
// conjunction with the `-install_name` and `-rpath` linker flags.
|
||||
// Since the GNU linker does not support Mach-O, targeting Darwin
|
||||
// implies not using the GNU linker. Therefore, we allow @ in the linker
|
||||
// flags if and only if cfg.GOOS == "darwin".
|
||||
// flags if and only if cfg.Goos == "darwin".
|
||||
re(`-Wl,-dylib_install_name,@rpath(/[^,]*)?`),
|
||||
re(`-Wl,-install_name,@rpath(/[^,]*)?`),
|
||||
re(`-Wl,-rpath,@(executable_path|loader_path)(/[^,]*)?`),
|
||||
|
|
|
|||
|
|
@ -5,10 +5,11 @@
|
|||
package work
|
||||
|
||||
import (
|
||||
"internal/cfg"
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"cmd/go/internal/cfg"
|
||||
)
|
||||
|
||||
var goodCompilerFlags = [][]string{
|
||||
|
|
@ -300,7 +301,7 @@ func TestCheckLinkerFlags(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
goos = cfg.Goos
|
||||
cfg.Goos = goos
|
||||
}
|
||||
|
||||
func TestCheckFlagAllowDisallow(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue