Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cmd ¶
type Cmd struct {
Dir string
Env []string
Verbose bool
Stdin io.Reader
Stdout io.Writer
Stderr io.Writer
// contains filtered or unexported fields
}
Cmd represents a clang command with environment and configuration support.
func NewCXXCompiler ¶ added in v1.0.1
NewCXXCompiler creates a C++ compiler command with proper flag merging.
func NewCompiler ¶
NewCompiler creates a compiler command with proper flag merging.
func (*Cmd) CheckLinkArgs ¶
CheckLinkArgs validates linking arguments by attempting a test compile.
func (*Cmd) CompileArguments ¶ added in v1.0.7
CompileArguments returns the effective driver arguments without executing the compiler, including the command prefix and environment flags.
func (*Cmd) LinkArguments ¶ added in v1.0.5
LinkArguments returns the effective driver arguments, including its command prefix and environment flags, without executing the linker. Inspecting these arguments preserves explicit user options when selecting linker defaults.
type Config ¶
type Config struct {
CC string // Compiler to use (e.g., "clang", "clang++")
CCArgs []string // Arguments that are part of the CC command
CXX string // C++ compiler to use
CXXArgs []string // Arguments that are part of the CXX command
CCFLAGS []string // Compiler flags for C/C++ compilation
CFLAGS []string // C-specific flags
LDFLAGS []string // Linker flags
Linker string // Linker to use (e.g., "ld.lld", "avr-ld")
LinkerArgs []string // Arguments that are part of the linker command
ResponseFileStyle ResponseFileStyle
}
Config represents clang configuration parameters.
type ResponseFileStyle ¶ added in v1.0.1
type ResponseFileStyle uint8
ResponseFileStyle identifies the tokenizer used by a compiler or linker. Clang's GNU driver uses GNU tokenization even on Windows, while clang-cl, lld-link, link.exe, and cl.exe use Windows command-line tokenization.
const ( ResponseFileAuto ResponseFileStyle = iota ResponseFileGNU ResponseFileWindows )