Skip to content

Commit 2eadfe4

Browse files
committedJul 15, 2014
auto merge of #15511 : brson/rust/extract-rustc-back, r=alexcrichton
This was my weekend project, to start breaking up rustc. It first pulls out LLVM into `rustc_llvm`, then parts of `rustc::back` and `rustc::util` to `rustc_back`. The immediate intent is just to reduce the size of rustc, to reduce memory pressure when building rustc, but this is also a good starting point for further refactoring. The `rustc_back` crate is definitely misnamed (`rustc::back` was never a very cohesive module anyway) - it's mostly just somewhere to stuff parts of rustc that don't have many deps. Right now it's main dep is `syntax`; it has no dep on `rustc_llvm`. Some next steps might be to split `rustc_back` into `rustc_util` (with no `syntax` dep), and `rustc_syntax_util` (with a syntax dep); move the rest of `rustc::util` into `rustc_syntax_util`; move all of `rustc::front` to a new crate, `rustc_front`. At that point the refactoring necessary to keep extracting crates will get harder.
2 parents b1ae09e + a008fc8 commit 2eadfe4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+2718
-2459
lines changed
 

Diff for: ‎.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,5 +86,5 @@ src/etc/dl
8686
.settings/
8787
/build
8888
i686-pc-mingw32/
89-
src/librustc/lib/llvmdeps.rs
89+
src/librustc_llvm/llvmdeps.rs
9090
*.pot

Diff for: ‎mk/crates.mk

+6-3
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ TARGET_CRATES := libc std green rustuv native flate arena glob term semver \
5353
uuid serialize sync getopts collections num test time rand \
5454
url log regex graphviz core rlibc alloc debug rustrt \
5555
unicode
56-
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros
56+
HOST_CRATES := syntax rustc rustdoc fourcc hexfloat regex_macros fmt_macros \
57+
rustc_llvm rustc_back
5758
CRATES := $(TARGET_CRATES) $(HOST_CRATES)
5859
TOOLS := compiletest rustdoc rustc
5960

@@ -70,8 +71,10 @@ DEPS_green := std native:context_switch
7071
DEPS_rustuv := std native:uv native:uv_support
7172
DEPS_native := std
7273
DEPS_syntax := std term serialize log fmt_macros debug
73-
DEPS_rustc := syntax native:rustllvm flate arena serialize getopts \
74-
time log graphviz debug
74+
DEPS_rustc := syntax flate arena serialize getopts \
75+
time log graphviz debug rustc_llvm rustc_back
76+
DEPS_rustc_llvm := native:rustllvm libc std
77+
DEPS_rustc_back := std syntax rustc_llvm flate log libc
7578
DEPS_rustdoc := rustc native:hoedown serialize getopts \
7679
test time debug
7780
DEPS_flate := std native:miniz

0 commit comments

Comments
 (0)
Please sign in to comment.