You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we select the bindings that we want, we only check target_arch and target_os. If those two parameters are the only things determining the value of the bindings, then we can simplify this check in build.rs:
let supported_platforms = vec!["x86_64-unknown-linux-gnu".to_string(),
"aarch64-unknown-linux-gnu".to_string(),
"armv7-unknown-linux-gnueabi".to_string(),
"armv7-unknown-linux-gnueabihf".to_string(),
"arm-unknown-linux-gnueabi".to_string(),
];let target = std::env::var("TARGET").unwrap();// check if target is in the list of supported ones or panic with nice messageif !supported_platforms.contains(&target){panic!("Compilation target ({}) is not part of the supported targets ({:?}). Please compile with the \"generate-bindings\" feature or add support for your platform :)", target, supported_platforms);}
by parsing the target triple as <arch><sub>-<vendor>-<sys>-<abi> (see here) and only checking for the tuple (arch, os).
That would allow much more crates to be used with the generated bindings.
edit: exact same issue on the tss-esapi crate.
The text was updated successfully, but these errors were encountered:
I am thinking, should we remove that check altogether? I think linking will fail without a harder to decipher message but maybe we can do something about that. That would solve this.
It will fail with a large list of errors that won't be helpful at all - I've already seen it happen on the TSS crate (because of the feature = armv7 instead of arm mistake) :) I think the proposed solution from the top comment is best - checking for (arch, os) tuple instead. We're not going to have an unbounded list of supported triples anyway.
When we select the bindings that we want, we only check
target_arch
andtarget_os
. If those two parameters are the only things determining the value of the bindings, then we can simplify this check inbuild.rs
:by parsing the target triple as
<arch><sub>-<vendor>-<sys>-<abi>
(see here) and only checking for the tuple (arch, os).That would allow much more crates to be used with the generated bindings.
edit: exact same issue on the
tss-esapi
crate.The text was updated successfully, but these errors were encountered: