Don't link mcjit/interpreter LLVM components

This commit is contained in:
Nikita Popov 2019-07-20 12:12:12 +02:00
parent f69b07144a
commit b9784b18c2
3 changed files with 3 additions and 16 deletions

View File

@ -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"));

View File

@ -26,8 +26,6 @@
using namespace llvm;
using namespace llvm::legacy;
extern cl::opt<bool> EnableARMEHABI;
typedef struct LLVMOpaquePass *LLVMPassRef;
typedef struct LLVMOpaqueTargetMachine *LLVMTargetMachineRef;

View File

@ -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"