Documentation
¶
Index ¶
- Variables
- func NewPkgCache(ctx context.Context, dir string, writable bool) *pkgCache
- func NewSetupArgs(repaire, installPorts bool) *setupArgs
- type CCache
- type Celer
- func (c *Celer) BuildType() string
- func (c *Celer) CCacheEnabled() bool
- func (c *Celer) CloneConf(url, branch string, force bool) error
- func (c *Celer) CreatePlatform(platformName string) error
- func (c *Celer) CreatePort(nameVersion string) error
- func (c *Celer) CreateProject(projectName string) error
- func (c *Celer) Deploy(force bool) error
- func (c *Celer) Downloads() string
- func (c *Celer) ExprVars() *context.ExprVars
- func (c *Celer) GenerateToolchainFile() error
- func (c *Celer) Init() error
- func (c *Celer) InitWithPlatform(platform string) error
- func (c *Celer) InstalledDevDir() string
- func (c *Celer) InstalledDir() string
- func (c *Celer) Jobs() int
- func (c *Celer) Offline() bool
- func (c *Celer) PkgCache() context.PkgCache
- func (c *Celer) Platform() context.Platform
- func (c *Celer) Project() context.Project
- func (c *Celer) ProxyHostPort() (host string, port int)
- func (c *Celer) PythonConfig() context.PythonConfig
- func (c *Celer) RootFS() context.RootFS
- func (c *Celer) SetBuildType(buildtype string) error
- func (c *Celer) SetCCacheDir(dir string) error
- func (c *Celer) SetCCacheEnabled(enabled bool) error
- func (c *Celer) SetCCacheMaxSize(maxSize string) error
- func (c *Celer) SetCCacheRemoteOnly(remoteOnly bool) error
- func (c *Celer) SetCCacheRemoteStorage(remoteStorage string) error
- func (c *Celer) SetDownloads(downloads string) error
- func (c *Celer) SetJobs(jobs int) error
- func (c *Celer) SetOffline(offline bool) error
- func (c *Celer) SetPkgCacheDir(dir string) error
- func (c *Celer) SetPkgCacheWritable(writable bool) error
- func (c *Celer) SetPlatform(platformName string) error
- func (c *Celer) SetProject(projectName string) error
- func (c *Celer) SetProxyHost(host string) error
- func (c *Celer) SetProxyPort(port int) error
- func (c *Celer) SetVerbose(vebose bool) error
- func (c *Celer) Verbose() bool
- func (c *Celer) Version() string
- type InstallOptions
- type Package
- type Platform
- func (p Platform) GetHostName() string
- func (p Platform) GetName() string
- func (p Platform) GetRootFS() context.RootFS
- func (p Platform) GetToolchain() context.Toolchain
- func (p *Platform) Init(platformName string) error
- func (p *Platform) Setup() error
- func (p *Platform) Write(platformPath string) error
- type Port
- func (p Port) CheckHostSupported(nameVersion string) bool
- func (p Port) Clone() error
- func (p Port) GenBuildToolsVersions(tools []string) (string, error)
- func (c Port) GenPlatformTomlString() (string, error)
- func (p Port) GenPortTomlString(nameVersion string, devDep bool) (string, error)
- func (p Port) GetBuildConfig(nameVersion string, devDep bool) (*pkgcache.BuildConfig, error)
- func (p Port) GetCommitHash(nameVersion string, devDep bool) (string, error)
- func (p *Port) Init(ctx context.Context, nameVersion string) error
- func (p *Port) Install(options InstallOptions) (installedFrom string, retErr error)
- func (p *Port) InstallFromPackage(options InstallOptions) (bool, error)
- func (p *Port) InstallFromPackageCache(options InstallOptions) (bool, error)
- func (p *Port) InstallFromSource(options InstallOptions) error
- func (p Port) Installed() (bool, error)
- func (p Port) IsHostSupported() bool
- func (p Port) NameVersion() string
- func (p Port) PackageFiles(packageDir, platformName, projectName string) ([]string, error)
- func (p Port) Remove(options RemoveOptions) error
- func (p Port) RemoveLogs() error
- func (p Port) Write(portPath string) error
- type Project
- type Proxy
- type Python
- type RemoveOptions
- type RootFS
- func (r *RootFS) CheckAndRepair() error
- func (r RootFS) Generate(toolchain *strings.Builder) error
- func (r RootFS) GetAbsDir() string
- func (r RootFS) GetIncludeDirs() []string
- func (r RootFS) GetLibDirs() []string
- func (r RootFS) GetPkgConfigPath() []string
- func (r RootFS) GetSHA256() string
- func (r *RootFS) Validate() error
- type SetupArgs
- type Toolchain
- func (t *Toolchain) CheckAndRepair(silent bool) error
- func (t Toolchain) ClearEnvs()
- func (t *Toolchain) Detect(platformName string) error
- func (t Toolchain) GetADDR2LINE() string
- func (t Toolchain) GetAR() string
- func (t Toolchain) GetAS() string
- func (t Toolchain) GetAbsDir() string
- func (t Toolchain) GetCC() string
- func (t Toolchain) GetCFlags() []string
- func (t Toolchain) GetCPP() string
- func (t Toolchain) GetCStandard() string
- func (t Toolchain) GetCXX() string
- func (t Toolchain) GetCXXFILT() string
- func (t Toolchain) GetCXXFlags() []string
- func (t Toolchain) GetCXXStandard() string
- func (t Toolchain) GetCrosstoolPrefix() string
- func (t Toolchain) GetCrosstoolPrefixPath() string
- func (t Toolchain) GetFC() string
- func (t Toolchain) GetGCOV() string
- func (t Toolchain) GetHost() string
- func (t Toolchain) GetLD() string
- func (t Toolchain) GetLinkFlags() []string
- func (t Toolchain) GetMSVC() *context.MSVC
- func (t Toolchain) GetNM() string
- func (t Toolchain) GetName() string
- func (t Toolchain) GetOBJCOPY() string
- func (t Toolchain) GetOBJDUMP() string
- func (t Toolchain) GetRANLIB() string
- func (t Toolchain) GetREADELF() string
- func (t Toolchain) GetRootDir() string
- func (t Toolchain) GetSHA256() string
- func (t Toolchain) GetSIZE() string
- func (t Toolchain) GetSTRINGS() string
- func (t Toolchain) GetSTRIP() string
- func (t Toolchain) GetSystemName() string
- func (t Toolchain) GetSystemProcessor() string
- func (t Toolchain) GetVersion() string
- func (t Toolchain) SetEnvs(rootfs context.RootFS, buildsystem string)
- func (t *Toolchain) Validate() error
- type WindowsKit
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "v0.0.0" // It would be set by build script.
Functions ¶
func NewSetupArgs ¶
func NewSetupArgs(repaire, installPorts bool) *setupArgs
Types ¶
type CCache ¶
type CCache struct {
Enabled bool `toml:"enabled"` // ENV: CCACHE_ENABLED
MaxSize string `toml:"maxsize"` // ENV: CCACHE_MAXSIZE
Dir string `toml:"dir"` // ENV: CCACHE_DIR
RemoteStorage string `toml:"remote_storage,omitempty"` // ENV: CCACHE_REMOTE_STORAGE
RemoteOnly bool `toml:"remote_only,omitempty"` // ENV: CCACHE_REMOTE_ONLY
}
type Celer ¶
type Celer struct {
// contains filtered or unexported fields
}
func (*Celer) CCacheEnabled ¶
func (*Celer) CreatePlatform ¶
func (*Celer) CreatePort ¶
func (*Celer) CreateProject ¶
func (*Celer) GenerateToolchainFile ¶
func (*Celer) InitWithPlatform ¶
InitWithPlatform initializes celer with platform.
func (*Celer) InstalledDevDir ¶
func (*Celer) InstalledDir ¶
func (*Celer) ProxyHostPort ¶
func (*Celer) PythonConfig ¶ added in v0.2.0
func (c *Celer) PythonConfig() context.PythonConfig
func (*Celer) SetBuildType ¶
func (*Celer) SetCCacheDir ¶
func (*Celer) SetCCacheEnabled ¶
func (*Celer) SetCCacheMaxSize ¶
func (*Celer) SetCCacheRemoteOnly ¶
func (*Celer) SetCCacheRemoteStorage ¶
func (*Celer) SetDownloads ¶
func (*Celer) SetOffline ¶
func (*Celer) SetPkgCacheDir ¶
func (*Celer) SetPkgCacheWritable ¶
func (*Celer) SetPlatform ¶
func (*Celer) SetProject ¶
func (*Celer) SetProxyHost ¶
func (*Celer) SetProxyPort ¶
func (*Celer) SetVerbose ¶
type InstallOptions ¶
type Package ¶
type Package struct {
Url string `toml:"url"`
Ref string `toml:"ref"`
Checksum string `toml:"checksum,omitempty"`
CacheRepo bool `toml:"cache_repo,omitempty"`
Depth int `toml:"depth,omitempty"`
Archive string `toml:"archive,omitempty"`
SrcDir string `toml:"src_dir,omitempty"`
IgnoreSubmodule bool `toml:"ignore_submodule,omitempty"`
BuildTool bool `toml:"build_tool,omitempty"`
}
type Platform ¶
type Platform struct {
Toolchain *Toolchain `toml:"toolchain"`
WindowsKit *WindowsKit `toml:"windows_kit"`
RootFS *RootFS `toml:"rootfs"`
// Internal fields.
Name string `toml:"-"`
// contains filtered or unexported fields
}
func (Platform) GetHostName ¶
func (Platform) GetToolchain ¶
type Port ¶
type Port struct {
Package Package `toml:"package"`
BuildConfigs []buildsystems.BuildConfig `toml:"build_configs"`
// Internal fields.
Name string `toml:"-"`
Version string `toml:"-"`
Parent string `toml:"-"`
DevDep bool `toml:"-"` // Whether the port is a dev_dependences.
HostDep bool `toml:"-"` // Whether the port is a dependencies of a dev_dependencies.
MatchedConfig *buildsystems.BuildConfig `toml:"-"`
PackageDir string `toml:"-"`
InstalledDir string `toml:"-"`
// contains filtered or unexported fields
}
func (Port) CheckHostSupported ¶
CheckHostSupported Host supported means that the port can be built natively.
func (Port) GenBuildToolsVersions ¶
func (Port) GenPlatformTomlString ¶
func (Port) GenPortTomlString ¶
func (Port) GetBuildConfig ¶
func (Port) GetCommitHash ¶
func (*Port) Install ¶
func (p *Port) Install(options InstallOptions) (installedFrom string, retErr error)
Install install a port and tell me where it was installed from.
func (*Port) InstallFromPackage ¶
func (p *Port) InstallFromPackage(options InstallOptions) (bool, error)
func (*Port) InstallFromPackageCache ¶
func (p *Port) InstallFromPackageCache(options InstallOptions) (bool, error)
func (*Port) InstallFromSource ¶
func (p *Port) InstallFromSource(options InstallOptions) error
func (Port) IsHostSupported ¶
func (Port) NameVersion ¶
func (Port) PackageFiles ¶
func (Port) Remove ¶
func (p Port) Remove(options RemoveOptions) error
func (Port) RemoveLogs ¶
type Project ¶
type Project struct {
TargetPlatform string `toml:"target_platform,omitempty"`
BuildType string `toml:"build_type"`
IncludeDirs []string `toml:"include_dirs,omitempty"`
LibDirs []string `toml:"lib_dirs,omitempty"`
Ports []string `toml:"ports"`
Vars []string `toml:"vars"`
Envs []string `toml:"envs"`
Macros []string `toml:"macros"`
// Internal fields.
Name string `toml:"-"`
// contains filtered or unexported fields
}
func (Project) GetTargetPlatform ¶
type Python ¶ added in v0.2.0
type Python struct {
Version string `toml:"version,omitempty"`
IndexUrl string `toml:"index_url,omitempty"`
ExtraIndexUrls []string `toml:"extra_index_urls,omitempty"`
TrustedHosts []string `toml:"trusted_hosts,omitempty"`
}
func (*Python) GetExtraIndexUrls ¶ added in v0.2.0
func (*Python) GetIndexUrl ¶ added in v0.2.0
func (*Python) GetTrustedHosts ¶ added in v0.2.0
func (*Python) GetVersion ¶ added in v0.2.0
type RemoveOptions ¶
type RootFS ¶
type RootFS struct {
Url string `toml:"url"` // Download url.
SHA256 string `toml:"sha256"` // SHA256 of the toolchain archive, used for verification and caching.
Archive string `toml:"archive,omitempty"` // Archive can be changed to avoid conflict.
Path string `toml:"path"` // Runtime path of tool, it's relative path and would be converted to absolute path later.
PkgConfigPath []string `toml:"pkg_config_path"`
IncludeDirs []string `toml:"include_dirs"`
LibDirs []string `toml:"lib_dirs"`
// contains filtered or unexported fields
}
func (*RootFS) CheckAndRepair ¶
func (RootFS) GetIncludeDirs ¶
func (RootFS) GetLibDirs ¶
func (RootFS) GetPkgConfigPath ¶
type Toolchain ¶
type Toolchain struct {
Url string `toml:"url"` // Download url or local file url.
SHA256 string `toml:"sha256"` // SHA256 of the toolchain archive, used for verification and caching.
Name string `toml:"name"` // It should be "gcc", "msvc", "clang-cl", "clang" and "msys2".
Version string `toml:"version"` // It should be version of gcc/msvc/clang.
Archive string `toml:"archive,omitempty"` // Archive can be changed to avoid conflict.
Path string `toml:"path"` // Runtime path of tool, it's relative path and would be converted to absolute path later.
SystemName string `toml:"system_name"` // It would be "Windows", "Linux", "Android" and so on.
SystemProcessor string `toml:"system_processor"` // It would be "x86_64", "aarch64" and so on.
Host string `toml:"host"` // It would be "x86_64-linux-gnu", "aarch64-linux-gnu" and so on.
EmbeddedSystem bool `toml:"embedded_system,omitempty"` // Whether it's for embedded system, like mcu or bare-metal.
CrosstoolPrefix string `toml:"crosstool_prefix"` // It would be like "x86_64-linux-gnu-"
// C/C++ standard.
CStandard string `toml:"c_standard,omitempty"`
CXXStandard string `toml:"cxx_standard,omitempty"`
// Mandatory fields.
CC string `toml:"cc"` // C language compiler.
CXX string `toml:"cxx"` // C++ language compiler.
// Optional compiler target triplets for toolchains that require explicit target selection.
CCompilerTarget string `toml:"c_compiler_target,omitempty"`
CXXCompilerTarget string `toml:"cxx_compiler_target,omitempty"`
// Core compiler tools (Essential).
CPP string `toml:"cpp,omitempty"` // C preprocessor.
AR string `toml:"ar,omitempty"` // Archive static library.
LD string `toml:"ld,omitempty"` // Link executable.
AS string `toml:"as,omitempty"` // Assemble assembly code.
// Object file manipulation tools.
OBJCOPY string `toml:"objcopy,omitempty"` // Copy object file.
OBJDUMP string `toml:"objdump,omitempty"` // Dump object file.
STRIP string `toml:"strip,omitempty"` // Strip executable and library.
READELF string `toml:"readelf,omitempty"` // Read ELF file.
SIZE string `toml:"size,omitempty"` // Display file size.
STRINGS string `toml:"strings,omitempty"` // Display strings in file.
// Symbol and archive tools.
NM string `toml:"nm,omitempty"` // List symbols in object file.
RANLIB string `toml:"ranlib,omitempty"` // Index static library.
// Code coverage tools.
GCOV string `toml:"gcov,omitempty"` // Gcov code coverage.
// Debug and analysis tools.
ADDR2LINE string `toml:"addr2line,omitempty"` // Convert address to line number.
CXXFILT string `toml:"cxxfilt,omitempty"` // C++ symbol demangler.
// Additional compiler tools.
FC string `toml:"fc,omitempty"` // Compile Fortran code.
// Platform-aware envs, flags.
Envs []string `toml:"envs"`
CFlags []string `toml:"cflags"`
CXXFlags []string `toml:"cxxflags"`
LinkFlags []string `toml:"linkflags"`
CFlagsDebug []string `toml:"cflags_debug"`
CXXFlagsDebug []string `toml:"cxxflags_debug"`
LinkFlagsDebug []string `toml:"linkflags_debug"`
// Internal fields.
MSVC context.MSVC `toml:"-"`
// contains filtered or unexported fields
}
func (*Toolchain) CheckAndRepair ¶
func (Toolchain) GetADDR2LINE ¶
func (Toolchain) GetCStandard ¶
func (Toolchain) GetCXXFILT ¶
func (Toolchain) GetCXXFlags ¶
func (Toolchain) GetCXXStandard ¶
func (Toolchain) GetCrosstoolPrefix ¶
func (Toolchain) GetCrosstoolPrefixPath ¶
func (Toolchain) GetLinkFlags ¶
func (Toolchain) GetOBJCOPY ¶
func (Toolchain) GetOBJDUMP ¶
func (Toolchain) GetREADELF ¶
func (Toolchain) GetRootDir ¶
func (Toolchain) GetSTRINGS ¶
func (Toolchain) GetSystemName ¶
func (Toolchain) GetSystemProcessor ¶
func (Toolchain) GetVersion ¶
type WindowsKit ¶
Click to show internal directories.
Click to hide internal directories.