Detect LLVM toolchains.
Code Map
//! Detect LLVM toolchains.
module battery.detect.llvm;
//! Which llvm commands that are needed.
struct Needed
{
public:
config: bool;
ar: bool;
clang: bool;
ld: bool;
link: bool;
wasm: bool;
}
//! Used as a argument when supplying a command on the command line.
struct FromArgs
{
public:
//! The llvm-config command.
configCmd: string;
//! The arguments for llvm-config.
configArgs: string[];
//! The llvm-ar command.
arCmd: string;
//! The arguments for llvm-ar.
arArgs: string[];
//! The clang command.
clangCmd: string;
//! The arguments for clang.
clangArgs: string[];
//! The ld.lld command.
ldCmd: string;
//! The arguments for ld.lld.
ldArgs: string[];
//! The lld-link command.
linkCmd: string;
//! The arguments for lld-link.
linkArgs: string[];
//! The wasm-ld command.
wasmCmd: string;
//! The arguments for wasm-ld.
wasmArgs: string[];
}
//! Results from the detection code.
struct Result
{
public:
//! From where is this result?
from: string;
//! LLVM Version.
ver: semver.Release;
//! The llvm-config command.
configCmd: string;
//! The arguments for llvm-config.
configArgs: string[];
//! The llvm-ar command.
arCmd: string;
//! The arguments for llvm-ar.
arArgs: string[];
//! The clang command.
clangCmd: string;
//! The arguments for clang.
clangArgs: string[];
//! The ld.lld command.
ldCmd: string;
//! The arguments for ld.lld.
ldArgs: string[];
//! The lld-link command.
linkCmd: string;
//! The arguments for lld-link.
linkArgs: string[];
//! The wasm-ld command.
wasmCmd: string;
//! The arguments for wasm-ld.
wasmArgs: string[];
}
//! Detect LLVM toolchains.
fn detectFrom(path: string, confPaths: string[], results: Result[]) bool { }
//! Detect llvm from arguments.
fn detectFromArgs(fromArgs: FromArgs, result: Result) bool { }
//! Check the battery config for gdc.
fn detectFromBatConf(batConf: BatteryConfig, result: Result) bool { }
//! Add extra arguments to the command, any given args are appended after
//! the extra arguments.
fn addArgs(from: Result, arch: Arch, platform: Platform, res: Result) { }
Which llvm commands that are needed.
Used as a argument when supplying a command on the command line.
The llvm-config command.
The arguments for llvm-config.
The llvm-ar command.
The arguments for llvm-ar.
The clang command.
The arguments for clang.
The ld.lld command.
The arguments for ld.lld.
The lld-link command.
The arguments for lld-link.
The wasm-ld command.
The arguments for wasm-ld.
Results from the detection code.
From where is this result?
LLVM Version.
The llvm-config command.
The arguments for llvm-config.
The llvm-ar command.
The arguments for llvm-ar.
The clang command.
The arguments for clang.
The ld.lld command.
The arguments for ld.lld.
The lld-link command.
The arguments for lld-link.
The wasm-ld command.
The arguments for wasm-ld.
Detect LLVM toolchains.
Detect llvm from arguments.
Check the battery config for gdc.
Add extra arguments to the command, any given args are appended after the extra arguments.
configs used with LLVM tools, Clang and Volta.