Trevor Gross 5b1c1fca03 Expose C versions of libm functions in the cb crate
`compiler_builtins` exposes an `extern "C"` version of `libm` routines,
so add the same here. There really isn't much to test here (unless we
later add tests against C `libm` suites), but one nice benefit is this
gives us a library with unmangled names that is easy to `objdump`. In
accordance with that, also update `cb` to be a `staticlib`.

Unfortunately this also means we have to remove it from the workspace,
since Cargo doesn't allow setting `panic = "abort"` for a single crate.
2025-01-12 03:29:40 -05:00

39 lines
772 B
TOML

[package]
name = "cb"
version = "0.1.0"
authors = ["Jorge Aparicio <jorge@japaric.io>"]
edition = "2021"
publish = false
[lib]
crate-type = ["staticlib"]
test = false
bench = false
[features]
default = ["arch", "unstable-float"]
# Copied from `libm`'s root `Cargo.toml`'
unstable-float = []
arch = []
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(arch_enabled)",
"cfg(assert_no_panic)",
"cfg(intrinsics_enabled)",
'cfg(feature, values("checked"))',
'cfg(feature, values("force-soft-floats"))',
'cfg(feature, values("unstable"))',
'cfg(feature, values("unstable-intrinsics"))',
'cfg(feature, values("unstable-public-internals"))',
] }
[profile.dev]
panic = "abort"
[profile.release]
panic = "abort"
codegen-units = 1
lto = "fat"