You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@teaclave.apache.org by GitBox <gi...@apache.org> on 2020/05/05 12:56:00 UTC

[GitHub] [incubator-teaclave-sgx-sdk] volcano0dr commented on issue #231: rustc_private error when compiling crates.io dependencies with Xargo configuration

volcano0dr commented on issue #231:
URL: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/231#issuecomment-624038483


   The issue is because crates in SGX custom sysroot do not declare # [staged_api] and # [stable] features. If set the -Z force-unstable-if-unmarked flag, rustc will automatically mark rustc_private features, so setting the -Z force-unstable-if-unmarked flag will not compile errors when building crates.
   [https://github.com/rust-lang/rustc-dev-guide/blob/master/src/stability.md](url)
   
   Xargo uses the -Z force-unstable-if-unmarked flag when building a custom sysroot, but this flag is not set when building the top-level crate, so there will be no compilation errors when building custom sysroot.
   
   There are two ways to solve this problem:
   1: Use the -Z force-unstable-if-unmarked flag;
   2: Add #[staged_api] and #[stable] / #[unstable] features to each crate in SGX custom sysroot, and each pub attribute Item also needs to be declared # [stable] / # [unstable] features;
   
   Which solution would be better, any idea?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@teaclave.apache.org
For additional commands, e-mail: notifications-help@teaclave.apache.org