We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example, this build.rs:
build.rs
fn main() { autocfg::new().emit_sysroot_crate("std"); }
with this main.rs:
main.rs
#[cfg(has_std)] fn print() { println!("Has std"); } #[cfg(not(has_std))] fn print() { println!("Doesn't have std"); } fn main() { print(); }
Cargo.toml:
Cargo.toml
[build-dependencies.autocfg] version = "1"
Will print "Doesn't have std" when compiled with cg_gcc.
Replacing the code for emit_ir in cg_gcc with:
emit_ir
let out = cgcx.output_filenames.temp_path(OutputType::LlvmAssembly, module_name); std::fs::write(out, "").expect("write file");
doesn't seem enough to fix this issue.
I'm not sure how to get logs from autocfg.
autocfg
The text was updated successfully, but these errors were encountered:
Fixed by #437.
Sorry, something went wrong.
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
For example, this
build.rs
:with this
main.rs
:Cargo.toml
:Will print "Doesn't have std" when compiled with cg_gcc.
Replacing the code for
emit_ir
in cg_gcc with:doesn't seem enough to fix this issue.
I'm not sure how to get logs from
autocfg
.The text was updated successfully, but these errors were encountered: