Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

compiler: use hash calculation for determining archive staleness #805

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: master
Choose a base branch
Loading
from
Prev Previous commit
Next Next commit
Add build tags to the hash
  • Loading branch information
myitcv committed May 4, 2018
commit 69257f7911f57e59bffcef11880ca9b00cedba7b
6 changes: 6 additions & 0 deletions 6 build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import (
"path"
"path/filepath"
"runtime"
"sort"
"strconv"
"strings"

Expand Down Expand Up @@ -610,6 +611,11 @@ func (s *Session) BuildPackage(pkg *PackageData) (*compiler.Archive, error) {
defer binFile.Close()
io.Copy(pkgHash, binFile)

orderedBuildTags := append([]string{}, s.options.BuildTags...)
sort.Strings(orderedBuildTags)

fmt.Fprintf(pkgHash, "build tags: %v\n", strings.Join(orderedBuildTags, ","))

for _, importedPkgPath := range pkg.Imports {
flimzy marked this conversation as resolved.
Show resolved Hide resolved
// Ignore all imports that aren't mentioned in import specs of pkg.
// For example, this ignores imports such as runtime/internal/sys and runtime/internal/atomic.
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.