Upgrade to Rust 1.96.0 and adapt BlueOS targets for the new toolchain - #12
Merged
Merged
Conversation
Adapted to Rust 1.96 when resolving conflicts: - Migrate cfg_if! to cfg_select! in sys/ modules - Move blueos cfg entries from pal/unix/os.rs to sys/paths/unix.rs - Move blueos cfg entries from pal/unix/process/ to sys/process/unix/ - Add blueos to pal/unix/sync/condvar.rs cfg lists - Add blueos to fs/unix.rs link() no-linkat fallback (cherry picked from commit 443b4ca)
Description: Fix mac toolchain error Reason: ``` ./x.py install -i --stage 1 library/std --target thumbv8m.main-vivo-blueos-newlibeabihf compile error on MacOS ``` Issue: NA
So that we can largely reduce artifacts' size and not exhaust github action runner's space.
Same as rv32imac on BlueOS.
We need a libcore with PIC enabled to build static PIE.
clang is installed via the package manager.
Adapted to Rust 1.96 when resolving conflicts: - Migrate cfg_if! to cfg_select! in os/unix/process.rs - Move blueos stat time accessors from scalar (st_atime/st_mtime/st_ctime) to timespec (st_atim/st_mtim/st_ctim) in sys/fs/unix.rs - Add blueos to sys/process/unix/mod.rs allow(unused) cfg_attr (cherry picked from commit 7dd0ed8)
Adapted to Rust 1.96 when resolving conflicts: - mingw-check/ was reorganized to pr-check-1/ upstream - Remove pr-check-1/ directory (Dockerfile, reuse-requirements, etc.) - Remove pr-check-1/ references from tidy/Dockerfile (cherry picked from commit 6e2ebcb)
|
|
wangchen-vivo
marked this pull request as draft
August 14, 2026 07:49
Pin the BlueOS libc fork to commit 2f8715c4 (adapt libc to Rust 1.96 toolchain) in Cargo.lock, library/Cargo.lock and tidy ALLOWED_SOURCES. Adjust BlueOS target specs and std sources for the 1.96 upgrade: - Update target spec fields for the new target-spec API - Set c_char to i8 on BlueOS targets (-fsigned-char) - Adapt std/sys/pal/unix and std/os/blueos to the 1.96 layout - Bump bootstrap and profiler_builtins Cargo metadata
wangchen-vivo
force-pushed
the
blueos/1.96.0
branch
from
August 17, 2026 08:00
9cc19db to
8f17d9d
Compare
zhaowenbo-vivo
approved these changes
Aug 18, 2026
wangchen-vivo
marked this pull request as ready for review
August 18, 2026 13:13
wangchen-vivo
force-pushed
the
blueos/1.96.0
branch
from
August 18, 2026 13:27
2058195 to
24af513
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrade to Rust 1.96.0 and rebase BlueOS patches
Background
BlueOS maintains a fork of rustc with patches that add the BlueOS target specs
and adapt
stdto the BlueOS libc / newlib runtime. The previous fork wasbased on Rust 1.84.0 (
blueos-devbranch).This branch rebases those BlueOS patches onto the Rust 1.96.0 stable release
and resolves the conflicts caused by upstream changes between 1.84 and 1.96.
What this PR does
BlueOS target specs &
stdsupportCherry-pick of
[BlueOS] Support vivo BlueOS— the original commit thatadds the six BlueOS target specs and wires up
stdfor the BlueOS newlibruntime. Adapted to 1.96:
cfg_if!tocfg_select!insys/modules.pal/unix/os.rstosys/paths/unix.rs.pal/unix/process/tosys/process/unix/.pal/unix/sync/condvar.rscfg lists.fs/unix.rslink()no-linkat fallback.Cherry-pick of
Fix: bootstrap abi issue— adapt the BlueOS stat timeaccessors and process module to 1.96:
st_atime/st_mtime/st_ctime) to timespec(
st_atim/st_mtim/ctim) insys/fs/unix.rs.sys/process/unix/mod.rsallow(unused)cfg_attr.Target spec adjustments
riscv64-vivo-blueos(needed tobuild static PIE).
emutlsforriscv32imc-vivo-blueos— same workaround as rv32imac,the native TLS is not available on this target yet.
dynamic_linkingand PICfor
thumbv7m-vivo-blueos-newlibeabiandthumbv8m.main-vivo-blueos-newlibeabihf.libc fork pin
(
2f8715c4) acrossCargo.lock,library/Cargo.lock, and the tidyALLOWED_SOURCESlist (src/tools/tidy/src/extdeps.rs).c_char = i8on BlueOS targets inlibrary/core/src/ffi/primitives.rs(BlueOS compiles C with
-fsigned-char).Build / CI
pr-check-1/(Dockerfile,reuse-requirements, etc.) and its references in
tidy/Dockerfile.config.blueos.toml— clang is installed via thepackage manager, saving build time.
config.blueos.toml.config.blueos.toml.bootstrapandprofiler_builtinsCargo metadata.Testing
Verified by building the full BlueOS Rust toolchain via
x.py installforcompiler/rustc and std across all BlueOS targets.