Skip to main content

Module llvm

Module llvm 

Source
Expand description

Compilation of native dependencies like LLVM.

Native projects like LLVM 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 LLVM 3 times as part of a normal bootstrap (we want it cached).

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

StructsΒ§

BuiltEnzyme
BuiltOmpOffload
BuiltRustOffload
CcFlags πŸ”’
Allows each step to add C/Cxx flags which are only used for a specific cmake invocation.
CrtBeginEnd
DownloadedLlvm
Enzyme
FileCheck
Returns the path to FileCheck LLVM binary for the specified target.
LdFlags πŸ”’
Linker flags to pass to LLVM’s CMake invocation.
Libunwind
Lld
Llvm
LlvmBuildInfo
LlvmFromCi
This step explicitly represents the output of downloaded LLVM. The step will provide an output only if all the following is true:
LlvmOutput
Result of building or downloading LLVM artifacts.
OmpOffload
RustOffload
SanitizerRuntime
Sanitizers

EnumsΒ§

LlvmBuildStatus
LlvmKind

ConstantsΒ§

LLVM_CI_LINK_TYPE_PATH
Path where a file containing the link type (dynamic or static) is stored in the LLVM CI tarball.
LLVM_INVALIDATION_PATHS
Paths whose changes invalidate LLVM downloads.

FunctionsΒ§

check_llvm_version πŸ”’
configure_cmake πŸ”’
configure_llvm πŸ”’
detect_llvm_freshness πŸ”’
Detect whether LLVM sources have been modified locally or not.
get_llvm_build_status
This returns whether we’ve already previously built LLVM.
get_llvm_profile πŸ”’
get_llvm_version
get_llvm_version_major
get_var πŸ”’
is_ci_llvm_available_for_target πŸ”’
Returns whether the CI-found LLVM is currently usable.
llvm_link_shared πŸ”’
Determine whether llvm should be linked dynamically. NOTE: This only contains the value from the config. If you need to figure out the correct value for a specific LLVM instance, use prebuilt_llvm_config instead.
prebuilt_llvm_output
Attempt to return prebuilt LLVM output information, either downloaded from CI or through an externally provided LLVM.
supported_sanitizers πŸ”’
Returns sanitizers available on a given target.
try_download_ci_llvm πŸ”’