Skip to content

Commit d66e403

Browse files
committed
chore: 将工具链更新到2024-07-23
1 parent 634349e commit d66e403

File tree

150 files changed

+236
-199
lines changed

Some content is hidden

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

150 files changed

+236
-199
lines changed

.github/workflows/cache-toolchain.yml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,17 +51,17 @@ jobs:
5151
5252
cargo install cargo-binutils
5353
rustup toolchain install nightly-x86_64-unknown-linux-gnu
54-
rustup toolchain install nightly-2023-01-21-x86_64-unknown-linux-gnu
54+
rustup toolchain install nightly-2024-07-23-x86_64-unknown-linux-gnu
5555
rustup toolchain install nightly-2023-08-15-x86_64-unknown-linux-gnu
56-
rustup component add rust-src --toolchain nightly-2023-01-21-x86_64-unknown-linux-gnu
56+
rustup component add rust-src --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
5757
rustup component add rust-src --toolchain nightly-2023-08-15-x86_64-unknown-linux-gnu
58-
rustup target add x86_64-unknown-none --toolchain nightly-2023-01-21-x86_64-unknown-linux-gnu
58+
rustup target add x86_64-unknown-none --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
5959
rustup target add x86_64-unknown-none --toolchain nightly-2023-08-15-x86_64-unknown-linux-gnu
6060
61-
rustup toolchain install nightly-2023-01-21-riscv64gc-unknown-linux-gnu --force-non-host
61+
rustup toolchain install nightly-2024-07-23-riscv64gc-unknown-linux-gnu --force-non-host
6262
rustup toolchain install nightly-2023-08-15-riscv64gc-unknown-linux-gnu --force-non-host
63-
rustup target add riscv64gc-unknown-none-elf --toolchain nightly-2023-01-21-riscv64gc-unknown-linux-gnu
64-
rustup target add riscv64imac-unknown-none-elf --toolchain nightly-2023-01-21-riscv64gc-unknown-linux-gnu
63+
rustup target add riscv64gc-unknown-none-elf --toolchain nightly-2024-07-23-riscv64gc-unknown-linux-gnu
64+
rustup target add riscv64imac-unknown-none-elf --toolchain nightly-2024-07-23-riscv64gc-unknown-linux-gnu
6565
rustup target add riscv64gc-unknown-none-elf --toolchain nightly-2023-08-15-riscv64gc-unknown-linux-gnu
6666
rustup target add riscv64imac-unknown-none-elf --toolchain nightly-2023-08-15-riscv64gc-unknown-linux-gnu
6767
@@ -71,9 +71,9 @@ jobs:
7171
7272
rustup component add rustfmt
7373
rustup component add rustfmt --toolchain nightly-x86_64-unknown-linux-gnu
74-
rustup component add rustfmt --toolchain nightly-2023-01-21-x86_64-unknown-linux-gnu
74+
rustup component add rustfmt --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
7575
rustup component add rustfmt --toolchain nightly-2023-08-15-x86_64-unknown-linux-gnu
76-
rustup component add rustfmt --toolchain nightly-2023-01-21-riscv64gc-unknown-linux-gnu
76+
rustup component add rustfmt --toolchain nightly-2024-07-23-riscv64gc-unknown-linux-gnu
7777
rustup component add rustfmt --toolchain nightly-2023-08-15-riscv64gc-unknown-linux-gnu
7878
7979
rustup default nightly
@@ -86,6 +86,9 @@ jobs:
8686
rustup toolchain install ${userapp_musl_toolchain}
8787
rustup component add --toolchain ${userapp_musl_toolchain} rust-src
8888
rustup target add --toolchain ${userapp_musl_toolchain} x86_64-unknown-linux-musl
89+
90+
rustup target add x86_64-unknown-linux-musl --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
91+
rustup component add rust-src --toolchain nightly-2024-07-23-x86_64-unknown-linux-gnu
8992
9093
9194

build-scripts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ fmt:
55
clean:
66
@cargo clean
77
check:
8-
@cargo +nightly-2023-08-15 check --workspace $(CARGO_ZBUILD) --message-format=json
8+
@cargo +nightly-2024-07-23 check --workspace $(CARGO_ZBUILD) --message-format=json

build-scripts/kernel_build/src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![feature(cfg_target_abi)]
2-
31
#[macro_use]
42
extern crate lazy_static;
53
extern crate cc;

kernel/.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,9 @@
55
[target.'cfg(target_os = "none")']
66
runner = "bootimage runner"
77

8+
[build]
9+
# '-Zlinker-features=-lld' 禁用rustlld(20240723),因为它与linkme0.3版本冲突
10+
rustflags = ["-Zlinker-features=-lld"]
11+
rustdocflags = ["-Zlinker-features=-lld"]
12+
813
[env]

kernel/Cargo.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,18 @@ crate-type = ["staticlib"]
1212
[workspace]
1313
members = [
1414
"crates/*",
15-
"src/libs/intertrait"
1615
]
1716

1817
[features]
19-
default = ["backtrace", "kvm"]
18+
default = ["backtrace", "kvm", "fatfs", "fatfs-secure"]
2019
# 内核栈回溯
2120
backtrace = []
2221
# kvm
2322
kvm = []
2423

24+
fatfs = []
25+
fatfs-secure = ["fatfs"]
26+
2527

2628
# 运行时依赖项
2729
[dependencies]
@@ -37,10 +39,10 @@ driver_base_macros = { "path" = "crates/driver_base_macros" }
3739
elf = { version = "=0.7.2", default-features = false }
3840
hashbrown = "=0.13.2"
3941
ida = { path = "src/libs/ida" }
40-
intertrait = { path = "src/libs/intertrait" }
42+
intertrait = { path = "crates/intertrait" }
4143
kdepends = { path = "crates/kdepends" }
4244
klog_types = { path = "crates/klog_types" }
43-
linkme = "=0.2"
45+
linkme = "=0.3.27"
4446
num = { version = "=0.4.0", default-features = false }
4547
num-derive = "=0.3"
4648
num-traits = { git = "https://git.mirrors.dragonos.org.cn/DragonOS-Community/num-traits.git", rev="1597c1c", default-features = false }

kernel/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ check: ECHO
3636
# @echo "Checking kernel... ARCH=$(ARCH)"
3737
# @exit 1
3838
ifeq ($(ARCH), x86_64)
39-
@cargo +nightly-2023-08-15 check --workspace $(CARGO_ZBUILD) --message-format=json --target ./src/$(TARGET_JSON)
39+
@cargo +nightly-2024-07-23 check --workspace $(CARGO_ZBUILD) --message-format=json --target ./src/$(TARGET_JSON)
4040
else ifeq ($(ARCH), riscv64)
41-
@cargo +nightly-2023-08-15 check --workspace $(CARGO_ZBUILD) --message-format=json --target $(TARGET_JSON)
41+
@cargo +nightly-2024-07-23 check --workspace $(CARGO_ZBUILD) --message-format=json --target $(TARGET_JSON)
4242
endif
4343

4444
test:
4545
# 测试内核库
46-
@cargo +nightly-2023-08-15 test --workspace --exclude dragonos_kernel
46+
@cargo +nightly-2024-07-23 test --workspace --exclude dragonos_kernel
4747

kernel/crates/bitmap/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#![feature(core_intrinsics)]
33
#![allow(incomplete_features)] // for const generics
44
#![feature(generic_const_exprs)]
5+
#![allow(internal_features)]
56
#![allow(clippy::needless_return)]
67

78
#[macro_use]

kernel/crates/bitmap/src/static_bitmap.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ where
1414
core: BitMapCore<usize>,
1515
}
1616

17+
impl<const N: usize> Default for StaticBitmap<N>
18+
where
19+
[(); (N + usize::BITS as usize - 1) / (usize::BITS as usize)]:,
20+
{
21+
fn default() -> Self {
22+
Self::new()
23+
}
24+
}
25+
1726
impl<const N: usize> StaticBitmap<N>
1827
where
1928
[(); (N + usize::BITS as usize - 1) / (usize::BITS as usize)]:,

kernel/crates/bitmap/src/traits.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,6 @@ macro_rules! bitops_for {
182182
}
183183
}
184184

185-
#[cfg(feature = "std")]
186-
fn to_hex(bits: &Self) -> String {
187-
format!("{:x}", bits)
188-
}
189-
190185
#[inline]
191186
fn bit_size() -> usize {
192187
<$target>::BITS as usize

0 commit comments

Comments
 (0)