Commit Graph

85 Commits

Author SHA1 Message Date
github-actions[bot]
0d63b99799 chore: release 2025-05-06 19:37:58 -04:00
ELginas
5032002c2f docs: fix typo in Cargo.toml
Initially introduced in 63ccaf11f08fb5d0b39cc33884c5a1a63f547ace

Signed-off-by: ELginas <gintaras.z123@yahoo.com>
2025-05-04 23:35:00 -04:00
github-actions[bot]
16150ebb31 chore: release 2025-05-04 18:52:58 -04:00
Trevor Gross
8d789ea8f1 Resolve unnecessary_transmutes lints
These appeared in a later nightly. In compiler-builtins we can apply the
suggestion, but in `libm` we need to ignore them since `fx::from_bits`
is not `const` at the MSRV.

`clippy::uninlined_format_args` also seems to have gotten stricter, so
fix those here.
2025-04-29 18:15:02 -04:00
Trevor Gross
975617e8d4 Warn on unsafe_op_in_unsafe_fn by default
Edition 2024 requires that we avoid this. There is a lot of code that
will need to be adjusted, so start the process here with a warning that
will show up in CI.
2025-04-23 15:27:05 -04:00
Trevor Gross
aec649faae chore: Combine CHANGELOG files for compiler-builtins
This unintentionally got split when compiler-builtins was moved to a
subdirectory.
2025-04-22 01:34:46 -04:00
github-actions[bot]
1fa9d0fce3 chore: release builtins 0.1.156 and libm 0.2.12 2025-04-22 01:34:46 -04:00
Trevor Gross
a8652953e4 Rename the public-test-deps feature to unstable-public-internals
`compiler-builtins` uses `public-test-deps`, `libm` uses
`unstable-public-internals`. Consolidate these under the `libm` name.

Once compiler-builtins is no longer published, this feature can probably
be dropped.

Also switch to `dep:` syntax for features that enable dependencies.
2025-04-21 23:24:52 -04:00
Trevor Gross
913796c1c5 Fix compiler-builtins publish
compiler-builtins currently wouldn't publish correctly because of a
relative path to `libm` that doesn't get included in the package. Fix
this by simlinking `libm` to within the `compiler-builtins` directory.

Also symlink LICENSE.txt which lets us drop the `include` array in
Cargo.toml. LICENSE.txt and compiler-rt were not being included anyway,
since Cargo silently drops items that are not within the crate
directory.
2025-04-21 06:16:12 -04:00
Trevor Gross
94448a6ff6 Update README and CONTRIBUTING for the new repository layout 2025-04-21 06:16:12 -04:00
Trevor Gross
8ce02e8ef5 Move README.md to compiler-builtins, CONTRIBUTING.md to root
Do this in a commit so git tracks the move; a new README will be
introduced in the root, and CONTRIBUTING will be updated to apply to
both crates.
2025-04-21 06:16:12 -04:00
Patryk Wychowaniec
e0d07241d0 avr: Provide abort() 2025-04-21 03:02:24 -04:00
Trevor Gross
97ddaca356 Remove unsafe from naked_asm! blocks
This was changed in a recent nightly so the unsafety is only in the
attribute, `#[unsafe(naked)]`.
2025-04-21 02:45:06 -04:00
Trevor Gross
0d0d317242 Enable icount benchmarks in CI 2025-04-20 00:58:50 -04:00
Trevor Gross
a48de6950c Move builtins-test-intrinsics out of the workspace
This crate doesn't need to be a default member since it requires the
opposite settings from everything else. Exclude it from the workspace
and run it only when explicitly requested.

This also makes `cargo t --no-default-features` work without additional
qualifiers. `--no-default-features` still needs to be passed to ensure
`#![compiler_builtins]` does not get set.

compiler-builtins needs doctests disabled in order for everything to
work correctly, since this causes an error running rustdoc that is
unrelated to features (our `compiler_builtins` is getting into the crate
graph before that from the sysroot, but `#![compiler_builtins]` is not
set).

We can also remove `test = false` and `doctest = false` in
`builtins-test` since these no longer cause issues. This is unlikely to
be used but it is better to not quietly skip if anything ever gets added
by accident.
2025-04-19 22:30:58 -04:00
Trevor Gross
8d70be87e6 Run cargo fmt on all projects
Apply the same formatting rules to both `libm` and `compiler-builtins`.
2025-04-19 19:05:49 -04:00
Trevor Gross
8b8bd8a0fd libm: Flatten the libm/libm directory 2025-04-19 17:20:24 -04:00
Trevor Gross
1af955be9a Update path to libm after the merge 2025-04-19 20:18:22 +00:00
Trevor Gross
1947f328a7 Remove the libm submodule 2025-04-19 20:16:40 +00:00
Trevor Gross
92b1e8454d Rename testcrate to builtins-test
The repo will soon have `libm` as a top-level crate, so make it clear
that this is only the test crate for `compiler-builtins`.
2025-04-18 21:14:41 -04:00
github-actions[bot]
3ea9f849d5 chore: release v0.1.155 2025-04-17 14:04:21 -05:00
Folkert de Vries
ec74a38b25 use #[cfg(bootstrap)] for rustc sync 2025-04-17 13:56:58 -05:00
Trevor Gross
9272584533 Replace the bl! macro with asm_sym
`bl!` is being used to add a leading underscore on Apple targets.
`asm_sym` has been around since 2022 and handles platform-specific
symbol names automatically, so make use of this instead.

I have verified that `armv7s-apple-ios` still builds correctly.
2025-04-17 04:02:54 -05:00
Paul Sbarra
7fb882c3fd avr: __udivmod(h|q)i4 2025-04-16 17:35:44 -05:00
github-actions[bot]
377b08cc29 chore: release v0.1.154 2025-04-16 13:32:04 -05:00
Folkert de Vries
b8083bd87d turn #[naked] into an unsafe attribute 2025-04-16 13:23:04 -05:00
github-actions[bot]
73a04443bd chore: release v0.1.153 2025-04-09 15:33:43 -05:00
Trevor Gross
571a3dce9e Update the libm submodule
Includes [1] and [2], which should resolve problems cg_gcc has using
scalar math operations as a fallback for vector operations.

[1]: https://github.com/rust-lang/libm/pull/459
[2]: https://github.com/rust-lang/libm/pull/534
2025-04-09 12:51:58 -05:00
Trevor Gross
87595c5d82 Remove a mention of force-soft-float in build.rs
`libm` no longer uses this directly in `cfg`, it is only for setting
other configuration in the `libm` `build.rs`. Clean up this
configuration in `compiler-builtins` since it is unused.
2025-04-08 21:49:25 -05:00
Trevor Gross
9b8ccf67c6 Revert "Disable f16 on AArch64 without the neon feature"
The LLVM issue [1] was resolved and the fix was synced to rust-lang/rust
in [2].

This reverts commit 5cf417a9e92bb48e4e55756a645826fd167b9f3a.

[1]: https://github.com/llvm/llvm-project/issues/129394
[2]: https://github.com/rust-lang/rust/pull/138695
2025-04-02 14:27:06 -05:00
Patryk Wychowaniec
30c128006a avr: Skip No More! 2025-03-23 19:36:12 -05:00
Ralf Jung
5cf993880a copy_misaligned_words: avoid out-of-bounds accesses (#799)
* copy_misaligned_words: avoid out-of-bounds accesses
* add test to make Miri able to detect OOB in memmove
* run Miri on CI
2025-03-22 05:36:40 +00:00
github-actions[bot]
a0d40f287a chore: release v0.1.152 2025-03-19 21:10:16 -05:00
beetrees
fc1b87da4a Remove use of atomic_load_unordered and undefined behaviour from arm_linux.rs 2025-03-19 21:02:14 -05:00
Trevor Gross
683485cda2 Switch repository layout to use a virtual manifest
The current setup has the `Cargo.toml` for `compiler-builtins` at the
repository root, which means all support crates and other files are
located within the package root. This works for now but is not the
cleanest setup since files that should or shouldn't be included in the
package need to be configured in `Cargo.toml`. If we eventually merge
`libm` development into this repository, it would be nice to make this
separation more straightforward.

Begin cleaning things up by moving the crate source to a new
`compiler-builtins` directory and adding a virtual manifest. For now the
`libm` submodule is also moved, but in the future it can likely move
back to the top level (ideally `compiler-builtins/src` would contain a
symlink to `libm/src/math`, but unfortunately it seems like Cargo does
not like something about the submodule + symlink combination).
2025-03-19 00:49:34 -05:00