crosscompile

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Export

type Export struct {
	CC      string // Compiler to use
	CCFLAGS []string
	CFLAGS  []string
	LDFLAGS []string

	// Additional fields from target configuration
	BuildTags    []string
	GOOS         string
	GOARCH       string
	Libc         string
	Linker       string   // Linker to use (e.g., "ld.lld", "avr-ld")
	ExtraFiles   []string // Extra files to compile and link (e.g., .s, .c files)
	ClangRoot    string   // Root directory of custom clang installation
	ClangBinPath string   // Path to clang binary directory

	LLVMTarget   string // LLVM Target
	TargetABI    string // RISC-V Target ABI (e.g., "lp64", "lp64d")
	BinaryFormat string // Binary format (e.g., "elf", "esp", "uf2")
	FormatDetail string // For uf2, it's uf2FamilyID
	Emulator     string // Emulator command template (e.g., "qemu-system-arm -M {} -kernel {}")

	// Flashing/Debugging configuration
	Device flash.Device // Device configuration for flashing/debugging
}

func Use added in v0.11.6

func Use(goos, goarch, targetName string, wasiThreads, forceEspClang bool) (export Export, err error)

Use extends the original Use function to support target-based configuration If targetName is provided, it takes precedence over goos/goarch

func UseTarget added in v0.11.6

func UseTarget(targetName string) (export Export, err error)

UseTarget loads configuration from a target name (e.g., "rp2040", "wasi")

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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