]> Cypherpunks.ru repositories - gostls13.git/blobdiff - src/cmd/go/internal/work/init.go
[dev.fuzz] all: merge master (d137b74) into dev.fuzz
[gostls13.git] / src / cmd / go / internal / work / init.go
index 81ebb750ad9bd1191a931ecc8fd2b7438aa4b334..5f53c20245f4e2e92acab15978f8ad6426d244db 100644 (file)
@@ -11,21 +11,19 @@ import (
        "cmd/go/internal/cfg"
        "cmd/go/internal/fsys"
        "cmd/go/internal/modload"
-       "cmd/internal/objabi"
        "cmd/internal/sys"
        "flag"
        "fmt"
        "os"
        "path/filepath"
        "runtime"
-       "strings"
 )
 
 func BuildInit() {
        modload.Init()
        instrumentInit()
        buildModeInit()
-       if err := fsys.Init(base.Cwd); err != nil {
+       if err := fsys.Init(base.Cwd()); err != nil {
                base.Fatalf("go: %v", err)
        }
 
@@ -47,20 +45,6 @@ func BuildInit() {
                        base.Fatalf("go %s: %s environment variable is relative; must be absolute path: %s\n", flag.Args()[0], key, path)
                }
        }
-
-       // For each experiment that has been enabled in the toolchain, define a
-       // build tag with the same name but prefixed by "goexperiment." which can be
-       // used for compiling alternative files for the experiment. This allows
-       // changes for the experiment, like extra struct fields in the runtime,
-       // without affecting the base non-experiment code at all. [2:] strips the
-       // leading "X:" from objabi.Expstring().
-       exp := objabi.Expstring()[2:]
-       if exp != "none" {
-               experiments := strings.Split(exp, ",")
-               for _, expt := range experiments {
-                       cfg.BuildContext.BuildTags = append(cfg.BuildContext.BuildTags, "goexperiment."+expt)
-               }
-       }
 }
 
 func FuzzInstrumentFlags() []string {