Closed
Description
I'm adding something to librustc_llvm and changing it rebuilds a lot of rustc libraries. @eddyb said this should not be the case.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
eddyb commentedon Apr 22, 2017
Indeed, only
librustc_trans
actually needs LLVM, in fact I'd really love to combine the two, since LLVM is only used for the one backend, even if it happens to be our only official one.whitequark commentedon Apr 22, 2017
Wouldn't that degrade compile times on rebuild?
eddyb commentedon Apr 22, 2017
Does
librustc_llvm
actually take a long time to build? Or is linking LLVM super slow?EDIT For the latter we should use the
-sys
convention and no higher-level APIs.whitequark commentedon Apr 22, 2017
I think it's nontrivial, and statically linking LLVM (I dynamically link, personally) can take a lot of time with the default set of targets (I recall linking it for straight minutes).
eddyb commentedon Apr 22, 2017
@whitequark Yeah we can still separate that out I think, but move anything that's not imports into what is currently
librustc_trans
- if we can have the crate empty, even better.arielb1 commentedon Apr 22, 2017
Currently,
librustc_metadata
depends on LLVM for its archive reader, so we'll first have to split that out (unless the archive reader does not require configuring LLVM).eddyb commentedon Apr 22, 2017
@arielb1 Yeah I think we want to split it so the backend provides file -> metadata blob functionality, and
librustc_metadata
handles both finding the files and decoding the blob.arielb1 commentedon Apr 22, 2017
@eddyb
Yeah. That would also be the Right Thing for targets with "unconventional linking".
hanna-kruppe commentedon Apr 23, 2017
This impacts me a lot, as essentially all my rustc work for the next few weeks or more consists of modifying LLVM, occasionally librustc_llvm, and rarely librustc_trans. So I'd volunteer to fix it. I could use some details on what this "file -> metadata blob" API should look like, though. Please elaborate here or ping me on IRC.
nagisa commentedon Apr 23, 2017
@rkruppe maybe something like this?
Rollup merge of rust-lang#41565 - rkruppe:llvm-sys, r=eddyb
Rollup merge of rust-lang#41565 - rkruppe:llvm-sys, r=eddyb