This repository was archived by the owner on Jul 6, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Expand file tree Collapse file tree 4 files changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -27,3 +27,5 @@ extern crate core;
27
27
28
28
#[ cfg( mcu_lpc17xx) ]
29
29
#[ path="lpc17xx/isr.rs" ] pub mod isr_lpc17xx;
30
+
31
+ #[ path="../lib/lang_items.rs" ] mod lang_items;
Original file line number Diff line number Diff line change
1
+ // Zinc, the bare metal stack for rust.
2
+ // Copyright 2014 Vladimir "farcaller" Pouzanov <farcaller@gmail.com>
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // http://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+
16
+ #[ lang="stack_exhausted" ]
17
+ #[ no_split_stack]
18
+ extern fn stack_exhausted ( ) { }
19
+ #[ lang="eh_personality" ]
20
+ #[ no_split_stack]
21
+ extern fn eh_personality ( ) { }
22
+ #[ lang="begin_unwind" ]
23
+ #[ no_split_stack]
24
+ extern fn begin_unwind ( ) { }
Original file line number Diff line number Diff line change @@ -19,3 +19,5 @@ pub mod strconv;
19
19
pub mod volatile_cell;
20
20
pub mod shared;
21
21
pub mod queue;
22
+
23
+ mod lang_items;
Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ def compile_rust(n, h)
81
81
"#{ do_lto ? '-Z lto' : '' } #{ crate_type } #{ emit } " +
82
82
"#{ search_paths } #{ codegen } " +
83
83
"#{ outflags } #{ ignore_warnings } #{ rust_src } "
84
+ if File . extname ( t . name ) == '.o'
85
+ sh "#{ :strip . in_toolchain } -N rust_stack_exhausted -N rust_begin_unwind " +
86
+ "-N rust_eh_personality #{ t . name } "
87
+ end
84
88
end
85
89
end
86
90
You can’t perform that action at this time.
0 commit comments