Skip to content

Commit 1160fb0

Browse files
committed
---
yaml --- r: 6060 b: refs/heads/master c: 329f045 h: refs/heads/master v: v3
1 parent f8a77a3 commit 1160fb0

File tree

5 files changed

+11
-1
lines changed

5 files changed

+11
-1
lines changed

[refs]

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: c9003d301f602cb44d8cc3fd464c95b09e08548e
2+
refs/heads/master: 329f045d4c5f27275dcf1cadf8d0f51919ba8027

trunk/src/comp/back/link.rs

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ mod write {
9191
fn run_passes(sess: session::session, llmod: ModuleRef, output: str) {
9292
let opts = sess.get_opts();
9393
if opts.time_llvm_passes { llvm::LLVMRustEnableTimePasses(); }
94+
if opts.stack_growth { llvm::LLVMRustEnableSegmentedStacks(); }
9495
link_intrinsics(sess, llmod);
9596
let pm = mk_pass_manager();
9697
let td = mk_target_data(x86::get_data_layout());

trunk/src/comp/lib/llvm.rs

+2
Original file line numberDiff line numberDiff line change
@@ -868,6 +868,8 @@ native "c-stack-cdecl" mod llvm = "rustllvm" {
868868

869869
/** Turn on LLVM pass-timing. */
870870
fn LLVMRustEnableTimePasses();
871+
/** Turn on LLVM segmented stacks. */
872+
fn LLVMRustEnableSegmentedStacks();
871873

872874
/** Print the pass timings since static dtors aren't picking them up. */
873875
fn LLVMRustPrintPassTimings();

trunk/src/rustllvm/RustWrapper.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -123,3 +123,9 @@ extern "C" void LLVMRustPrintPassTimings() {
123123
raw_fd_ostream OS (2, false); // stderr.
124124
TimerGroup::printAll(OS);
125125
}
126+
127+
extern bool llvm::EnableSegmentedStacks;
128+
extern "C" void LLVMRustEnableSegmentedStacks() {
129+
EnableSegmentedStacks = true;
130+
}
131+

trunk/src/rustllvm/rustllvm.def.in

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ LLVMRustGetHostTriple
66
LLVMRustConstSmallInt
77
LLVMRustParseBitcode
88
LLVMRustPrintPassTimings
9+
LLVMRustEnableSegmentedStacks
910
LLVMLinkModules
1011
LLVMCreateObjectFile
1112
LLVMDisposeObjectFile

0 commit comments

Comments
 (0)