1
Fork 0

Auto merge of #52266 - michaelwoerister:incr-thinlto-preliminaries, r=alexcrichton

Preliminary work for incremental ThinLTO.

Since implementing incremental ThinLTO is a bit more involved than I initially thought, I'm splitting out some of the things that already work. This PR (1) adds a way accessing some ThinLTO information in `rustc` and (2) does some cleanup around CGU/object file naming (which makes things quite a bit nicer).

This is probably best reviewed one commit at a time.
This commit is contained in:
bors 2018-07-13 22:06:38 +00:00
commit a14a361c2c
25 changed files with 457 additions and 171 deletions

View file

@ -696,7 +696,7 @@ unsafe fn codegen(cgcx: &CodegenContext,
if config.emit_bc_compressed {
let dst = bc_out.with_extension(RLIB_BYTECODE_EXTENSION);
let data = bytecode::encode(&module.llmod_id, data);
let data = bytecode::encode(&module.name, data);
if let Err(e) = fs::write(&dst, data) {
diag_handler.err(&format!("failed to write bytecode: {}", e));
}
@ -1308,7 +1308,6 @@ fn execute_work_item(cgcx: &CodegenContext,
assert_eq!(bytecode_compressed.is_some(), config.emit_bc_compressed);
Ok(WorkItemResult::Compiled(CompiledModule {
llmod_id: module.llmod_id.clone(),
name: module_name,
kind: ModuleKind::Regular,
pre_existing: true,