| commit | 8927f4560e03c2bcf631e2f351e4a386190f9f20 | [log] [tgz] |
|---|---|---|
| author | Stephen Hines <srhines@google.com> | Wed Mar 26 14:46:13 2025 -0700 |
| committer | Stephen Hines <srhines@google.com> | Wed Mar 26 14:46:13 2025 -0700 |
| tree | 1ebe6efee96b7f37f85bd8c974c42501c291e695 | |
| parent | e356b2ebe56db64e6219545f0e09b1ed452d0d66 [diff] |
Switch to goog/main for our branch paths. Bug: http://b/403156273 Test: N/A Change-Id: Id49edc741c014f6f0cf5c523a7468e756027f186
This repository contains the code and data necessary to build and test a Rust toolchain for the Android Open Source Project. Detailed information on several topics can be found in our documents/ directory:
The Android Rust toolchain can generate code for the following architectures:
aarch64armRISCVx86x86_64In addition, prebuilt standard libraries are available for the following target triples:
aarch64-linux-androidaarch64-unknown-noneaarch64-unknown-uefiarmv7-linux-androideabiarmv7a-none-eabii686-linux-androidi686-unknown-linux-gnui686-unknown-linux-musli686-unknown-uefiriscv32i-unknown-none-elfriscv32imc-unknown-none-elfx86_64-linux-androidx86_64-pc-windows-gnux86_64-unknown-linux-gnux86_64-unknown-linux-muslx86_64-unknown-uefiStarting with Rust 1.56.1 it is possible to reproduce Android‘s Rust toolchain prebuilts. To do this you will start with the prebuilt’s manifest, which is located in the prebuilts/rust/linux-x86/<version> directory. Starting with Rust 1.61.0 the manifest is also available in the toolchain/android_rust/artifacts/<version> directory.
To begin reproducing a given build navigate to a new directory and run the following command:
$ repo init -m /path/to/manifest.xml -b rust-toolchain && repo sync -c -j16
To reproduce toolchains before Rust version 1.61.0 run the following command:
$ ./toolchain/android_rust/tools/build.py --lto thin --llvm-linkage shared
To reproduce toolchains version 1.61.0 and above use the build commands listed in the toolchain/android_rust/artifacts/<version>/rust_build_command.<target>.<build id>.sh files. Be sure to replace the paths to the PGO profiles from the saved commands with paths to the profiles in the artifacts directory.
This project is developed and maintained by the android-rust-toolchain@ team and the best way to contact us is the team email alias.