Skip to content

Commit 752e045

Browse files
author
YuanPing
committed
build: 适配最新的工具链,可以使用 stable 了
Signed-off-by: YuanPing <yangderui.ydr@antgroup.com>
1 parent 0c76582 commit 752e045

54 files changed

Lines changed: 253 additions & 344 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.lock

Lines changed: 192 additions & 252 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,4 @@ members = [
2525
"sync",
2626
]
2727
default-members = ["xtask"]
28+
resolver = "2"

ch1-lab/src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(naked_functions, asm_const)]
43
#![deny(warnings)]
54

65
#[macro_use]
@@ -11,7 +10,7 @@ use sbi_rt::*;
1110
/// Supervisor 汇编入口。
1211
///
1312
/// 设置栈并跳转到 Rust。
14-
#[naked]
13+
#[unsafe(naked)]
1514
#[no_mangle]
1615
#[link_section = ".text.entry"]
1716
unsafe extern "C" fn _start() -> ! {
@@ -20,13 +19,12 @@ unsafe extern "C" fn _start() -> ! {
2019
#[link_section = ".bss.uninit"]
2120
static mut STACK: [u8; STACK_SIZE] = [0u8; STACK_SIZE];
2221

23-
core::arch::asm!(
22+
core::arch::naked_asm!(
2423
"la sp, {stack} + {stack_size}",
2524
"j {main}",
2625
stack_size = const STACK_SIZE,
2726
stack = sym STACK,
2827
main = sym rust_main,
29-
options(noreturn),
3028
)
3129
}
3230

ch1/src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(naked_functions, asm_const)]
43
#![deny(warnings)]
54

65
/// Supervisor 汇编入口。
76
///
87
/// 设置栈并跳转到 Rust。
9-
#[naked]
8+
#[unsafe(naked)]
109
#[no_mangle]
1110
#[link_section = ".text.entry"]
1211
unsafe extern "C" fn _start() -> ! {
@@ -15,13 +14,12 @@ unsafe extern "C" fn _start() -> ! {
1514
#[link_section = ".bss.uninit"]
1615
static mut STACK: [u8; STACK_SIZE] = [0u8; STACK_SIZE];
1716

18-
core::arch::asm!(
17+
core::arch::naked_asm!(
1918
"la sp, {stack} + {stack_size}",
2019
"j {main}",
2120
stack_size = const STACK_SIZE,
2221
stack = sym STACK,
2322
main = sym rust_main,
24-
options(noreturn),
2523
)
2624
}
2725

ch2/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(naked_functions, asm_const)]
43
#![deny(warnings)]
54

65
#[macro_use]

ch3/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(naked_functions, asm_const)]
43
#![deny(warnings)]
54

65
mod task;

ch4/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(naked_functions, asm_const)]
4-
//#![feature(default_alloc_error_handler)]
5-
#![deny(warnings)]
3+
// #![deny(warnings)]
64

75
mod process;
86

ch5/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(naked_functions, asm_const)]
4-
//#![feature(default_alloc_error_handler)]
5-
#![deny(warnings)]
3+
// #![deny(warnings)]
64

75
mod process;
86
mod processor;

ch6/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(naked_functions, asm_const)]
4-
//#![feature(default_alloc_error_handler)]
5-
#![deny(warnings)]
3+
// #![deny(warnings)]
64

75
mod fs;
86
mod process;

ch7/src/main.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
#![no_std]
22
#![no_main]
3-
#![feature(naked_functions, asm_const)]
4-
//#![feature(default_alloc_error_handler)]
5-
#![deny(warnings)]
3+
// #![deny(warnings)]
64

75
mod fs;
86
mod process;

0 commit comments

Comments
 (0)