flags

package
v1.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2026 License: Apache-2.0 Imports: 17 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const DefaultTestTimeout = "10m" // Matches Go's default test timeout

Variables

View Source
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.

View Source
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

View Source
var BaudRate int
View Source
var BuildMode string
View Source
var BuildTrace string
View Source
var CheckLLFiles bool
View Source
var CheckLinkArgs bool
View Source
var CompileOnly bool
View Source
var CompilerVerbose bool
View Source
var DeadcodeDrop bool
View Source
var DebugArtifact debugArtifactFlag
View Source
var Emulator bool
View Source
var ForceEspClang bool
View Source
var ForceRebuild bool
View Source
var Gen bool
View Source
var GenLLFiles bool
View Source
var GoGlobalDCE *bool
View Source
var LTO ltoFlag
View Source
var LTOPluginPath string
View Source
var OptLevel optlevel.Level
View Source
var OutBin bool
View Source
var OutHex bool
View Source
var OutImg bool
View Source
var OutUf2 bool
View Source
var OutZip bool
View Source
var OutputFile string
View Source
var PCLN pclnFlag
View Source
var Port string
View Source
var PrintCommands bool
View Source
var PthreadStackSize byteSizeFlag
View Source
var SizeFormat string
View Source
var SizeLevel string
View Source
var SizeReport bool
View Source
var Tags string
View Source
var Target string
View Source
var Verbose bool
View Source
var WasmStrip string

Functions

func AddBuildFlags

func AddBuildFlags(fs *flag.FlagSet)

func AddBuildModeFlags

func AddBuildModeFlags(fs *flag.FlagSet)

func AddBuildTraceFlag

func AddBuildTraceFlag(fs *flag.FlagSet)

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 AddCmpTestFlags(fs *flag.FlagSet)

func AddCommonFlags

func AddCommonFlags(fs *flag.FlagSet)

func AddCompilerVerboseFlag

func AddCompilerVerboseFlag(fs *flag.FlagSet)

func AddCoverageFlags added in v1.0.5

func AddCoverageFlags(fs *flag.FlagSet)

func AddDirectoryFlag added in v1.0.7

func AddDirectoryFlag(fs *flag.FlagSet)

AddDirectoryFlag documents -C. ChangeDirectory consumes it before parsing, because all relative paths (including GOFLAGS paths) use the new directory.

func AddEmbeddedFlags

func AddEmbeddedFlags(fs *flag.FlagSet)

func AddEmulatorFlags

func AddEmulatorFlags(fs *flag.FlagSet)

func AddExecFlag added in v1.0.7

func AddExecFlag(fs *flag.FlagSet) *[]string

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 AddGlobalDCEFlag(fs *flag.FlagSet)

func AddLTOFlag

func AddLTOFlag(fs *flag.FlagSet)

func AddOptLevelFlags

func AddOptLevelFlags(fs *flag.FlagSet)

func AddOutputFlags

func AddOutputFlags(fs *flag.FlagSet)

func AddSizeFlags added in v1.0.7

func AddSizeFlags(fs *flag.FlagSet)

AddSizeFlags adds artifact size reports for llgo build.

func AddTargetFlag added in v1.0.7

func AddTargetFlag(fs *flag.FlagSet)

func AddTestBinaryFlags

func AddTestBinaryFlags(fs *flag.FlagSet)

func AddTestFlags

func AddTestFlags(fs *flag.FlagSet)

func ApplyGoBuildFlags

func ApplyGoBuildFlags(conf *build.Config, args []string) error

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

func CaptureGoBuildFlags(cmd *base.Command) *base.PassArgs

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

func ChangeDirectory(args []string) ([]string, error)

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

func FinalizeNativeFlags(command string, fs *flag.FlagSet)

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

func Parse(fs *flag.FlagSet, args []string) error

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 ParseAfterDirectory(fs *flag.FlagSet, args []string) error

func ResolveLTOMode

func ResolveLTOMode(defaultValue lto.Mode) lto.Mode

func UpdateBuildConfig

func UpdateBuildConfig(conf *build.Config) error

func UpdateConfig

func UpdateConfig(conf *build.Config) error

func ValidateMemProfileRate added in v1.0.7

func ValidateMemProfileRate(value string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL