Skip to content

Commit

Permalink
Workaround for rust-lang/cargo#7359
Browse files Browse the repository at this point in the history
Can't figure out how to implement panic enough to satisfy cargo, but
this works.
  • Loading branch information
smuun committed Nov 24, 2022
1 parent 545310a commit b9f6189
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 12 deletions.
6 changes: 0 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,3 @@ spin = "0.9.4"
[dependencies.lazy_static]
version = "1.4.0"
features = ["spin_no_std"]

[profile.dev]
panic = "abort"

[profile.release]
panic = "abort"
1 change: 1 addition & 0 deletions arm-none-eabihf.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"-march=armv6"
]
},
"panic-strategy": "abort",
"features": "+strict-align,+v6,+vfp2,-d32",
"data-layout": "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64",
"executables": true,
Expand Down
6 changes: 1 addition & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,10 @@ Boot complete. Executing in kernel_main.
}
}

mod test_runner{
use crate::print;
use crate::println;
#[cfg(test)]
fn test_runner(tests: &[&dyn Fn()]) {
println!("Running {} tests", tests.len());
for test in tests {
test();
}
}
}
}
2 changes: 1 addition & 1 deletion target/.rustc_info.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"rustc_fingerprint":17675947282857480455,"outputs":{"13284956250943708899":{"success":false,"status":"exit status: 1","code":1,"stdout":"___\nlib___.rlib\nlib___.a\n","stderr":"error: `-Csplit-debuginfo=packed` is unstable on this platform\n\nwarning: dropping unsupported crate type `dylib` for target `arm-none-eabihf-16636484391736983199`\n\nwarning: dropping unsupported crate type `cdylib` for target `arm-none-eabihf-16636484391736983199`\n\nwarning: dropping unsupported crate type `proc-macro` for target `arm-none-eabihf-16636484391736983199`\n\nerror: aborting due to previous error; 3 warnings emitted\n\n"},"3182114158912698559":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.a\n/home/silas/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"arm\"\ntarget_endian=\"little\"\ntarget_env=\"eabi\"\ntarget_feature=\"llvm14-builtins-abi\"\ntarget_feature=\"v5te\"\ntarget_feature=\"v6\"\ntarget_feature=\"vfp2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"32\"\ntarget_vendor=\"unknown\"\n","stderr":"warning: dropping unsupported crate type `dylib` for target `arm-none-eabihf-16636484391736983199`\n\nwarning: dropping unsupported crate type `cdylib` for target `arm-none-eabihf-16636484391736983199`\n\nwarning: dropping unsupported crate type `proc-macro` for target `arm-none-eabihf-16636484391736983199`\n\nwarning: 3 warnings emitted\n\n"},"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.67.0-nightly (e631891f7 2022-11-13)\nbinary: rustc\ncommit-hash: e631891f7ad40eac3ef58ec3c2b57ecd81e40615\ncommit-date: 2022-11-13\nhost: x86_64-unknown-linux-gnu\nrelease: 1.67.0-nightly\nLLVM version: 15.0.4\n","stderr":""},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/silas/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"llvm14-builtins-abi\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}
{"rustc_fingerprint":17675947282857480455,"outputs":{"15697416045686424142":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n","stderr":""},"11140248036936589153":{"success":false,"status":"exit status: 1","code":1,"stdout":"___\nlib___.rlib\nlib___.a\n","stderr":"error: `-Csplit-debuginfo=packed` is unstable on this platform\n\nwarning: dropping unsupported crate type `dylib` for target `arm-none-eabihf-940369459891523199`\n\nwarning: dropping unsupported crate type `cdylib` for target `arm-none-eabihf-940369459891523199`\n\nwarning: dropping unsupported crate type `proc-macro` for target `arm-none-eabihf-940369459891523199`\n\nerror: aborting due to previous error; 3 warnings emitted\n\n"},"4614504638168534921":{"success":true,"status":"","code":0,"stdout":"rustc 1.67.0-nightly (e631891f7 2022-11-13)\nbinary: rustc\ncommit-hash: e631891f7ad40eac3ef58ec3c2b57ecd81e40615\ncommit-date: 2022-11-13\nhost: x86_64-unknown-linux-gnu\nrelease: 1.67.0-nightly\nLLVM version: 15.0.4\n","stderr":""},"10593233515392878100":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.a\n/home/silas/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"abort\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"arm\"\ntarget_endian=\"little\"\ntarget_env=\"eabi\"\ntarget_feature=\"llvm14-builtins-abi\"\ntarget_feature=\"v5te\"\ntarget_feature=\"v6\"\ntarget_feature=\"vfp2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"32\"\ntarget_vendor=\"unknown\"\n","stderr":"warning: dropping unsupported crate type `dylib` for target `arm-none-eabihf-940369459891523199`\n\nwarning: dropping unsupported crate type `cdylib` for target `arm-none-eabihf-940369459891523199`\n\nwarning: dropping unsupported crate type `proc-macro` for target `arm-none-eabihf-940369459891523199`\n\nwarning: 3 warnings emitted\n\n"},"10376369925670944939":{"success":true,"status":"","code":0,"stdout":"___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/silas/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_abi=\"\"\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"llvm14-builtins-abi\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n","stderr":""}},"successes":{}}

0 comments on commit b9f6189

Please sign in to comment.