Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 285 for ldflag (0.12 sec)

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

    go build -gcflags=example.com/m=-N
    go version -m m$GOEXE
    stdout '^\tbuild\t-gcflags=example\.com/m=-N$'
    
    go build -ldflags=example.com/m=-w
    go version -m m$GOEXE
    stdout '^\tbuild\t-ldflags=example\.com/m=-w$'
    
    go build -trimpath
    go version -m m$GOEXE
    stdout '\tbuild\t-trimpath=true$'
    
    # gccgoflags are not added when gc is used, and vice versa.
    # TODO: test gccgo.
    go build -gccgoflags=all=UNUSED
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  2. src/cmd/go/testdata/script/gccgo_link_ldflags.txt

    # Test that #cgo LDFLAGS are properly quoted.
    # The #cgo LDFLAGS below should pass a string with spaces to -L,
    # as though searching a directory with a space in its name.
    # It should not pass --nosuchoption to the external linker.
    
    [!cgo] skip
    
    go build
    
    [!exec:gccgo] skip
    
    # TODO: remove once gccgo on builder is updated
    [GOOS:aix] [GOARCH:ppc64] skip
    
    go build -compiler gccgo
    
    -- go.mod --
    module m
    -- cgo.go --
    package main
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 06:52:47 UTC 2023
    - 499 bytes
    - Viewed (0)
  3. src/cmd/go/testdata/script/build_link_x_import_path_escape.txt

    [compiler:gccgo] skip 'gccgo does not support -ldflags -X'
    
    go build -o linkx$GOEXE -ldflags -X=my.pkg.Text=linkXworked my.pkg/main
    exec ./linkx$GOEXE
    stderr '^linkXworked$'
    
    -- go.mod --
    module my.pkg
    
    go 1.16
    -- main/main.go --
    package main
    
    import "my.pkg"
    
    func main() {
    	println(pkg.Text)
    }
    -- pkg.go --
    package pkg
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 24 21:26:10 UTC 2022
    - 341 bytes
    - Viewed (0)
  4. src/cmd/go/note_test.go

    	// This test is essentially checking that -ldflags=-buildid=XXX works,
    	// both in internal and external linking mode.
    	tg := testgo(t)
    	defer tg.cleanup()
    	tg.parallel()
    
    	tg.tempFile("hello.go", `package main; func main() { print("hello, world\n") }`)
    	const buildID = "TestNoteReading-Build-ID"
    	tg.run("build", "-ldflags", "-buildid="+buildID, "-o", tg.path("hello.exe"), tg.path("hello.go"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 20 17:26:46 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  5. src/cmd/go/go_boring_test.go

    	tg := testgo(t)
    	defer tg.cleanup()
    	tg.parallel()
    	tg.tempFile("main.go", `package main
    		import "crypto/sha1"
    		func main() {
    			sha1.New()
    		}`)
    	tg.run("build", "-ldflags=-w -extld=false", tg.path("main.go"))
    	tg.run("build", "-ldflags=-extld=false", tg.path("main.go"))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 29 14:23:22 UTC 2022
    - 544 bytes
    - Viewed (0)
  6. test/linkx_run.go

    	cmd = exec.Command("go", "run", "-ldflags=-X main.tbd", "linkx.go")
    	_, err = cmd.CombinedOutput()
    	if err == nil {
    		fmt.Println("-X linker flag should not accept keys without values")
    		os.Exit(1)
    	}
    
    	// Issue 9621
    	cmd = exec.Command("go", "run", "-ldflags=-X main.b=false -X main.x=42", "linkx.go")
    	outx, err := cmd.CombinedOutput()
    	if err == nil {
    		fmt.Println("-X linker flag should not overwrite non-strings")
    		os.Exit(1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  7. Makefile

    	@echo "Building minio binary to './minio'"
    	@CGO_ENABLED=0 go build -tags kqueue -trimpath --ldflags "$(LDFLAGS)" -o $(PWD)/minio 1>/dev/null
    
    hotfix-vars:
    	$(eval LDFLAGS := $(shell MINIO_RELEASE="RELEASE" MINIO_HOTFIX="hotfix.$(shell git rev-parse --short HEAD)" go run buildscripts/gen-ldflags.go $(shell git describe --tags --abbrev=0 | \
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 17:41:02 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  8. pkg/test/fakes/gce_metadata_server/Makefile

    TAG := 1.2
    
    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)
  9. src/cmd/go/testdata/script/cgo_long_cmd.txt

    # Issue #66456
    
    [!cgo] skip
    [GOOS:windows] skip
    [GOOS:plan9] skip
    
    # Generate a file with a very long #cgo LDFLAGS line.
    # This used to cause "go build" to fail with "argument list too long".
    go generate
    
    # Build with the generated file.
    go build
    
    -- go.mod --
    module cgolongcmd
    
    go 1.22
    -- generate.go --
    //go:build ignore
    
    package main
    
    import (
    	"fmt"
    	"log"
    	"os"
    	"bytes"
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 13 17:12:16 UTC 2024
    - 782 bytes
    - Viewed (0)
  10. src/cmd/go/testdata/script/test_ppc64_linker_funcs.txt

    # -Os option.
    #
    # Verifies golang.org/issue/52366 for linux/ppc64le
    [!GOOS:linux] skip
    [!compiler:gc] skip
    [!cgo] skip
    [!GOARCH:ppc64le] skip
    
    go build -ldflags='-linkmode=internal'
    exec ./abitest
    stdout success
    
    go build -buildmode=pie -o abitest.pie -ldflags='-linkmode=internal'
    exec ./abitest.pie
    stdout success
    
    -- go.mod --
    module abitest
    
    -- abitest.go --
    package main
    
    /*
    #cgo CFLAGS: -Os
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 19 20:54:08 UTC 2024
    - 1K bytes
    - Viewed (0)
Back to top