From 15da6e8ce069b6f5951a394739943c143061e8a8 Mon Sep 17 00:00:00 2001 From: Midas Lambrichts Date: Sun, 20 Jun 2021 21:01:38 +0200 Subject: [PATCH] Added the 32 bit variant of x86 to generate a target machine for inkwell Extended the match on X86_64 to include the X86_32 and all of its architectures. --- lib/compiler-llvm/src/config.rs | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/lib/compiler-llvm/src/config.rs b/lib/compiler-llvm/src/config.rs index a67f368d023..550d641af3d 100644 --- a/lib/compiler-llvm/src/config.rs +++ b/lib/compiler-llvm/src/config.rs @@ -137,14 +137,16 @@ impl LLVM { let cpu_features = &target.cpu_features(); match triple.architecture { - Architecture::X86_64 => InkwellTarget::initialize_x86(&InitializationConfig { - asm_parser: true, - asm_printer: true, - base: true, - disassembler: true, - info: true, - machine_code: true, - }), + Architecture::X86_64 | Architecture::X86_32(_) => { + InkwellTarget::initialize_x86(&InitializationConfig { + asm_parser: true, + asm_printer: true, + base: true, + disassembler: true, + info: true, + machine_code: true, + }) + } Architecture::Aarch64(_) => InkwellTarget::initialize_aarch64(&InitializationConfig { asm_parser: true, asm_printer: true,