c

package
v0.3.5 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Sysroot

func Sysroot(targetOS, targetArch string) (module.Version, bool)

Sysroot returns the fixed compatibility sysroot Formula for a built-in C target.

Types

type Config

type Config struct {
	Matrix    string
	Toolchain Toolchain
	Sysroot   string
}

Config contains the facts required to prepare a C target.

type Target

type Target struct {
	// contains filtered or unexported fields
}

Target contains prepared C command defaults for one build target.

func NewTarget

func NewTarget(config Config) (*Target, error)

NewTarget prepares C command defaults from config.

func (*Target) Close

func (c *Target) Close() error

Close removes generated build-system configuration.

func (*Target) Use

func (c *Target) Use(cmd build.Command) build.Patch

Use returns C target defaults for cmd. Explicit Formula settings are preserved.

type Toolchain

type Toolchain struct {
	// contains filtered or unexported fields
}

Toolchain contains prepared C-family commands.

func NewToolchain

func NewToolchain(cc, cxx, linker []string, archiver, ranlib, nm, strip string) Toolchain

NewToolchain creates a Toolchain from prepared target commands.

func (Toolchain) Archiver

func (t Toolchain) Archiver() string

func (Toolchain) CC

func (t Toolchain) CC() []string

func (Toolchain) CXX

func (t Toolchain) CXX() []string

func (Toolchain) Linker

func (t Toolchain) Linker() []string

func (Toolchain) NM

func (t Toolchain) NM() string

func (Toolchain) Ranlib

func (t Toolchain) Ranlib() string

func (Toolchain) Strip

func (t Toolchain) Strip() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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