- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 92 for cgoEnabled (0.36 sec)
-
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) -
src/runtime/align_test.go
// buildableFiles returns the list of files in the given directory // that are actually used for the build, given GOOS/GOARCH restrictions. func buildableFiles(t *testing.T, dir string) []string { ctxt := build.Default ctxt.CgoEnabled = true pkg, err := ctxt.ImportDir(dir, 0) if err != nil { t.Fatalf("can't find buildable files: %v", err) } return pkg.GoFiles
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Feb 08 14:52:12 UTC 2023 - 5.4K bytes - Viewed (0) -
cmd/preferredimports/preferredimports.go
fset *token.FileSet // positions are relative to fset ctx build.Context failed bool donePaths map[string]interface{} } func newAnalyzer() *analyzer { ctx := build.Default ctx.CgoEnabled = true a := &analyzer{ fset: token.NewFileSet(), ctx: ctx, donePaths: make(map[string]interface{}), } return a } // collect extracts test metadata from a file.
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Fri Mar 01 06:06:44 UTC 2024 - 7.1K bytes - Viewed (0) -
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) -
src/cmd/go/internal/run/run.go
} else if len(p.CgoFiles) > 0 { src = p.CgoFiles[0] } else { // this case could only happen if the provided source uses cgo // while cgo is disabled. hint := "" if !cfg.BuildContext.CgoEnabled { hint = " (cgo is disabled)" } base.Fatalf("go: no suitable source files%s", hint) } p.Internal.ExeName = src[:len(src)-len(".go")] } else { p.Internal.ExeName = path.Base(p.ImportPath)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 19:09:38 UTC 2023 - 6.9K bytes - Viewed (0) -
src/cmd/go/internal/modload/search.go
"builtin": true, // ignore pseudo-package that exists only for documentation } addPkg := func(p string) { mu.Lock() m.Pkgs = append(m.Pkgs, p) mu.Unlock() } if !cfg.BuildContext.CgoEnabled { have["runtime/cgo"] = true // ignore during walk } type pruning int8 const ( pruneVendor = pruning(1 << iota) pruneGoMod ) q := par.NewQueue(runtime.GOMAXPROCS(0))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 17:55:15 UTC 2023 - 7.9K bytes - Viewed (0) -
src/cmd/go/script_test.go
env = append(env, "TESTGOVCS=panic") } if os.Getenv("CGO_ENABLED") != "" || runtime.GOOS != goHostOS || runtime.GOARCH != goHostArch { // If the actual CGO_ENABLED might not match the cmd/go default, set it // explicitly in the environment. Otherwise, leave it unset so that we also // cover the default behaviors. env = append(env, "CGO_ENABLED="+cgoEnabled) } for _, key := range extraEnvKeys {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 18:15:22 UTC 2024 - 12.2K bytes - Viewed (0) -
src/cmd/go/internal/work/init.go
if !cfg.BuildContext.CgoEnabled && (cfg.Goos != "darwin" || cfg.BuildASan || cfg.BuildMSan) { if runtime.GOOS != cfg.Goos || runtime.GOARCH != cfg.Goarch { fmt.Fprintf(os.Stderr, "go: %s requires cgo\n", modeFlag) } else { fmt.Fprintf(os.Stderr, "go: %s requires cgo; enable cgo by setting CGO_ENABLED=1\n", modeFlag) } base.SetExitStatus(2) base.Exit() }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 19:13:34 UTC 2023 - 12.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stdlib_test.go
} return pkg, nil } // pkgFilenames returns the list of package filenames for the given directory. func pkgFilenames(dir string, includeTest bool) ([]string, error) { ctxt := build.Default ctxt.CgoEnabled = false pkg, err := ctxt.ImportDir(dir, 0) if err != nil { if _, nogo := err.(*build.NoGoError); nogo { return nil, nil // no *.go files, not an error } return nil, err }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:18:33 UTC 2024 - 13.3K bytes - Viewed (0) -
src/cmd/go/internal/modindex/build.go
// to locate the main module. // // If Dir is non-empty, directories passed to Import and ImportDir must // be absolute. Dir string CgoEnabled bool // whether cgo files are included UseAllFiles bool // use files regardless of //go:build lines, file names Compiler string // compiler to assume when computing target paths
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Aug 25 17:39:23 UTC 2023 - 26.8K bytes - Viewed (0)