From b9784b18c2d18dee7100529fd0cbadc8fa331a62 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Sat, 20 Jul 2019 12:12:12 +0200 Subject: [PATCH] Don't link mcjit/interpreter LLVM components --- src/librustc_llvm/build.rs | 13 +++---------- src/rustllvm/PassWrapper.cpp | 2 -- src/rustllvm/rustllvm.h | 4 ---- 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/librustc_llvm/build.rs b/src/librustc_llvm/build.rs index 21fa872c8dadb..3def2d8232f63 100644 --- a/src/librustc_llvm/build.rs +++ b/src/librustc_llvm/build.rs @@ -71,7 +71,8 @@ fn main() { let mut optional_components = vec!["x86", "arm", "aarch64", "amdgpu", "mips", "powerpc", - "systemz", "jsbackend", "webassembly", "msp430", "sparc", "nvptx"]; + "systemz", "jsbackend", "webassembly", "msp430", "sparc", "nvptx", + "hexagon"]; let mut version_cmd = Command::new(&llvm_config); version_cmd.arg("--version"); @@ -82,27 +83,19 @@ fn main() { if let (Some(major), Some(minor)) = (parts.next(), parts.next()) { (major, minor) } else { - (3, 9) + (6, 0) }; - if major > 3 { - optional_components.push("hexagon"); - } - if major > 6 { optional_components.push("riscv"); } - // FIXME: surely we don't need all these components, right? Stuff like mcjit - // or interpreter the compiler itself never uses. let required_components = &["ipo", "bitreader", "bitwriter", "linker", "asmparser", - "mcjit", "lto", - "interpreter", "instrumentation"]; let components = output(Command::new(&llvm_config).arg("--components")); diff --git a/src/rustllvm/PassWrapper.cpp b/src/rustllvm/PassWrapper.cpp index 7d20086d9a22e..0cda3465dc093 100644 --- a/src/rustllvm/PassWrapper.cpp +++ b/src/rustllvm/PassWrapper.cpp @@ -26,8 +26,6 @@ using namespace llvm; using namespace llvm::legacy; -extern cl::opt EnableARMEHABI; - typedef struct LLVMOpaquePass *LLVMPassRef; typedef struct LLVMOpaqueTargetMachine *LLVMTargetMachineRef; diff --git a/src/rustllvm/rustllvm.h b/src/rustllvm/rustllvm.h index a9d267cdb3175..c3f0d174d4b41 100644 --- a/src/rustllvm/rustllvm.h +++ b/src/rustllvm/rustllvm.h @@ -1,15 +1,11 @@ #include "llvm-c/BitReader.h" #include "llvm-c/Core.h" -#include "llvm-c/ExecutionEngine.h" #include "llvm-c/Object.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseSet.h" #include "llvm/ADT/Triple.h" #include "llvm/Analysis/Lint.h" #include "llvm/Analysis/Passes.h" -#include "llvm/ExecutionEngine/ExecutionEngine.h" -#include "llvm/ExecutionEngine/Interpreter.h" -#include "llvm/ExecutionEngine/MCJIT.h" #include "llvm/IR/IRBuilder.h" #include "llvm/IR/InlineAsm.h" #include "llvm/IR/LLVMContext.h"