You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts
Daniel Martí a9a721e352 concentrate and simplify "to obfuscate" logic
Back in the day, we used to call toObfuscate anytime we needed to know
whether a package should be obfuscated.
More recently, we started computing via the ToObfuscate field,
which then gets shared with all sub-processes via sharedCache.

We still had two places that directly called toObfuscate.
Replace those with ToObfuscate, and inline toObfuscate into shared.go.

obfuscatedImportPath is also a potential footgun for main packages.
Some use cases always want the original "main" package name,
such as for use in the compiler's "-p main" flag,
while other cases want the obfuscated package import path,
such as the entries in importcfg files.

Since each of these call sites handles the edge case well,
obfuscatedImportPath now panics on main packages to avoid any misuse.

Finally, test that we never leak main package paths via ldflags.txt.
We never did, but it's good to make sure.

Overall, this avoids confusion and trims the size of main.go a bit.
4 years ago
..
asm.txt CI: test on GOARCH=386 4 years ago
basic.txt fix binsubstr calls to not prepare for a regexp 4 years ago
cgo.txt stop loading obfuscated type information from deps 4 years ago
crossbuild.txt only list missing packages when obfuscating the runtime 4 years ago
debugdir.txt avoid build ID mismatches when using -debugdir 4 years ago
embed.txt deprecate using GOPRIVATE in favor of GOGARBLE (#427) 4 years ago
gogarble.txt only list missing packages when obfuscating the runtime 4 years ago
goversion.txt drop support for Go 1.16.x 4 years ago
help.txt give a useful error for "garble build -tiny" 4 years ago
implement.txt deprecate using GOPRIVATE in favor of GOGARBLE (#427) 4 years ago
imports.txt handle --long build flags properly 4 years ago
init.txt drop support for Go 1.16.x 4 years ago
ldflags.txt concentrate and simplify "to obfuscate" logic 4 years ago
linkname.txt deprecate using GOPRIVATE in favor of GOGARBLE (#427) 4 years ago
literals.txt support GOGARBLE=* with -literals again 4 years ago
modinfo.txt testdata: adjust for newer Go 1.18 tip version 4 years ago
plugin.txt deprecate using GOPRIVATE in favor of GOGARBLE (#427) 4 years ago
position.txt deprecate using GOPRIVATE in favor of GOGARBLE (#427) 4 years ago
reflect.txt stop loading obfuscated type information from deps 4 years ago
reverse.txt testdata: make pointer regexp less prone to flakes 4 years ago
seed.txt deprecate using GOPRIVATE in favor of GOGARBLE (#427) 4 years ago
syntax.txt properly record when type aliases are embedded as fields 4 years ago
test.txt drop support for Go 1.16.x 4 years ago
tiny.txt deprecate using GOPRIVATE in favor of GOGARBLE (#427) 4 years ago