We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It seems like some crates can have an empty link line, which causes a panic when determining the static libs here
cargo-c/src/build.rs
Line 1158 in f873c83
I assume static libs should just be empty in that case, and the following at least builds my case.
diff --git a/src/build.rs b/src/build.rs index 273efc1..59b673c 100644 --- a/src/build.rs +++ b/src/build.rs @@ -1160,7 +1160,7 @@ pub fn cbuild( .unwrap() .values() .next() - .unwrap() + .map_or("", |s| s) .to_string() }; let capi_config = &cpkg.capi_config;
The following example reproduces the issue for me using rust 1.80.1 and cargo-c 0.10.3+cargo-0.81.0 on Ubuntu 22.04
Cargo.toml
[package] name = "testlib" [features] capi = [] [package.metadata.capi.library] rustflags = "-Cpanic=abort"
lib.rs
#![no_std] #[cfg(feature="capi")] mod capi { #[panic_handler] fn panic_handler(_info: &core::panic::PanicInfo) -> ! { loop {} } #[no_mangle] extern "C" fn example() -> u32 { 0 } }
The text was updated successfully, but these errors were encountered:
If you can send a PR I'd land it before making the next release, sorry for the belated reply but sometimes github messages get lost in the mailbox :/
Sorry, something went wrong.
Handle unwrap when link line is empty
1aed155
nostd crates do not provide a link-line, return an empty one. Fixes lu-zero#394.
3a8b13d
No branches or pull requests
It seems like some crates can have an empty link line, which causes a panic when determining the static libs here
cargo-c/src/build.rs
Line 1158 in f873c83
I assume static libs should just be empty in that case, and the following at least builds my case.
The following example reproduces the issue for me using rust 1.80.1 and cargo-c 0.10.3+cargo-0.81.0 on Ubuntu 22.04
Cargo.toml
lib.rs
The text was updated successfully, but these errors were encountered: