dd: enable WASI support for StdinFile on nightly#12264
Conversation
|
GNU testsuite comparison: |
| // For the full copyright and license information, please view the LICENSE | ||
| // file that was distributed with this source code. | ||
|
|
||
| fn main() { |
There was a problem hiding this comment.
wasi-ext is not yet stabilised, we need to detect if we are compiling with nightly
There was a problem hiding this comment.
Can we use cfg_aliases to avoid new dep?
| fn main() { | ||
| let is_nightly = | ||
| rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly; | ||
| rsconf::declare_cfg("nightly", is_nightly); |
There was a problem hiding this comment.
Is RUSTC_BOOTSTRAP=1 supported?
There was a problem hiding this comment.
There is no way to detect whether a certain unstable feature is enabled; we have to check for nightly compiler. So RUSTC_BOOTSTRAP=1 won't be supported.
There was a problem hiding this comment.
I don't know, I'm open to suggestions.
| let is_nightly = | ||
| rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly; | ||
| rsconf::declare_cfg("nightly", is_nightly); |
There was a problem hiding this comment.
| let is_nightly = | |
| rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly; | |
| rsconf::declare_cfg("nightly", is_nightly); | |
| println!("cargo:rustc-check-cfg=cfg(nightly)"); | |
| if rustc_version::version_meta().unwrap().channel == rustc_version::Channel::Nightly { | |
| println!("cargo:rustc-cfg=nightly"); | |
| } |
I guess we can lose the rsconf build dependency if that's an issue?
There was a problem hiding this comment.
Yes. Because we can reduce build time.
Follow-up to #12258
wasi-extis not yet stabilised, so introduce a cfg for rustc nightly.