"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/cmd/go/internal/work/action.go" between
go1.19.src.tar.gz and go1.19.1.src.tar.gz

About: Google’s Go is a compiled, garbage-collected, concurrent programming language.
Latest stable release (1.19).

action.go  (go1.19.src):action.go  (go1.19.1.src)
skipping to change at line 243 skipping to change at line 243
type BuildMode int type BuildMode int
const ( const (
ModeBuild BuildMode = iota ModeBuild BuildMode = iota
ModeInstall ModeInstall
ModeBuggyInstall ModeBuggyInstall
ModeVetOnly = 1 << 8 ModeVetOnly = 1 << 8
) )
func (b *Builder) Init() { // NewBuilder returns a new Builder ready for use.
//
// If workDir is the empty string, NewBuilder creates a WorkDir if needed
// and arranges for it to be removed in case of an unclean exit.
func NewBuilder(workDir string) *Builder {
b := new(Builder)
b.Print = func(a ...any) (int, error) { b.Print = func(a ...any) (int, error) {
return fmt.Fprint(os.Stderr, a...) return fmt.Fprint(os.Stderr, a...)
} }
b.actionCache = make(map[cacheKey]*Action) b.actionCache = make(map[cacheKey]*Action)
b.mkdirCache = make(map[string]bool) b.mkdirCache = make(map[string]bool)
b.toolIDCache = make(map[string]string) b.toolIDCache = make(map[string]string)
b.buildIDCache = make(map[string]string) b.buildIDCache = make(map[string]string)
if cfg.BuildN { if workDir != "" {
b.WorkDir = workDir
} else if cfg.BuildN {
b.WorkDir = "$WORK" b.WorkDir = "$WORK"
} else { } else {
tmp, err := os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build") tmp, err := os.MkdirTemp(cfg.Getenv("GOTMPDIR"), "go-build")
if err != nil { if err != nil {
base.Fatalf("go: creating work dir: %v", err) base.Fatalf("go: creating work dir: %v", err)
} }
if !filepath.IsAbs(tmp) { if !filepath.IsAbs(tmp) {
abs, err := filepath.Abs(tmp) abs, err := filepath.Abs(tmp)
if err != nil { if err != nil {
os.RemoveAll(tmp) os.RemoveAll(tmp)
skipping to change at line 309 skipping to change at line 317
base.Exit() base.Exit()
} }
for _, tag := range cfg.BuildContext.BuildTags { for _, tag := range cfg.BuildContext.BuildTags {
if strings.Contains(tag, ",") { if strings.Contains(tag, ",") {
fmt.Fprintf(os.Stderr, "go: -tags space-separated list co ntains comma\n") fmt.Fprintf(os.Stderr, "go: -tags space-separated list co ntains comma\n")
base.SetExitStatus(2) base.SetExitStatus(2)
base.Exit() base.Exit()
} }
} }
return b
} }
func CheckGOOSARCHPair(goos, goarch string) error { func CheckGOOSARCHPair(goos, goarch string) error {
if _, ok := cfg.OSArchSupportsCgo[goos+"/"+goarch]; !ok && cfg.BuildConte xt.Compiler == "gc" { if _, ok := cfg.OSArchSupportsCgo[goos+"/"+goarch]; !ok && cfg.BuildConte xt.Compiler == "gc" {
return fmt.Errorf("unsupported GOOS/GOARCH pair %s/%s", goos, goa rch) return fmt.Errorf("unsupported GOOS/GOARCH pair %s/%s", goos, goa rch)
} }
return nil return nil
} }
// NewObjdir returns the name of a fresh object directory under b.WorkDir. // NewObjdir returns the name of a fresh object directory under b.WorkDir.
 End of changes. 3 change blocks. 
2 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)