Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 318 for gcflags (0.34 sec)

  1. src/net/netip/inlining_test.go

    	"regexp"
    	"runtime"
    	"strings"
    	"testing"
    )
    
    func TestInlining(t *testing.T) {
    	testenv.MustHaveGoBuild(t)
    	t.Parallel()
    	out, err := exec.Command(
    		testenv.GoToolPath(t),
    		"build",
    		"--gcflags=-m",
    		"net/netip").CombinedOutput()
    	if err != nil {
    		t.Fatalf("go build: %v, %s", err, out)
    	}
    	got := map[string]bool{}
    	regexp.MustCompile(` can inline (\S+)`).ReplaceAllFunc(out, func(match []byte) []byte {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 17:10:01 UTC 2024
    - 2K bytes
    - Viewed (0)
  2. src/cmd/go/internal/work/gc.go

    	} else {
    		compiler = envList("CC", cfg.DefaultCC(cfg.Goos, cfg.Goarch))
    	}
    	ldflags = append(ldflags, "-buildmode="+ldBuildmode)
    	if root.buildID != "" {
    		ldflags = append(ldflags, "-buildid="+root.buildID)
    	}
    	ldflags = append(ldflags, forcedLdflags...)
    	ldflags = append(ldflags, root.Package.Internal.Ldflags...)
    	ldflags, err := setextld(ldflags, compiler)
    	if err != nil {
    		return err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 15:37:44 UTC 2024
    - 23K bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testplugin/plugin_test.go

    	return m.Run()
    }
    
    func goCmd(t *testing.T, op string, args ...string) string {
    	if t != nil {
    		t.Helper()
    	}
    	var flags []string
    	if op != "tool" {
    		flags = []string{"-gcflags", gcflags}
    	}
    	return run(t, filepath.Join(goroot, "bin", "go"), append(append([]string{op}, flags...), args...)...)
    }
    
    // escape converts a string to something suitable for a shell command line.
    func escape(s string) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:32:53 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  4. test/inline_caller.go

    // run -gcflags -l=4
    
    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    	"runtime"
    )
    
    type frame struct {
    	pc   uintptr
    	file string
    	line int
    	ok   bool
    }
    
    var (
    	skip        int
    	globalFrame frame
    )
    
    func f() {
    	g() // line 27
    }
    
    func g() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 08 21:54:04 UTC 2019
    - 1.4K bytes
    - Viewed (0)
  5. doc/next/5-toolchain.md

    a cost of an additional 0.1% text and binary size.  This is currently only implemented
    on 386 and amd64 because it has not shown an improvement on other platforms.
    Hot block alignment can be disabled with `-gcflags=[<packages>=]-d=alignhot=0`
    
    ## Assembler {#assembler}
    
    ## Linker {#linker}
    
    <!-- go.dev/issue/67401, CL 585556, CL 587220, and many more -->
    The linker now disallows using a `//go:linkname` directive to refer to
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 11 17:18:10 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  6. src/cmd/go/testdata/script/build_shorten_pkg.txt

    # Accurate reporting of notable loops in the presence of inlining
    # can create warnings in sibling directories, and it's nice if those
    # can be trimmed like subdirectory paths are.
    
    env GOEXPERIMENT=loopvar
    go build -gcflags=inlines/a=-d=loopvar=2 .
    stderr ^\.[\\/]b[\\/]b\.go:12:6:.*loop.inlined.into.a[\\/]a\.go
    stderr ^\.[\\/]b[\\/]b\.go:12:9:.*loop.inlined.into.a[\\/]a\.go
    
    -- go.mod --
    module inlines
    
    go 1.21
    -- a/a.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 14 09:07:58 UTC 2023
    - 1.4K bytes
    - Viewed (0)
  7. test/inline_callers.go

    // run -gcflags=-l=4
    
    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import (
    	"fmt"
    	"runtime"
    )
    
    var skip int
    var npcs int
    var pcs = make([]uintptr, 32)
    
    func f() {
    	g()
    }
    
    func g() {
    	h()
    }
    
    func h() {
    	npcs = runtime.Callers(skip, pcs)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 08 21:54:04 UTC 2019
    - 1.9K bytes
    - Viewed (0)
  8. test/typeparam/dictionaryCapture-noinline.go

    // run -gcflags="-l"
    
    // Copyright 2021 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test situations where functions/methods are not
    // immediately called and we need to capture the dictionary
    // required for later invocation.
    
    package main
    
    func main() {
    	functions()
    	methodExpressions()
    	methodValues()
    	interfaceMethods()
    	globals()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  9. src/cmd/internal/testdir/testdir_test.go

    		pkgs := goDirPackages(t.T, longdir, singlefilepkgs)
    		// Split flags into gcflags and ldflags
    		ldflags := []string{}
    		for i, fl := range flags {
    			if fl == "-ldflags" {
    				ldflags = flags[i+1:]
    				flags = flags[0:i]
    				break
    			}
    		}
    
    		importcfgfile := importcfg(pkgs)
    
    		for i, pkg := range pkgs {
    			_, err := compileInDir(runcmd, longdir, flags, importcfgfile, pkg.name, pkg.files...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 20:08:06 UTC 2024
    - 57.5K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/test/global_test.go

    	}
    	f.Write([]byte(`
    package main
    import "fmt"
    func main() {
    	fmt.Println("hello world")
    }
    `))
    	f.Close()
    
    	// Compile source.
    	cmd := testenv.Command(t, testenv.GoToolPath(t), "build", "-gcflags", "-S", "-o", filepath.Join(dir, "test"), src)
    	out, err := cmd.CombinedOutput()
    	if err != nil {
    		t.Fatalf("could not build target: %v\n%s", err, out)
    	}
    
    	patterns := []string{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 06 18:07:35 UTC 2023
    - 2.3K bytes
    - Viewed (0)
Back to top