Use CGU name as LLVM module name and add some caching to CGU name generation.

This commit is contained in:
Michael Woerister
2018-08-14 17:55:22 +02:00
parent e192e498ab
commit d662083a6c
9 changed files with 207 additions and 169 deletions

View File

@@ -46,13 +46,6 @@ use std::process::{Output, Stdio};
use std::str;
use syntax::attr;
/// The LLVM module name containing crate-metadata. This includes a `.` on
/// purpose, so it cannot clash with the name of a user-defined module.
pub const METADATA_MODULE_NAME: &'static str = "crate.metadata";
// same as for metadata above, but for allocator shim
pub const ALLOCATOR_MODULE_NAME: &'static str = "crate.allocator";
pub use rustc_codegen_utils::link::{find_crate_name, filename_for_input, default_output_for_target,
invalid_output_for_target, build_link_meta, out_filename,
check_file_is_writeable};