Skip to content

Commit

Permalink
Don't try to initialize a target whose inkwell feature flag was not e…
Browse files Browse the repository at this point in the history
…nabled.
  • Loading branch information
nlewycky committed Dec 7, 2019
1 parent 4f39102 commit f3ab59e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/llvm-backend/src/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8464,6 +8464,7 @@ impl<'ctx> ModuleCodeGenerator<LLVMFunctionCodeGenerator<'ctx>, LLVMBackend, Cod
let triple = triple.unwrap_or(TargetMachine::get_default_triple().to_string());

match triple {
#[cfg(target_arch = "x86_64")]
_ if triple.starts_with("x86") => Target::initialize_x86(&InitializationConfig {
asm_parser: true,
asm_printer: true,
Expand All @@ -8472,6 +8473,7 @@ impl<'ctx> ModuleCodeGenerator<LLVMFunctionCodeGenerator<'ctx>, LLVMBackend, Cod
info: true,
machine_code: true,
}),
#[cfg(target_arch = "aarch64")]
_ if triple.starts_with("aarch64") => {
Target::initialize_aarch64(&InitializationConfig {
asm_parser: true,
Expand Down

0 comments on commit f3ab59e

Please sign in to comment.