Skip to content

Commit 58674e0

Browse files
authored
Rollup merge of rust-lang#62827 - nikic:llvm-components, r=alexcrichton
Don't link mcjit/interpreter LLVM components We don't use these. Drop related unused ExecutionEngine header uses. As some drive-by cleanup drop the unused `EnableARMEHABI` global and remove an outdated version check for the hexagon component. r? @alexcrichton
2 parents f79ffa3 + b9784b1 commit 58674e0

File tree

3 files changed

+3
-16
lines changed

3 files changed

+3
-16
lines changed

src/librustc_llvm/build.rs

+3-10
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ fn main() {
7171

7272
let mut optional_components =
7373
vec!["x86", "arm", "aarch64", "amdgpu", "mips", "powerpc",
74-
"systemz", "jsbackend", "webassembly", "msp430", "sparc", "nvptx"];
74+
"systemz", "jsbackend", "webassembly", "msp430", "sparc", "nvptx",
75+
"hexagon"];
7576

7677
let mut version_cmd = Command::new(&llvm_config);
7778
version_cmd.arg("--version");
@@ -82,27 +83,19 @@ fn main() {
8283
if let (Some(major), Some(minor)) = (parts.next(), parts.next()) {
8384
(major, minor)
8485
} else {
85-
(3, 9)
86+
(6, 0)
8687
};
8788

88-
if major > 3 {
89-
optional_components.push("hexagon");
90-
}
91-
9289
if major > 6 {
9390
optional_components.push("riscv");
9491
}
9592

96-
// FIXME: surely we don't need all these components, right? Stuff like mcjit
97-
// or interpreter the compiler itself never uses.
9893
let required_components = &["ipo",
9994
"bitreader",
10095
"bitwriter",
10196
"linker",
10297
"asmparser",
103-
"mcjit",
10498
"lto",
105-
"interpreter",
10699
"instrumentation"];
107100

108101
let components = output(Command::new(&llvm_config).arg("--components"));

src/rustllvm/PassWrapper.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
using namespace llvm;
2727
using namespace llvm::legacy;
2828

29-
extern cl::opt<bool> EnableARMEHABI;
30-
3129
typedef struct LLVMOpaquePass *LLVMPassRef;
3230
typedef struct LLVMOpaqueTargetMachine *LLVMTargetMachineRef;
3331

src/rustllvm/rustllvm.h

-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
#include "llvm-c/BitReader.h"
22
#include "llvm-c/Core.h"
3-
#include "llvm-c/ExecutionEngine.h"
43
#include "llvm-c/Object.h"
54
#include "llvm/ADT/ArrayRef.h"
65
#include "llvm/ADT/DenseSet.h"
76
#include "llvm/ADT/Triple.h"
87
#include "llvm/Analysis/Lint.h"
98
#include "llvm/Analysis/Passes.h"
10-
#include "llvm/ExecutionEngine/ExecutionEngine.h"
11-
#include "llvm/ExecutionEngine/Interpreter.h"
12-
#include "llvm/ExecutionEngine/MCJIT.h"
139
#include "llvm/IR/IRBuilder.h"
1410
#include "llvm/IR/InlineAsm.h"
1511
#include "llvm/IR/LLVMContext.h"

0 commit comments

Comments
 (0)