Skip to content

rust: prevent implicit libc calls with LLVM 23 - #6

Merged
ADevWithAnIdea merged 1 commit into
mainfrom
PR_rust_1.99_fix
Oct 7, 2026
Merged

ADevWithAnIdea merged 1 commit into
mainfrom
PR_rust_1.99_fix

Conversation

@ADevWithAnIdea

Copy link
Copy Markdown
Member

Rust 1.99 uses LLVM 23, which infers the default wchar_t width when the module omits wchar_size metadata. This allows LLVM to replace the ADT offset scan with a wcslen call that is not provided by libc on macOS.

Mark the freestanding Rust crate with no_builtins to prevent these substitutions.

Rust 1.99 uses LLVM 23, which infers the default wchar_t width when the module omits wchar_size metadata. This allows LLVM to replace the ADT offset scan with a wcslen call that the bootloader does not provide.

Mark the freestanding Rust crate with no_builtins to prevent these substitutions while preserving normal host tests.

Signed-off-by: Cody Ho <codyho@stanford.edu>
@ADevWithAnIdea
ADevWithAnIdea merged commit 08f691e into main Oct 7, 2026
5 of 6 checks passed
@ADevWithAnIdea
ADevWithAnIdea deleted the PR_rust_1.99_fix branch October 7, 2026 23:52
RyanTheTide pushed a commit to aurora-silicon/aura that referenced this pull request Oct 29, 2026
Rust 1.99 uses LLVM 23, which infers the default wchar_t width when the
module omits wchar_size metadata. This allows LLVM to replace the ADT
offset scan with a wcslen call that the bootloader does not provide.

Mark the freestanding Rust crate with no_builtins to prevent these
substitutions while preserving normal host tests. The file now carries
GPL-2.0-only contributions, so its SPDX line becomes
MIT AND GPL-2.0-only.

Signed-off-by: Cody Ho <codyho@stanford.edu>
(cherry picked from commit 08f691e951e6c3284f9b3bc0fb058e3c4dc06f6f)
Link: GravityLinux/bootloader#6
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant