Skip to content

Commit f8cf470

Browse files
fslongjinSamuka007
authored andcommitted
chore: 将工具链更新到2024-07-23 (DragonOS-Community#864)
* chore: 将工具链更新到2024-07-23
1 parent 3679c1f commit f8cf470

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

kernel/.cargo/config.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
runner = "bootimage runner"
77

88
[build]
9-
rustflags = ["-Clink-args=-znostart-stop-gc"]
10-
rustdocflags = ["-Clink-args=-znostart-stop-gc"]
9+
# '-Zlinker-features=-lld' 禁用rustlld(20240723),因为它与linkme0.3版本冲突
10+
rustflags = ["-Zlinker-features=-lld"]
11+
rustdocflags = ["-Zlinker-features=-lld"]
1112

1213
[env]

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-
RUSTFLAGS="$(RUSTFLAGS)" cargo +nightly-2024-07-23 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-
RUSTFLAGS="$(RUSTFLAGS)" cargo +nightly-2024-07-23 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-
RUSTFLAGS="$(RUSTFLAGS)" cargo +nightly-2024-07-23 test --workspace --exclude dragonos_kernel
46+
@cargo +nightly-2024-07-23 test --workspace --exclude dragonos_kernel
4747

kernel/src/process/exec.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,9 @@ impl ProcInitInfo {
281281
return Ok(());
282282
}
283283

284-
fn push_str(&self, ustack: &mut UserStack, s: &CString) -> Result<(), SystemError> {
285-
let bytes = s.as_bytes_with_nul();
286-
self.push_slice(ustack, bytes)?;
284+
fn push_str(&self, ustack: &mut UserStack, s: &str) -> Result<(), SystemError> {
285+
self.push_slice(ustack, &[b"\0"])?;
286+
self.push_slice(ustack, s.as_bytes())?;
287287
return Ok(());
288288
}
289289
}

0 commit comments

Comments
 (0)