Struct llvm_build_utils::BuildOptions
[−]
[src]
pub struct BuildOptions { pub triple: String, pub cpu: String, pub attr: String, pub model: CodegenModel, pub reloc: Relocations, pub opt: Optimisation, pub ar_section_name: String, }
Fields
triple: String
Target triple to generate machine code for
The target triple has the general format <arch><sub>-<vendor>-<sys>-<abi>
, where:
<arch>
x86, arm, thumb, mips, etc.<sub>
for example on ARM: v5, v6m, v7a, v7m, etc.<vendor>
pc, apple, nvidia, ibm, etc.<sys>
none, linux, win32, darwin, cuda, etc.<abi>
eabi, gnu, android, macho, elf, etc.
Defaults to $TARGET
environment variable, if set (always is in cargo build scripts).
Corresponds to the -mtriple
option of llc
.
cpu: String
Target CPU to generate machine code for
Default is chosen depending on the target triple
.
Corresponds to the -mcpu
option of llc
.
attr: String
Capabilities of the target code is generated for
Format of this field is the same as the format for -mattr
option: +feature enables a
feature, -feature disables it. Each feature is delimited by a comma.
Sample string: +sse,+sse2,+sse3,-avx
.
Default is chosen depending on the target triple
.
Corresponds to the -mattr
option of llc
.
model: CodegenModel
Code generation
Defaults to CodegenModel::Default
.
Corresponds to the -code-model
option of llc
.
reloc: Relocations
Relocation model
Defaults to Relocations::Default
.
Corresponds to the -relocation-model
option of llc
.
opt: Optimisation
Code optimisation level
Defaults to the same level as specified in the $OPT_LEVEL
environment variable (set by
cargo) and Optimisation::O0
if not set.
Corresponds to the -O
option of llc
.
ar_section_name: String
Name of the archive section to insert generated object into
Trait Implementations
impl Debug for BuildOptions
[src]
impl Default for BuildOptions
[src]
fn default() -> BuildOptions
Returns the "default value" for a type. Read more