From cd5dd17a99de776a2350a7042a445b75f38b3708 Mon Sep 17 00:00:00 2001 From: Philipp Oppermann Date: Mon, 12 Aug 2019 19:23:57 +0200 Subject: [PATCH] Clarify that panic-strategy option is required in target json The Cargo.toml option does not apply to the core library compiled by cargo-xbuild. --- .../second-edition/posts/02-minimal-rust-kernel/index.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md b/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md index b36c091b..53bf8b9d 100644 --- a/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md +++ b/blog/content/second-edition/posts/02-minimal-rust-kernel/index.md @@ -161,6 +161,8 @@ Instead of using the platform's default linker (which might not support Linux ta This setting specifies that the target doesn't support [stack unwinding] on panic, so instead the program should abort directly. This has the same effect as the `panic = "abort"` option in our Cargo.toml, so we can remove it from there. +(Note that in contrast to the Cargo.toml option, this target option also applies when we recompile the `core` library later in this post. So be sure to add this option, even if you prefer to keep the Cargo.toml option.) + [stack unwinding]: http://www.bogotobogo.com/cplusplus/stackunwinding.php ```json