Skip to content

Commit 3c901c2

Browse files
committed
Switch to rustc-builtins instead of compiler-rt.rs.
1 parent 61f7687 commit 3c901c2

File tree

4 files changed

+4
-75
lines changed

4 files changed

+4
-75
lines changed

libs/primer/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ version = "0.2.0"
1414
linked_list_allocator = "^0.2"
1515
spin = "^0.4"
1616

17-
[dependencies.compiler-rt]
18-
git = "https://github.com/thejpster/compiler-rt.rs"
17+
[dependencies.rustc_builtins]
18+
git = "https://github.com/japaric/rustc-builtins.git"
1919

2020
[dependencies.lazy_static]
2121
features = ["spin_no_std"]

libs/primer/src/common/builtins.rs

-72
Original file line numberDiff line numberDiff line change
@@ -72,78 +72,6 @@ pub extern "C" fn _Unwind_Resume() -> ! {
7272
#[lang="eh_personality"]
7373
extern "C" fn eh_personality() {}
7474

75-
/// Required by LLVM ... sometimes
76-
#[no_mangle]
77-
pub unsafe extern "aapcs" fn __aeabi_memclr8(s: *mut u8, n: usize) -> *mut u8 {
78-
rlibc::memset(s, 0, n)
79-
}
80-
81-
/// Required by LLVM ... sometimes
82-
#[no_mangle]
83-
pub unsafe extern "aapcs" fn __aeabi_memclr4(s: *mut u8, n: usize) -> *mut u8 {
84-
rlibc::memset(s, 0, n)
85-
}
86-
87-
/// Required by LLVM ... sometimes
88-
#[no_mangle]
89-
pub unsafe extern "aapcs" fn __aeabi_memclr(s: *mut u8, n: usize) -> *mut u8 {
90-
rlibc::memset(s, 0, n)
91-
}
92-
93-
/// Required by LLVM ... sometimes
94-
#[no_mangle]
95-
pub unsafe extern "aapcs" fn __aeabi_memmove8(dest: *mut u8, src: *mut u8, n: usize) {
96-
rlibc::memmove(dest, src, n);
97-
}
98-
99-
/// Required by LLVM ... sometimes
100-
#[no_mangle]
101-
pub unsafe extern "aapcs" fn __aeabi_memmove4(dest: *mut u8, src: *mut u8, n: usize) {
102-
rlibc::memmove(dest, src, n);
103-
}
104-
105-
/// Required by LLVM ... sometimes
106-
#[no_mangle]
107-
pub unsafe extern "aapcs" fn __aeabi_memmove(dest: *mut u8, src: *mut u8, n: usize) {
108-
rlibc::memmove(dest, src, n);
109-
}
110-
111-
/// Required by LLVM ... sometimes
112-
#[no_mangle]
113-
pub unsafe extern "aapcs" fn __aeabi_memcpy8(dest: *mut u8, src: *mut u8, n: usize) {
114-
rlibc::memcpy(dest, src, n);
115-
}
116-
117-
/// Required by LLVM ... sometimes
118-
#[no_mangle]
119-
pub unsafe extern "aapcs" fn __aeabi_memcpy4(dest: *mut u8, src: *mut u8, n: usize) {
120-
rlibc::memcpy(dest, src, n);
121-
}
122-
123-
/// Required by LLVM ... sometimes
124-
#[no_mangle]
125-
pub unsafe extern "aapcs" fn __aeabi_memcpy(dest: *mut u8, src: *mut u8, n: usize) {
126-
rlibc::memcpy(dest, src, n);
127-
}
128-
129-
/// Required by LLVM ... sometimes
130-
#[no_mangle]
131-
pub unsafe extern "aapcs" fn __aeabi_memset8(dest: *mut u8, n: usize, c: i32) {
132-
rlibc::memset(dest, c, n);
133-
}
134-
135-
/// Required by LLVM ... sometimes
136-
#[no_mangle]
137-
pub unsafe extern "aapcs" fn __aeabi_memset4(dest: *mut u8, n: usize, c: i32) {
138-
rlibc::memset(dest, c, n);
139-
}
140-
141-
/// Required by LLVM ... sometimes
142-
#[no_mangle]
143-
pub unsafe extern "aapcs" fn __aeabi_memset(dest: *mut u8, n: usize, c: i32) {
144-
rlibc::memset(dest, c, n);
145-
}
146-
14775
/// Entry point of panic from the libcore crate.
14876
///
14977
/// Required by the compiler.

libs/primer/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ pub mod common;
2525
extern crate spin;
2626
extern crate rlibc;
2727
extern crate linked_list_allocator;
28+
extern crate rustc_builtins;
2829
#[macro_use] extern crate lazy_static;
2930

3031
pub use lm4f120h5qr::systick::delay;

lm4f120.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"target-endian": "little",
1212
"target-pointer-width": "32",
1313
"linker": "arm-none-eabi-gcc",
14-
"no-compiler-rt": false,
14+
"no-compiler-rt": true,
1515
"pre-link-args": [
1616
"-mcpu=cortex-m4", "-mthumb",
1717
"-Tlm4f120.ld"

0 commit comments

Comments
 (0)