Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 22 for extldflags (0.38 sec)

  1. src/cmd/go/testdata/script/build_static.txt

    stdout Hello
    
    # Some targets don't support -static
    [GOOS:darwin] skip 'no static linking on Darwin'
    [GOOS:solaris] skip 'no static linking on Solaris'
    
    # Building with -linkmode=external -extldflags=-static should work.
    go build -ldflags='-linkmode=external -extldflags=-static'
    ! stderr runtime/cgo
    exec ./hello
    stdout Hello
    
    -- go.mod --
    module hello
    
    go 1.20
    -- hello.go --
    package main
    
    import "fmt"
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 20 22:03:35 UTC 2023
    - 926 bytes
    - Viewed (0)
  2. src/cmd/go/note_test.go

    		}
    		id, err = buildid.ReadFile(tg.path("hello3.exe"))
    		if err != nil {
    			t.Fatalf("reading build ID from hello binary (linkmode=external -extldflags=-fuse-ld=gold): %v", err)
    		}
    		if id != buildID {
    			t.Fatalf("buildID in hello binary = %q, want %q (linkmode=external -extldflags=-fuse-ld=gold)", id, buildID)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 20 17:26:46 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/version_build_settings.txt

    [cgo] env CGO_CXXFLAGS=-DFROM_CXXFLAGS=1
    [cgo] env CGO_LDFLAGS=-L/extra/dir/does/not/exist
    [cgo] go build '-ldflags=all=-linkmode=external -extldflags=-L/bonus/dir/does/not/exist'
    [cgo] go version -m m$GOEXE
    [cgo] stdout '^\tbuild\t-ldflags="all=-linkmode=external -extldflags=-L/bonus/dir/does/not/exist"$'
    [cgo] stdout '^\tbuild\tCGO_ENABLED=1$'
    [cgo] stdout '^\tbuild\tCGO_CPPFLAGS=-DFROM_CPPFLAGS=1$'
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  4. pkg/test/fakes/imageregistry/Makefile

    	cd $(MD_PATH) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(BIN_NAME)-amd64 -a -tags netgo -ldflags '-w -extldflags "-static"' main.go
    
    $(MD_PATH)/$(BIN_NAME)-arm64: $(MD_PATH)/main.go
    	cd $(MD_PATH) && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o $(BIN_NAME)-arm64 -a -tags netgo -ldflags '-w -extldflags "-static"' main.go
    
    build: $(MD_PATH)/$(BIN_NAME)-amd64  $(MD_PATH)/$(BIN_NAME)-arm64
    
    build_and_push: build
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Aug 17 16:29:18 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  5. pkg/test/fakes/gce_metadata_server/Makefile

    all: build_and_push clean
    
    build_and_push:
    	cd $(MD_PATH) && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main-amd64 -a -tags netgo -ldflags '-w -extldflags "-static"' main.go
    	cd $(MD_PATH) && CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o main-arm64 -a -tags netgo -ldflags '-w -extldflags "-static"' main.go
    	docker buildx build --platform=linux/amd64,linux/arm64  $(MD_PATH) -t $(IMG):$(TAG) --push
    
    clean:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 04 22:47:52 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  6. src/cmd/go/testdata/script/version_gc_sections.txt

    [short] skip
    [!cgo] skip
    [GOOS:aix] skip  # no --gc-sections
    [GOOS:darwin] skip  # no --gc-sections
    
    go build -ldflags='-linkmode=external -extldflags=-Wl,--gc-sections'
    go version hello$GOEXE
    ! stdout 'not a Go executable'
    ! stderr 'not a Go executable'
    
    -- go.mod --
    module hello
    -- hello.go --
    package main
    
    /*
    */
    import "C"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 02 15:17:57 UTC 2023
    - 460 bytes
    - Viewed (0)
  7. samples/tcp-echo/src/Dockerfile

    # build a tcp-echo binary using the golang container
    FROM golang:1.22 as builder
    WORKDIR /go/src/istio.io/tcp-echo-server/
    COPY main.go .
    RUN CGO_ENABLED=0 GOOS=linux go build -ldflags '-extldflags -static -s -w' -o tcp-echo main.go
    
    FROM scratch
    
    WORKDIR /bin/
    COPY --from=builder /go/src/istio.io/tcp-echo-server/tcp-echo .
    ENTRYPOINT [ "/bin/tcp-echo" ]
    CMD [ "9000", "hello" ]
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Mar 16 22:03:02 UTC 2024
    - 989 bytes
    - Viewed (0)
  8. src/cmd/internal/quoted/quoted.go

    		}
    	}
    	return string(buf), nil
    }
    
    // A Flag parses a list of string arguments encoded with Join.
    // It is useful for flags like cmd/link's -extldflags.
    type Flag []string
    
    var _ flag.Value = (*Flag)(nil)
    
    func (f *Flag) Set(v string) error {
    	fs, err := Split(v)
    	if err != nil {
    		return err
    	}
    	*f = fs[:len(fs):len(fs)]
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 23 21:04:06 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  9. common/scripts/gobuild.sh

    shift
    
    set -e
    
    export BUILD_GOOS=${GOOS:-linux}
    export BUILD_GOARCH=${GOARCH:-amd64}
    GOBINARY=${GOBINARY:-go}
    GOPKG="$GOPATH/pkg"
    BUILDINFO=${BUILDINFO:-""}
    STATIC=${STATIC:-1}
    LDFLAGS=${LDFLAGS:--extldflags -static}
    GOBUILDFLAGS=${GOBUILDFLAGS:-""}
    # Split GOBUILDFLAGS by spaces into an array called GOBUILDFLAGS_ARRAY.
    IFS=' ' read -r -a GOBUILDFLAGS_ARRAY <<< "$GOBUILDFLAGS"
    
    GCFLAGS=${GCFLAGS:-}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Oct 21 14:08:46 UTC 2022
    - 2.4K bytes
    - Viewed (0)
  10. src/cmd/link/doc.go

    	-dumpdep
    		Dump symbol dependency graph.
    	-extar ar
    		Set the external archive program (default "ar").
    		Used only for -buildmode=c-archive.
    	-extld linker
    		Set the external linker (default "clang" or "gcc").
    	-extldflags flags
    		Set space-separated flags to pass to the external linker.
    	-f
    		Ignore version mismatch in the linked archives.
    	-g
    		Disable Go package data checks.
    	-importcfg file
    		Read import configuration from file.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 15 16:11:52 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top