llvm

package
v1.0.0-pre.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 12 Imported by: 1 module, 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

View Source
const (
	// CrosscompileClangPath is the relative path from LLGO_ROOT to the clang installation
	CrosscompileClangPath = "crosscompile/clang"
)

Variables

This section is empty.

Functions

func SetupPath

func SetupPath()

SetupPath makes the selected LLVM installation part of the process environment. Command entry points call it before starting builds; build requests and workers then inherit LLVM through the ordinary PATH snapshot.

Types

type Env

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

Env represents an LLVM installation.

func New

func New(llvmConfigBin string) *Env

New creates a new Env instance.

func (*Env) BinDir

func (e *Env) BinDir() string

BinDir returns the directory containing LLVM executables. An empty string means LLVM executables are assumed to be in PATH.

func (*Env) Clang

func (e *Env) Clang() *clang.Cmd

Clang returns a new clang.Cmd instance.

func (*Env) FileCheck

func (e *Env) FileCheck(args ...string) (*exec.Cmd, error)

FileCheck returns a command to execute LLVM FileCheck with given arguments.

func (*Env) InstallNameTool

func (e *Env) InstallNameTool() *install_name_tool.Cmd
func (e *Env) Link() *llvmlink.Cmd

Link returns a new llvmlink.Cmd instance.

func (*Env) Nm

func (e *Env) Nm() *nm.Cmd

Nm returns a new nm.Cmd instance.

func (*Env) Readelf

func (e *Env) Readelf(args ...string) (*exec.Cmd, error)

Readelf returns a command to execute llvm-readelf with given arguments.

Jump to

Keyboard shortcuts

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