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
There isautocfg can't determine target details for custom target-spec (json file).
Error:
[num-traits 0.2.19] error: Error loading target specification: Could not find specification for target "my-custom-target". Run `rustc --print target-list` for a list of built-in targets
[num-traits 0.2.19] warning: autocfg could not probe for `std`
The text was updated successfully, but these errors were encountered:
As an ugly workaround I could suggest something like this:
// save original to restore later:let orig_target = std::env::var_os("TARGET")?;// choose one of "override" or "by cargo":let target = std::env::var_os("AUTOCONF_TARGET").or_else(|| env::var_os("TARGET"))?;// override target for current use for autocfg:
std::env::set_var("TARGET", target);letmut ac = autocfg::new();
ac.emit_expression_cfg("1f64.total_cmp(&2f64)","has_total_cmp");// 1.62// do some needed...
autocfg::rerun_path("build.rs");// restore original target for future use:
std::env::set_var("TARGET", orig_target);
And so we can override the target passed to autoconf with env AUTOCONF_TARGET.
There is
autocfg
can't determine target details for custom target-spec (json file).Error:
The text was updated successfully, but these errors were encountered: