Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for CanInternalLink (0.31 sec)

  1. src/internal/testenv/testenv.go

    // MustHaveCGO calls t.Skip if cgo is not available.
    func MustHaveCGO(t testing.TB) {
    	if !HasCGO() {
    		t.Skipf("skipping test: no cgo")
    	}
    }
    
    // CanInternalLink reports whether the current system can link programs with
    // internal linking.
    func CanInternalLink(withCgo bool) bool {
    	return !platform.MustLinkExternal(runtime.GOOS, runtime.GOARCH, withCgo)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:41:38 UTC 2024
    - 15.7K bytes
    - Viewed (0)
  2. src/cmd/link/link_test.go

    		}
    		if string(out) != "hello\n" && string(out) != "hello\r\n" {
    			t.Errorf("unexpected output (%s):\n%s", mode, out)
    		}
    
    		// Test internal linking mode.
    
    		if !testenv.CanInternalLink(true) {
    			continue
    		}
    		cmd = testenv.Command(t, testenv.GoToolPath(t), "build", "-buildmode="+mode, "-ldflags=-debugtramp=2 -linkmode=internal", "-o", exe, src)
    		out, err = cmd.CombinedOutput()
    		if err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 20:26:02 UTC 2024
    - 43.5K bytes
    - Viewed (0)
Back to top