LLVMBitcodeStringToLLVMBitcodeFileStep¶
- class selene_core.build_utils.builtins.LLVMBitcodeStringToLLVMBitcodeFileStep(input_kind: type[ArtifactKind], output_kind: type[ArtifactKind])¶
Convert a bitcode string to a file (by writing the bytes)
- classmethod apply(build_ctx: BuildCtx, input_artifact: Artifact) Artifact ¶
Convert the input artifact to the output artifact.
- classmethod get_cost(build_ctx: BuildCtx) float ¶
When planning a build sequence, the path of minimal (cumulative) cost is chosen. This class method returns the ‘cost’ of this step, given the current build context and artifact. Use the context provided to decide whether a step should be prioritised by giving it a low cost, penalised by giving it a high cost, or ruled out entirely by giving it float(‘inf’).
For example, say you have two similar steps that offer a choice, such as compiling an IR to LLVM bitcode or to LLVM IR (text). You can use the build_ctx to accept user input to select between the two, providing a default (unequal) cost to prioritise a default route.
Negative costs are not permitted.
- input_kind¶
alias of
HeliosLLVMBitcodeStringKind
- output_kind¶
alias of
HeliosLLVMBitcodeFileKind