Documentation
¶
Overview ¶
Package goflags parses Go-compatible build flag syntax into typed LLGo configuration. It is shared by command entry points and non-command build drivers; internal/build consumes only the typed result.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyBuildFlags ¶
ApplyBuildFlags validates and appends normalized Go build flags, and maps the supported compiler and linker semantics into typed build configuration. Configuration remains unchanged on error.
func ParseFlagFile ¶
ParseFlagFile parses a flags.txt-style file. Blank lines and full-line comments are ignored. A line beginning with a Go flag whose value is itself an argument list is kept intact, so unquoted values such as "-ldflags=-s -w=false" work. Other lines accept shell-style whitespace, quoting, and backslash escaping and may contain multiple flags.
Types ¶
type ParsedLinkFlags ¶
type ParsedLinkFlags struct {
Options build.LinkOptions
Ignored []string
Present bool
}
ParsedLinkFlags contains the Go linker options that LLGo currently handles. Ignored retains the remaining linker arguments so their order is available as support is added incrementally.
func ParseLinkFlags ¶
func ParseLinkFlags(buildFlags []string) (ParsedLinkFlags, error)
ParseLinkFlags extracts the currently supported flags from normalized Go build flags. Repeated -ldflags values are evaluated in command-line order; each applicable value replaces the previous complete argument list.