Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for cgoEnabled (0.28 sec)

  1. src/cmd/dist/build.go

    // mustLinkExternal is a copy of internal/platform.MustLinkExternal,
    // duplicated here to avoid version skew in the MustLinkExternal function
    // during bootstrapping.
    func mustLinkExternal(goos, goarch string, cgoEnabled bool) bool {
    	if cgoEnabled {
    		switch goarch {
    		case "loong64", "mips", "mipsle", "mips64", "mips64le":
    			// Internally linking cgo is incomplete on some architectures.
    			// https://golang.org/issue/14449
    			return true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 18:34:40 UTC 2024
    - 54K bytes
    - Viewed (0)
  2. src/cmd/dist/test.go

    	}
    
    	cmd := exec.Command(gorootBinGo, "env", "CGO_ENABLED")
    	cmd.Stderr = new(bytes.Buffer)
    	slurp, err := cmd.Output()
    	if err != nil {
    		fatalf("Error running %s: %v\n%s", cmd, err, cmd.Stderr)
    	}
    	parts := strings.Split(string(slurp), "\n")
    	if nlines := len(parts) - 1; nlines < 1 {
    		fatalf("Error running %s: output contains <1 lines\n%s", cmd, cmd.Stderr)
    	}
    	t.cgoEnabled, _ = strconv.ParseBool(parts[0])
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 16:01:35 UTC 2024
    - 50K bytes
    - Viewed (0)
  3. src/go/build/build.go

    	env := os.Getenv("CGO_ENABLED")
    	if env == "" {
    		env = defaultCGO_ENABLED
    	}
    	switch env {
    	case "1":
    		c.CgoEnabled = true
    	case "0":
    		c.CgoEnabled = false
    	default:
    		// cgo must be explicitly enabled for cross compilation builds
    		if runtime.GOARCH == c.GOARCH && runtime.GOOS == c.GOOS {
    			c.CgoEnabled = platform.CgoSupported(c.GOOS, c.GOARCH)
    			break
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  4. src/cmd/internal/testdir/testdir_test.go

    		GOARCH       string
    		GOEXPERIMENT string
    		GODEBUG      string
    		CGO_ENABLED  string
    	}
    	if err := json.NewDecoder(stdout).Decode(&env); err != nil {
    		t.Fatal("Decode:", err)
    	}
    	if err := cmd.Wait(); err != nil {
    		t.Fatal("Wait:", err)
    	}
    	goos = env.GOOS
    	goarch = env.GOARCH
    	cgoEnabled, _ = strconv.ParseBool(env.CGO_ENABLED)
    	goExperiment = env.GOEXPERIMENT
    	goDebug = env.GODEBUG
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:08:06 UTC 2024
    - 57.5K bytes
    - Viewed (0)
  5. src/cmd/go/go_test.go

    	// CGO_ENABLED.
    
    	tg.setenv("CGO_ENABLED", "1")
    	tg.run("list", "-f", "{{.SysoFiles}}", "syso")
    	tg.grepStdout("a.syso", "missing syso file with CGO_ENABLED=1")
    
    	tg.setenv("CGO_ENABLED", "0")
    	tg.run("list", "-f", "{{.SysoFiles}}", "syso")
    	tg.grepStdout("a.syso", "missing syso file with CGO_ENABLED=0")
    
    	tg.setenv("CGO_ENABLED", "1")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 81.1K bytes
    - Viewed (0)
Back to top