about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2018-09-13 19:43:15 +0200
committerJorge Aparicio <jorge@japaric.io>2018-09-26 15:21:26 +0200
commit3c0907ce51f51bbedeb63b482041e4a8e1239364 (patch)
treec104c7c9affb2b67b57093fb7e9dd64cadc06b16 /src/librustc_codegen_llvm
parentc3a1a0d3400bbbcac194efb6ef2b14eef9be5149 (diff)
downloadrust-3c0907ce51f51bbedeb63b482041e4a8e1239364.tar.gz
rust-3c0907ce51f51bbedeb63b482041e4a8e1239364.zip
add -Z emit-stack-sizes
Diffstat (limited to 'src/librustc_codegen_llvm')
-rw-r--r--src/librustc_codegen_llvm/back/write.rs2
-rw-r--r--src/librustc_codegen_llvm/llvm/ffi.rs3
2 files changed, 4 insertions, 1 deletions
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,
             )
         };
 
diff --git a/src/librustc_codegen_llvm/llvm/ffi.rs b/src/librustc_codegen_llvm/llvm/ffi.rs
index a5f4137c62b..845f2fa9f45 100644
--- a/src/librustc_codegen_llvm/llvm/ffi.rs
+++ b/src/librustc_codegen_llvm/llvm/ffi.rs
@@ -1460,7 +1460,8 @@ extern "C" {
                                        DataSections: bool,
                                        TrapUnreachable: bool,
                                        Singlethread: bool,
-                                       AsmComments: bool)
+                                       AsmComments: bool,
+                                       EmitStackSizeSection: bool)
                                        -> Option<&'static mut TargetMachine>;
     pub fn LLVMRustDisposeTargetMachine(T: &'static mut TargetMachine);
     pub fn LLVMRustAddAnalysisPasses(T: &'a TargetMachine, PM: &PassManager<'a>, M: &'a Module);