Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 107 for BuildMode (0.31 sec)

  1. src/cmd/link/internal/ld/config.go

    package ld
    
    import (
    	"fmt"
    	"internal/buildcfg"
    	"internal/platform"
    )
    
    // A BuildMode indicates the sort of object we are building.
    //
    // Possible build modes are the same as those for the -buildmode flag
    // in cmd/go, and are documented in 'go help buildmode'.
    type BuildMode uint8
    
    const (
    	BuildModeUnset BuildMode = iota
    	BuildModeExe
    	BuildModePIE
    	BuildModeCArchive
    	BuildModeCShared
    	BuildModeShared
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 23 05:14:11 UTC 2023
    - 5.6K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testplugin/plugin_test.go

    		log.Panic(err)
    	}
    	prettyPrintf("cp plugin2.so plugin2-dup.so\n")
    
    	goCmd(nil, "build", "-buildmode=plugin", "-o=sub/plugin1.so", "./sub/plugin1")
    	goCmd(nil, "build", "-buildmode=plugin", "-o=unnamed1.so", "./unnamed1/main.go")
    	goCmd(nil, "build", "-buildmode=plugin", "-o=unnamed2.so", "./unnamed2/main.go")
    	goCmd(nil, "build", "-o", "host.exe", "./host")
    
    	return m.Run()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:32:53 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/build_exe.txt

    # go build with -o and -buildmode=exe should report an error on a non-main package.
    
    ! go build -buildmode=exe -o out$GOEXE ./not_main
    stderr '-buildmode=exe requires exactly one main package'
    ! exists out$GOEXE
    ! go build -buildmode=exe -o out$GOEXE ./main_one ./main_two
    stderr '-buildmode=exe requires exactly one main package'
    ! exists out$GOEXE
    
    -- go.mod --
    module m
    
    go 1.16
    -- not_main/not_main.go --
    package not_main
    
    func F() {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 17 13:25:29 UTC 2020
    - 551 bytes
    - Viewed (0)
  4. src/cmd/go/testdata/script/build_pie_race.txt

    # go build -buildmode=pie -race main.go on Darwin should work without errors
    
    [!race] skip 'test requires race detector support'
    
    [!GOOS:darwin] ! go build -buildmode=pie -race
    [!GOOS:darwin] stderr '^-buildmode=pie not supported when -race is enabled on '$GOOS'/'$GOARCH'$'
    [!GOOS:darwin] stop 'not testing -buildmode=pie -race on platform that does not support it'
    
    go build -buildmode=pie -race bytes
    ! stderr .
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 19:13:34 UTC 2023
    - 672 bytes
    - Viewed (0)
  5. src/cmd/go/testdata/script/build_plugin_reproducible.txt

    [!buildmode:plugin] skip
    [short] skip
    [!cgo] skip '-buildmode=plugin requires external linking'
    
    go build -trimpath -buildvcs=false -buildmode=plugin -o a.so main.go
    go build -trimpath -buildvcs=false -buildmode=plugin -o b.so main.go
    cmp -q a.so b.so
    
    -- main.go --
    package main
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 19:07:03 UTC 2024
    - 296 bytes
    - Viewed (0)
  6. src/cmd/go/testdata/script/version.txt

    [!buildmode:pie] stop
    [pielinkext] [!cgo] stop
    go build -buildmode=pie -o external.exe rsc.io/fortune
    go version external.exe
    stdout '^external.exe: .+'
    go version -m external.exe
    stdout -buildmode=pie
    stdout '^\tpath\trsc.io/fortune'
    stdout '^\tmod\trsc.io/fortune\tv1.0.0'
    
    # Also test PIE with internal linking.
    [pielinkext] stop
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 05 14:52:04 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. src/debug/buildinfo/buildinfo_test.go

    	}
    
    	// Keep in sync with src/cmd/go/internal/work/init.go:buildModeInit.
    	badmode := func(goos, goarch, buildmode string) string {
    		return fmt.Sprintf("-buildmode=%s not supported on %s/%s", buildmode, goos, goarch)
    	}
    
    	buildWithModules := func(t *testing.T, goos, goarch, buildmode string) string {
    		dir := t.TempDir()
    		gomodPath := filepath.Join(dir, "go.mod")
    		gomodData := []byte("module example.com/m\ngo 1.18\n")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 22 16:22:42 UTC 2023
    - 11.2K bytes
    - Viewed (0)
  8. src/cmd/link/internal/ld/target.go

    	LinkMode  LinkMode
    	BuildMode BuildMode
    
    	linkShared    bool
    	canUsePlugins bool
    	IsELF         bool
    }
    
    //
    // Target type functions
    //
    
    func (t *Target) IsExe() bool {
    	return t.BuildMode == BuildModeExe
    }
    
    func (t *Target) IsShared() bool {
    	return t.BuildMode == BuildModeShared
    }
    
    func (t *Target) IsPlugin() bool {
    	return t.BuildMode == BuildModePlugin
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 13 21:14:48 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  9. src/cmd/go/testdata/script/build_plugin_non_main.txt

    # Plugins are not supported on all platforms.
    [!buildmode:plugin] skip
    
    go build -n testdep
    ! go build -buildmode=plugin testdep
    stderr '-buildmode=plugin requires exactly one main package'
    
    -- go.mod --
    module testdep
    
    go 1.16
    -- testdep.go --
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 12 15:28:43 UTC 2020
    - 255 bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/testshared/shared_test.go

    	globalSkip(t)
    	goCmd(t, "install", "-buildmode=shared", "-linkshared", "./depBase")
    	goCmd(t, "install", "-buildmode=shared", "-linkshared", "./dep2")
    	goCmd(t, "install", "-linkshared", "./exe2")
    	run(t, "executable linked to GOPATH library", "../../bin/exe2")
    }
    
    func TestThreeGopathShlibs(t *testing.T) {
    	globalSkip(t)
    	goCmd(t, "install", "-buildmode=shared", "-linkshared", "./depBase")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Aug 26 01:54:41 UTC 2023
    - 36.3K bytes
    - Viewed (0)
Back to top