alnyan/yggdrasil: build as std dependency

This commit is contained in:
Mark Poliakov 2024-03-16 17:55:49 +02:00
parent f21d751944
commit ace5825d96
2 changed files with 11 additions and 0 deletions

View File

@ -15,6 +15,8 @@ exclude = ["/ci/", "/.github/workflows/"]
[features]
default = []
checked = []
# This tells the compiler to assume that a Nightly toolchain is being used and
# that it should activate any useful Nightly things accordingly.
unstable = []
@ -23,12 +25,18 @@ unstable = []
# musl libc.
musl-reference-tests = ['rand']
rustc-dep-of-std = ["core", "compiler_builtins/rustc-dep-of-std"]
[workspace]
members = [
"crates/compiler-builtins-smoke-test",
"crates/libm-bench",
]
[dependencies]
core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" }
compiler_builtins = { version = "0.1", optional = true }
[dev-dependencies]
no-panic = "0.1.8"

View File

@ -6,6 +6,9 @@ fn main() {
#[cfg(feature = "musl-reference-tests")]
musl_reference_tests::generate();
println!("cargo:rustc-check-cfg=cfg(assert_no_panic)");
println!("cargo:rustc-check-cfg=cfg(rustfmt)");
if !cfg!(feature = "checked") {
let lvl = env::var("OPT_LEVEL").unwrap();
if lvl != "0" {