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? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/apache/incubator-teaclave-sgx-sdk/issues/231#issuecomment-624038483
