crosscompile

package
v1.0.0-pre.2 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: Apache-2.0 Imports: 25 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

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DebugInfoPolicy

type DebugInfoPolicy struct {
	AlwaysOmit    bool
	OmitLinkFlags []string
}

DebugInfoPolicy describes how a selected linker handles debug information. Build orchestration consumes this typed capability instead of inferring it from a target name or linker executable.

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 {}")
	DebugInfo    DebugInfoPolicy

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

func Use

func Use(goos, goarch, targetName string, wasiThreads, forceEspClang bool, level optlevel.Level, ltoMode lto.Mode, goGlobalDCE 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

func UseTarget(targetName string, level optlevel.Level, ltoMode lto.Mode) (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