mirror of
https://github.com/burrowers/garble.git
synced 2025-12-24 12:58:05 +08:00
scripts: use -trimpath for "go build" in check-third-party
Since "garble build" first performs a Go build with -trimpath, it helps to also use the flag with the "go build" step. This way we get more build cache hits, as building a Go package with and without the flag results in two separate builds. Before: $ go clean -cache && time ./scripts/check-third-party.sh real 0m41.844s user 2m17.791s sys 0m35.440s After: $ go clean -cache && time ./scripts/check-third-party.sh real 0m33.983s user 1m50.596s sys 0m28.499s
This commit is contained in:
committed by
Andrew LeFevre
parent
352d2fa73d
commit
98466a1f64
@@ -72,7 +72,8 @@ for ((i = 0; i < ${#modules[@]}; i += 2)); do
|
||||
fi
|
||||
|
||||
# Run "go build" first, to ensure the regular Go build works.
|
||||
show go build "${module}/..."
|
||||
# Use -trimpath to help reuse the cache with "garble build".
|
||||
show go build -trimpath "${module}/..."
|
||||
|
||||
# Run the garble build.
|
||||
show garble build "${module}/..."
|
||||
|
||||
Reference in New Issue
Block a user