Uh oh!
There was an error while loading. Please reload this page.
Support compiling rustc without LLVM (try 2) - #42932
Conversation
rust-highfive
commented
Jun 27, 2017
r? @eddyb (rust_highfive has picked a reviewer for you, use r? to override) |
eddyb
commented
Jun 27, 2017
cc @rust-lang/compiler |
There was a problem hiding this comment.
The comment seems to imply that the build with llvm is broken, not the build without it. Should be the other way round, right?
bors
commented
Jul 4, 2017
☔ The latest upstream changes (presumably #43051) made this pull request unmergeable. Please resolve the merge conflicts. |
So llvm would just be a cargo feature of |
eddyb
commented
Jul 12, 2017
@oli-obk More or less, yes. |
carols10cents
commented
Jul 17, 2017
friendly ping to keep this on your radar, @bjorn3! |
nikomatsakis
commented
Jul 17, 2017
bjorn3
commented
Jul 20, 2017
@eddyb is this a bit like you mean. If so I will work it out further in a few days. |
bors
commented
Jul 22, 2017
☔ The latest upstream changes (presumably #43059) made this pull request unmergeable. Please resolve the merge conflicts. |
alexcrichton
commented
Jul 27, 2017
There was a problem hiding this comment.
Missing newline at the end of file.
eddyb
left a comment
There was a problem hiding this comment.
Now this looks much more streamlined!
eddyb
commented
Jul 28, 2017
@bjorn3 Ahh how I wish I had a way to un-dismiss github notifications... I keep losing track of some I've gone through on my phone 😞. @alexcrichton Thanks for the ping! |
4c5839c to
7f191bcComparebjorn3
commented
Jul 31, 2017
Rebased |
eddyb
commented
Jul 31, 2017
@bjorn3 Can you squash the commits to remove the back-and-forth (X followed by revert X)? |
There was a problem hiding this comment.
Was this copied wholesale from rustc_trans? Does that mean ar::Archive is independent of LLVM?
That could make rustc_metadata target-agnostic in the non-dynamic-library case!
cc @alexcrichton@rkruppe
There was a problem hiding this comment.
The ar crate is a rust only .a reader and writer.
There was a problem hiding this comment.
Then it should be used directly by rustc_metadata and get_rlib_metadata shouldn't exist as a pluggable API (but rather the code live in rustc_metadata) which means loader: Box<MetadataLoader> in rustc_metadata becomes just:
get_dylib_metadata:fn(&Target,&Path) -> Result<ErasedBoxRef<[u8]>,String>When not available, one can just pass in |_, _| Err(String::from("unsupported")).
bjorn3
commented
Jul 31, 2017
Squashed |
7b64996 to
47cd964Comparebjorn3
commented
Aug 5, 2017
Doesn't fail locally (mac os) |
alexcrichton
commented
Aug 10, 2017
Hm so looking over this it looks like this is changing how we're reading rlib metadata? The current construction is done specifically for speed as LLVM's ar parsing/reading is much speedier than many other solutions. Are we sure the Also from a maintainability perspective, this seems like the kind of patch that'd bitrot almost instantly? Is there something we can do to avoid the |
eddyb
commented
Aug 10, 2017
@alexcrichton OH! Uhm, when I asked about it it sounded like we already moved away from using the LLVM support - but if that's not true, then the "Move rlib metadata reading code to rustc_metadata and replace MetadataLoader with a function pointer" commit was a mistake... |
bjorn3
commented
Aug 11, 2017
Travis passes. |
eddyb
commented
Aug 11, 2017
@bjorn3 Please squash the original commits with the reverts. |
bjorn3
commented
Aug 11, 2017
Squashed and travis passes |
eddyb
commented
Aug 11, 2017
@bors r+ |
bors
commented
Aug 11, 2017
📌 Commit e539996 has been approved by |
bors
commented
Aug 11, 2017
Support compiling rustc without LLVM (try 2) Now doesn't change rustc_driver. Supersedes #42752
bors
commented
Aug 11, 2017
☀️ Test successful - status-appveyor, status-travis |
alexcrichton
commented
Aug 11, 2017
@eddyb and @bjorn3 did y'all have no comments about the maintainability aspect above? Specifically:
|
eddyb
commented
Aug 11, 2017
@alexcrichton So I took a look at the diff to count them, remembering only 5-6... and now there's a lot more. And they're mostly in b7314c7 "Actually make rustc_driver compile without llvm". |
eddyb
commented
Aug 11, 2017
So that is definitely my fault, and if @alexcrichton wants this reverted then I'm on board. |
bjorn3
commented
Aug 12, 2017
Im writing a pr to remove most of the cfg's. It will likely be ready tomorrow. |
alexcrichton
commented
Aug 12, 2017
Thanks @bjorn3! Feel free to cc or r? me on that |
Cleanup for "Support compiling rustc without LLVM (try 2)" This includes a small patch to allow running tests without llvm. Also check if you are not trying to compile a dylib. cc #42932 r? @alexcrichton
Now doesn't change rustc_driver.
Supersedes #42752