Module gcc

Source
Expand description

Compilation of native dependencies like GCC.

Native projects like GCC unfortunately aren’t suited just yet for compilation in build scripts that Cargo has. This is because the compilation takes a very long time but also because we don’t want to compile GCC 3 times as part of a normal bootstrap (we want it cached).

GCC and compiler-rt are essentially just wired up to everything else to ensure that they’re always in place if needed.

Structs§

Gcc
GccOutput
Meta

Enums§

GccBuildStatus

Functions§

add_cg_gcc_cargo_flags
Configures a Cargo invocation so that it can build the GCC codegen backend.
build_gcc 🔒
ci_gcc_root 🔒
The absolute path to the downloaded GCC artifacts.
create_lib_alias 🔒
Creates a libgccjit.so.0 alias next to libgccjit.so if it does not already exist
detect_gcc_sha 🔒
This retrieves the GCC sha we want to use, according to git history.
get_gcc_build_status
This returns information about whether GCC should be built or if it’s already built. It transparently handles downloading GCC from CI if needed.
libgccjit_built_path 🔒
Returns the path to a libgccjit.so file in the install directory of GCC.
try_download_gcc 🔒
Tries to download GCC from CI if it is enabled and GCC artifacts are available for the given target. Returns a path to the libgccjit.so file.