toolchain

package
v0.0.0-...-ea27d6f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Toolchain

type Toolchain struct {
	CcTool        string
	GoTool        string
	PkgConfigTool string

	Exec *exec.Executor
}

func (*Toolchain) Asm

func (tc *Toolchain) Asm(importpath, sourceDir, objectDir, trimpath string, asmFiles []string) ([]string, error)

Asm will compile the asm files and return the objects that are generated

func (*Toolchain) CCompile

func (tc *Toolchain) CCompile(sourceDir, objectDir string, ccFiles, ccFlags []string) ([]string, error)

CCompile will compile C/CXX sources and return the object files that will be generated

func (*Toolchain) CGO

func (tc *Toolchain) CGO(sourceDir string, objectDir string, cFlags []string, cgoFiles []string) ([]string, []string, error)

CGO invokes go tool cgo to generate cgo sources in the target's object directory

func (*Toolchain) GoAsmCompile

func (tc *Toolchain) GoAsmCompile(importpath, importcfg, out, trimpath, embedCfg string, goFiles []string, asmH, symabys string) error

GoAsmCompile will compile the go sources linking to the the abi symbols generated from symabis()

func (*Toolchain) GoCompile

func (tc *Toolchain) GoCompile(sourceDir, importpath, importcfg, out, trimpath, embedCfg string, goFiles []string) error

GoCompile will compile the go sources and the generated .cgo1.go sources for the CGO files (if any)

func (*Toolchain) GoMinorVersion

func (tc *Toolchain) GoMinorVersion() (int, error)
func (tc *Toolchain) Link(archive, out, importcfg string, ldFlags []string) error

Link will link the archive into an executable

func (*Toolchain) Pack

func (tc *Toolchain) Pack(dir, archive string, objFiles []string) error

Pack will add the object files in dir to the archive

func (*Toolchain) PkgConfigCFlags

func (tc *Toolchain) PkgConfigCFlags(cfgs []string) ([]string, error)

func (*Toolchain) PkgConfigLDFlags

func (tc *Toolchain) PkgConfigLDFlags(cfgs []string) ([]string, error)

func (*Toolchain) Symabis

func (tc *Toolchain) Symabis(importpath, sourceDir, objectDir string, asmFiles []string) (string, string, error)

Symabis will generate the asm header as well as the abi symbol file for the provided asm files.

Jump to

Keyboard shortcuts

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