Skip to content

Commit 352b44d

Browse files
committed
Remove unnecessary dependencies on rustc_llvm.
1 parent cad964a commit 352b44d

File tree

10 files changed

+7
-19
lines changed

10 files changed

+7
-19
lines changed

mk/crates.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ DEPS_syntax_ext := syntax fmt_macros
9494
DEPS_rustc_const_eval := std syntax
9595

9696
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\
97-
log graphviz rustc_llvm rustc_back rustc_data_structures\
97+
log graphviz rustc_back rustc_data_structures\
9898
rustc_const_eval
99-
DEPS_rustc_back := std syntax rustc_llvm rustc_front flate log libc
99+
DEPS_rustc_back := std syntax rustc_front flate log libc
100100
DEPS_rustc_borrowck := rustc rustc_front rustc_mir log graphviz syntax
101101
DEPS_rustc_data_structures := std log serialize
102102
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \

src/librustc/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,5 @@ rustc_bitflags = { path = "../librustc_bitflags" }
2121
rustc_const_eval = { path = "../librustc_const_eval" }
2222
rustc_data_structures = { path = "../librustc_data_structures" }
2323
rustc_front = { path = "../librustc_front" }
24-
rustc_llvm = { path = "../librustc_llvm" }
2524
serialize = { path = "../libserialize" }
2625
syntax = { path = "../libsyntax" }

src/librustc/lib.rs

-5
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ extern crate getopts;
5050
extern crate graphviz;
5151
extern crate libc;
5252
extern crate rbml;
53-
pub extern crate rustc_llvm as llvm;
5453
extern crate rustc_back;
5554
extern crate rustc_front;
5655
extern crate rustc_data_structures;
@@ -140,10 +139,6 @@ pub mod util {
140139
pub mod fs;
141140
}
142141

143-
pub mod lib {
144-
pub use llvm;
145-
}
146-
147142
// A private module so that macro-expanded idents like
148143
// `::rustc::lint::Lint` will also work in `rustc` itself.
149144
//

src/librustc/session/config.rs

-6
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ use std::env;
3838
use std::fmt;
3939
use std::path::PathBuf;
4040

41-
use llvm;
42-
4341
pub struct Config {
4442
pub target: Target,
4543
pub int_type: IntTy,
@@ -1052,10 +1050,6 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
10521050
let dump_dep_graph = debugging_opts.dump_dep_graph;
10531051
let no_analysis = debugging_opts.no_analysis;
10541052

1055-
if debugging_opts.debug_llvm {
1056-
unsafe { llvm::LLVMSetDebug(1); }
1057-
}
1058-
10591053
let mut output_types = HashMap::new();
10601054
if !debugging_opts.parse_only && !no_trans {
10611055
for list in matches.opt_strs("emit") {

src/librustc_back/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ crate-type = ["dylib"]
1111
[dependencies]
1212
syntax = { path = "../libsyntax" }
1313
serialize = { path = "../libserialize" }
14-
rustc_llvm = { path = "../librustc_llvm" }
1514
rustc_front = { path = "../librustc_front" }
1615
log = { path = "../liblog" }
1716

src/librustc_back/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
extern crate syntax;
4646
extern crate libc;
4747
extern crate serialize;
48-
extern crate rustc_llvm;
4948
extern crate rustc_front;
5049
#[macro_use] extern crate log;
5150

src/librustc_driver/lib.rs

+4
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ pub fn run_compiler<'a>(args: &[String],
166166

167167
let sopts = config::build_session_options(&matches);
168168

169+
if sopts.debugging_opts.debug_llvm {
170+
unsafe { llvm::LLVMSetDebug(1); }
171+
}
172+
169173
let descriptions = diagnostics_registry();
170174

171175
do_or_return!(callbacks.early_callback(&matches,

src/librustc_platform_intrinsics/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,4 @@ path = "lib.rs"
99
crate-type = ["dylib"]
1010

1111
[dependencies]
12-
rustc_llvm = { path = "../librustc_llvm" }
1312
rustc = { path = "../librustc" }

src/librustc_platform_intrinsics/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![cfg_attr(not(stage0), deny(warnings))]
1717
#![allow(bad_style)]
1818

19-
extern crate rustc_llvm as llvm;
2019
extern crate rustc;
2120

2221
use rustc::ty::TyCtxt;

src/test/run-make/execution-engine/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ extern crate rustc;
1616
extern crate rustc_driver;
1717
extern crate rustc_front;
1818
extern crate rustc_lint;
19+
extern crate rustc_llvm as llvm;
1920
extern crate rustc_metadata;
2021
extern crate rustc_resolve;
2122
#[macro_use] extern crate syntax;
@@ -28,7 +29,6 @@ use std::thread::Builder;
2829

2930
use rustc::dep_graph::DepGraph;
3031
use rustc::front::map as ast_map;
31-
use rustc::llvm;
3232
use rustc::middle::cstore::{CrateStore, LinkagePreference};
3333
use rustc::ty;
3434
use rustc::session::config::{self, basic_options, build_configuration, Input, Options};

0 commit comments

Comments
 (0)