mirror of https://github.com/golang/go.git
cmd/go: permit .tbd files as a linker flag
A .tbd file is a macOS text-based stub library and is a valid input to the macOS linker. This change adds .tbd to the allow-list for acceptable linker flags. Fixes golang/go#44263
This commit is contained in:
parent
33d72fd412
commit
764a090b68
|
|
@ -208,7 +208,7 @@ var validLinkerFlags = []*lazyregexp.Regexp{
|
|||
re(`-Wl,-z,(no)?execstack`),
|
||||
re(`-Wl,-z,relro`),
|
||||
|
||||
re(`[a-zA-Z0-9_/].*\.(a|o|obj|dll|dylib|so)`), // direct linker inputs: x.o or libfoo.so (but not -foo.o or @foo.o)
|
||||
re(`[a-zA-Z0-9_/].*\.(a|o|obj|dll|dylib|so|tbd)`), // direct linker inputs: x.o or libfoo.so (but not -foo.o or @foo.o)
|
||||
re(`\./.*\.(a|o|obj|dll|dylib|so)`),
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -164,6 +164,7 @@ var goodLinkerFlags = [][]string{
|
|||
{"-Wl,-framework", "-Wl,Chocolate"},
|
||||
{"-Wl,-framework,Chocolate"},
|
||||
{"-Wl,-unresolved-symbols=ignore-all"},
|
||||
{"libcgotbdtest.tbd"},
|
||||
}
|
||||
|
||||
var badLinkerFlags = [][]string{
|
||||
|
|
|
|||
Loading…
Reference in New Issue