Rename the ninja variables that have an extraneous Clang in the name,
since there are no longer any non-Clang variables.
Bug: 68947919
Test: no change to command lines used to build mmma bionic
Change-Id: I081d5e1d423a66d55faece6cb1d265cd5e504d5f
Adds rust_benchmark and rust_fuzz to the list of Rust module types which
need to be in the allowed paths, and a comment about rust_bindgen and
rust_protobuf.
This also adds a downstream allow path list which helps prevent merge
conflicts if downstream wants to extend the list of allowed paths.
Bug: 191507775
Test: Paths are checked for the newly added module types.
Test: Paths in DownstreamRustAllowedPaths allow Rust modules.
Change-Id: Ida80c33a815d47ffdfb1f648125d71316a2a9d8a
Rustc unstable option "link-native-libraries" is used to prevent the
linkage of other libraries via the #[link] directive. Add a dependency
to libclang_rt.builtins, similarly to cc.
Bug: 141331117
Test: lunch aosp_crosshatch-userdebug; m
Change-Id: I5c232291a5dd08a99e6a12a1295e30bb8e4fcaf1
Disable the byte grouping clippy lint by default. In some cases it makes
sense to group bytes in a protocol-specific fashion, so let's not error
on this lint.
Bug: 181171365
Test: Clippy allows this lint.
Change-Id: I2705dc7fa901b997bcb01f1256d48e85ce35065c
By default, rust uses the `legacy` mangling format. Using llvm coverage
switches it to using the new `v0` format. Rather than pushing the llvm
coverage back to `legacy` format, move Android forwards to `v0`. This
also has the added benefit that Rust symbols can be detected in the
codebase by looking for a leading "_R", aiding in demangler selection.
Test: builds, resulting object files have leading _R rather than _Z
Test: atest keystore2_test
Bug: 178565008
Change-Id: I7fcd591535d08260686c62fbfa6f7b61b31ed989
This change adds a new arch named "armv8-a-branchprot". The new target
is no different from the usual "armv8-a" variant except it has the
compiler flag "-mbranch-protection=standard" set.
With this flag compiler emits Armv8.3-A Pointer Authentication and
Armv8.5-A Branch Target Identification instructions. All of these
instructions are in the hint space; therefore devices which do not
support any of these extensions would execute them as NOPs.
In terms of directory structure there is no change in the output of
build/soong/scripts/build-ndk-prebuilts.sh script.
Test: build NDK prebuilts
Change-Id: Ie52ccba5653fbf567f0b7ca312d8a8e71602ad06
Add a rust_fuzz module which builds a libfuzzer binary that enabes
asan+sancov. This relies on the libfuzzer-sys crate.
Bug: 147140513
Test: Local rust_fuzz example builds, fuzzes with asan+sancov.
Change-Id: I57db3b8d25869791824ccfab768d13b0bb9d42fa
This allows tombstones to be symbolized and is consistent with C/C++
where we pass -g.
Bug: 173723155
Change-Id: I597e2bf97517407b428277f1cf7aa19b73371efa
The LinuxBionic toolchain wasn't defined for Rust.
This would lead to build breakage if a CC module that targeted Linux
Bionic linked against a Rust FFI module.
Bug: 174873186
Test: Build breakage no longer occurs if CC module with Rust dependency
is built for the Linux Bionic target.
Change-Id: I39df7b9a29372986c9beeb1fe5602140d805d731
In 1.47.0, std::env requires the STD_ENV_ARCH environment variable to be
set to the target architecture [1].
[1] 8e8939b804/library/std/src/env.rs (L866)
Bug: 171280890
Test: cd external/rust; mm
Change-Id: If4ddf4b9bad2a1a7518a358a5fb597170a97c67e
The arguments passed to rustfmt have changed from those used in the
previously referenced CL so update the comment to reference a CL using
the new arguments.
Bug: 164111102
Test: None
Change-Id: I962d56ed36422709a1fcd07ca95f1c015daa6339
Rust will be used for a few virtualization related components so allow
it to be used in the directory in which those components will reside.
Test: built a rust binary in the directory
Change-Id: I805d6117201c2144f7ecf21ec38b577c7c21e9c5
Pulls out all of the per-file rules into their relevant directories
so platform/build/soong:/OWNERS can be included everywhere we need
the list of build system owners.
Test: treehugger
Bug: 170407947
Change-Id: I5a4b2d252bd9b3c280cd9954cf0e65ac21153ede
Currently, rustfmt requires to be enabled per repository. Add a comment
near the current project allowed_list as a reminder.
Test: None
Bug: 160223496
Change-Id: Iecf8d5b693620541a00d8ddc905549652025eed9
In the previous mode, building Rust code using certain intrinsics would
fail on arm32 since our runtime is armv7, but our codegen was arm.
Test: cd external/rust; mma
Bug: 169245712
Change-Id: Ie800486b39325486f5ff319e46632df2a6987391