silk.build.toolchain.

Selects the LLVM tools used by a compiler installation and by build-cache fingerprints.

Import as Toolchain with import silk.build.toolchain as Toolchain.

Public declarations: 4.

TOOLS#

silk
pub const TOOLS: [string<'static>; 9]

Tool names supplied by Silk's LLVM installation.

compiler#

silk
pub effect fn compiler(executable: &Path, selected: Option<&[u8]>) -> Option<Path>
  ! FileError | HostInputError | OutOfMemoryError
  ? &mut HostInput | &mut FileSystem | &mut Allocator

Selects an explicit Clang, SILK_CLANG, the compiler's bundled LLVM, or clang on PATH. The compiler path identifies the installation even when this function runs in a task program.

archiver#

silk
pub effect fn archiver(clang: &Path) -> Option<Path>
  ! FileError | HostInputError | OutOfMemoryError
  ? &mut HostInput | &mut FileSystem | &mut Allocator

Selects SILK_LLVM_AR, or the archiver beside the selected Clang.

companion#

silk
pub effect fn companion(clang: &Path, name: string) -> Path
  ! FileError | OutOfMemoryError
  ? &mut Allocator

Returns a tool beside Clang, including the Windows executable suffix when needed.

Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.

View the source of this page