Documentation
¶
Index ¶
- Constants
- Variables
- func AddBuildFlags(fs *flag.FlagSet)
- func AddBuildModeFlags(fs *flag.FlagSet)
- func AddBuildTraceFlag(fs *flag.FlagSet)
- func AddCmpTestFlags(fs *flag.FlagSet)
- func AddCommonFlags(fs *flag.FlagSet)
- func AddCompilerVerboseFlag(fs *flag.FlagSet)
- func AddCoverageFlags(fs *flag.FlagSet)
- func AddDirectoryFlag(fs *flag.FlagSet)
- func AddEmbeddedFlags(fs *flag.FlagSet)
- func AddEmulatorFlags(fs *flag.FlagSet)
- func AddExecFlag(fs *flag.FlagSet) *[]string
- func AddGlobalDCEFlag(fs *flag.FlagSet)
- func AddLTOFlag(fs *flag.FlagSet)
- func AddOptLevelFlags(fs *flag.FlagSet)
- func AddOutputFlags(fs *flag.FlagSet)
- func AddSizeFlags(fs *flag.FlagSet)
- func AddTargetFlag(fs *flag.FlagSet)
- func AddTestBinaryFlags(fs *flag.FlagSet)
- func AddTestFlags(fs *flag.FlagSet)
- func ApplyGoBuildFlags(conf *build.Config, args []string) error
- func CaptureGoBuildFlags(cmd *base.Command) *base.PassArgs
- func ChangeDirectory(args []string) ([]string, error)
- func FinalizeNativeFlags(command string, fs *flag.FlagSet)
- func Parse(fs *flag.FlagSet, args []string) error
- func ParseAfterDirectory(fs *flag.FlagSet, args []string) error
- func ResolveLTOMode(defaultValue lto.Mode) lto.Mode
- func UpdateBuildConfig(conf *build.Config) error
- func UpdateConfig(conf *build.Config) error
- func ValidateMemProfileRate(value string) error
Constants ¶
const DefaultTestTimeout = "10m" // Matches Go's default test timeout
Variables ¶
var ( Cover bool CoverMode string CoverPkg string )
Coverage flags are shared by build and test. Profiles remain test-only; covered applications write Go's binary coverage data through GOCOVERDIR.
var ( TestRun string TestBench string TestTimeout string TestShort bool TestCount int TestCoverProfile string TestParallel int TestFailfast bool TestJSON bool TestList string TestSkip string TestShuffle string TestFullpath bool TestBenchmem bool TestBenchtime string TestCPUProfile string TestMemProfile string TestMemProfileRate int TestOutputDir string TestPaniconexit0 bool TestTestLogFile string TestGoCoverDir string TestArtifacts bool )
Test binary flags
var BaudRate int
var BuildMode string
var BuildTrace string
var CheckLLFiles bool
var CheckLinkArgs bool
var CompileOnly bool
var CompilerVerbose bool
var DeadcodeDrop bool
var DebugArtifact debugArtifactFlag
var Emulator bool
var ForceEspClang bool
var ForceRebuild bool
var Gen bool
var GenLLFiles bool
var GoGlobalDCE *bool
var LTO ltoFlag
var LTOPluginPath string
var OptLevel optlevel.Level
var OutBin bool
var OutHex bool
var OutImg bool
var OutUf2 bool
var OutZip bool
var OutputFile string
var PCLN pclnFlag
var Port string
var PrintCommands bool
var PthreadStackSize byteSizeFlag
var SizeFormat string
var SizeLevel string
var SizeReport bool
var Tags string
var Target string
var Verbose bool
Functions ¶
func AddBuildFlags ¶
func AddBuildModeFlags ¶
func AddBuildTraceFlag ¶
AddBuildTraceFlag adds the build-scheduler trace flag. It is intentionally separate from AddBuildFlags for commands that execute one traced build invocation, currently "llgo build" and "llgo test".
func AddCmpTestFlags ¶
func AddCommonFlags ¶
func AddCompilerVerboseFlag ¶
func AddCoverageFlags ¶ added in v1.0.5
func AddDirectoryFlag ¶ added in v1.0.7
AddDirectoryFlag documents -C. ChangeDirectory consumes it before parsing, because all relative paths (including GOFLAGS paths) use the new directory.
func AddEmbeddedFlags ¶
func AddEmulatorFlags ¶
func AddExecFlag ¶ added in v1.0.7
AddExecFlag uses the Go command's quoted-word syntax. Wrappers are invoked directly with the linked artifact followed by program arguments, without a shell or target-template substitution.
func AddGlobalDCEFlag ¶
func AddLTOFlag ¶
func AddOptLevelFlags ¶
func AddOutputFlags ¶
func AddSizeFlags ¶ added in v1.0.7
AddSizeFlags adds artifact size reports for llgo build.
func AddTargetFlag ¶ added in v1.0.7
func AddTestBinaryFlags ¶
func AddTestFlags ¶
func ApplyGoBuildFlags ¶
ApplyGoBuildFlags validates and appends normalized Go build flags captured by the command layer, and stores supported compiler and linker semantics in typed backend configuration. Configuration remains unchanged on error.
func CaptureGoBuildFlags ¶
CaptureGoBuildFlags registers the Go build flags that LLGo forwards to go/packages and returns their command-local collector. LLGo-native flags are registered separately by AddBuildFlags.
func ChangeDirectory ¶ added in v1.0.7
ChangeDirectory applies only a leading -C; later occurrences are diagnosed by the flag parser instead of changing the meaning of earlier options.
func FinalizeNativeFlags ¶ added in v1.0.7
FinalizeNativeFlags recognizes the remaining public Go controls as explicit rejections. This also catches them after package operands in llgo test, before an unknown flag can accidentally become a package-loader argument.
func Parse ¶ added in v1.0.7
Parse applies Go's environment defaults before explicit command flags. A separate parse keeps a GOFLAGS value from consuming a command-line operand. In particular, unsupported backend controls cannot bypass validation through GOFLAGS or a persistent GOENV file.
func ParseAfterDirectory ¶ added in v1.0.7
func UpdateBuildConfig ¶
func UpdateConfig ¶
func ValidateMemProfileRate ¶ added in v1.0.7
ValidateMemProfileRate accepts the full-allocation mode implemented by LLGo. Size-class counters do not implement Go's probabilistic sampling intervals.
Types ¶
This section is empty.