Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't link mcjit/interpreter LLVM components
  • Loading branch information
nikic committed Jul 20, 2019
commit b9784b18c2d18dee7100529fd0cbadc8fa331a62
13 changes: 3 additions & 10 deletions src/librustc_llvm/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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"));
Expand Down
2 changes: 0 additions & 2 deletions src/rustllvm/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
using namespace llvm;
using namespace llvm::legacy;

extern cl::opt<bool> EnableARMEHABI;

typedef struct LLVMOpaquePass *LLVMPassRef;
typedef struct LLVMOpaqueTargetMachine *LLVMTargetMachineRef;

Expand Down
4 changes: 0 additions & 4 deletions src/rustllvm/rustllvm.h
Original file line number Diff line number Diff line change
@@ -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"
Expand Down