about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/back
diff options
context:
space:
mode:
authorMichael Bradshaw <mjbshaw@google.com>2018-09-29 19:51:09 -0700
committerMichael Bradshaw <mjbshaw@google.com>2018-09-29 19:51:09 -0700
commit43cc32fbb2506eff0090e894c1e8a46b62a8eb0b (patch)
treeac301fe1be819c25d833880da0ab32bf550016eb /src/librustc_codegen_llvm/back
parentaec5330082a0c4664abf0f6604c1b05768a90234 (diff)
parent9653f790333d1270f36f1614e85d8a7b54193e75 (diff)
downloadrust-43cc32fbb2506eff0090e894c1e8a46b62a8eb0b.tar.gz
rust-43cc32fbb2506eff0090e894c1e8a46b62a8eb0b.zip
Merge branch 'master' into drop
Diffstat (limited to 'src/librustc_codegen_llvm/back')
-rw-r--r--src/librustc_codegen_llvm/back/link.rs12
-rw-r--r--src/librustc_codegen_llvm/back/write.rs2
2 files changed, 4 insertions, 10 deletions
diff --git a/src/librustc_codegen_llvm/back/link.rs b/src/librustc_codegen_llvm/back/link.rs
index 8248385c127..ce52fe00b0e 100644
--- a/src/librustc_codegen_llvm/back/link.rs
+++ b/src/librustc_codegen_llvm/back/link.rs
@@ -47,7 +47,8 @@ use std::str;
 use syntax::attr;
 
 pub use rustc_codegen_utils::link::{find_crate_name, filename_for_input, default_output_for_target,
-                                  invalid_output_for_target, out_filename, check_file_is_writeable};
+                                  invalid_output_for_target, out_filename, check_file_is_writeable,
+                                  filename_for_metadata};
 
 // The third parameter is for env vars, used on windows to set up the
 // path for MSVC to find its DLLs, and gcc to find its bundled
@@ -218,15 +219,6 @@ fn preserve_objects_for_their_debuginfo(sess: &Session) -> bool {
     false
 }
 
-fn filename_for_metadata(sess: &Session, crate_name: &str, outputs: &OutputFilenames) -> PathBuf {
-    let out_filename = outputs.single_output_file.clone()
-        .unwrap_or(outputs
-            .out_directory
-            .join(&format!("lib{}{}.rmeta", crate_name, sess.opts.cg.extra_filename)));
-    check_file_is_writeable(&out_filename, sess);
-    out_filename
-}
-
 pub(crate) fn each_linked_rlib(sess: &Session,
                                info: &CrateInfo,
                                f: &mut dyn FnMut(CrateNum, &Path)) -> Result<(), String> {
diff --git a/src/librustc_codegen_llvm/back/write.rs b/src/librustc_codegen_llvm/back/write.rs
index 447b505e79c..02ef690b942 100644
--- a/src/librustc_codegen_llvm/back/write.rs
+++ b/src/librustc_codegen_llvm/back/write.rs
@@ -196,6 +196,7 @@ pub fn target_machine_factory(sess: &Session, find_features: bool)
     let features = CString::new(features).unwrap();
     let is_pie_binary = !find_features && is_pie_binary(sess);
     let trap_unreachable = sess.target.target.options.trap_unreachable;
+    let emit_stack_size_section = sess.opts.debugging_opts.emit_stack_sizes;
 
     let asm_comments = sess.asm_comments();
 
@@ -213,6 +214,7 @@ pub fn target_machine_factory(sess: &Session, find_features: bool)
                 trap_unreachable,
                 singlethread,
                 asm_comments,
+                emit_stack_size_section,
             )
         };