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.
20 lines
514 B
Bash
20 lines
514 B
Bash
5 years ago
|
#!/bin/bash
|
||
|
|
||
|
# This script is hacky, but lets us list all packages depended on by runtime, or
|
||
|
# related to runtime via go:linkname.
|
||
|
#
|
||
|
# Once we can obfuscate the runtime package, this script can probably be
|
||
|
# deleted.
|
||
|
|
||
|
go version
|
||
|
echo
|
||
|
|
||
|
for GOOS in linux darwin windows; do
|
||
|
skip="macos"
|
||
|
if [[ $GOOS == "darwin" ]]; then
|
||
|
skip=""
|
||
|
fi
|
||
|
|
||
|
GOOS=$GOOS go list -deps $(sed -rn 's@//go:linkname .* ([^.]*)\.[^.]*@\1@p' $(go env GOROOT)/src/runtime/*.go | grep -v '^main\|\.\|js\|'$skip) runtime || exit 1
|
||
|
done | sort -u
|