Commit graph

730 commits

Author SHA1 Message Date
Charisee Chiw
2313b0c798 Merge "rustc-1.61.0 Build 8644170" 2022-06-02 15:32:37 +00:00
Charisee
65c99a27ac rustc-1.61.0 Build 8644170
Test: m rust
Bug: 232437287
Change-Id: I93add84ae6adaa8da4a68ce2608a561cbb08828a
2022-05-29 22:06:22 +00:00
Hasini Gunasinghe
783e76c738 Merge "Add system/core/trusty/keymint-rust to allow list" 2022-05-27 17:57:51 +00:00
Hasini Gunasinghe
07851ffae4 Add system/core/trusty/keymint-rust to allow list
Bug: 225036046
Test: N/A
Change-Id: I2177960dc40c79a07d3acbc798b5235a26cfa72d
2022-05-26 22:58:10 +00:00
David Drysdale
21252b460a Add new system/keymint Rust directory
Bug: 195310053
Test: build, TreeHugger
Change-Id: I5bb3c000324fb8150bdd00ec8b8ca9ed79ceba06
2022-05-25 13:57:13 +01:00
Treehugger Robot
5bec8d41ea Merge "Clean up some bp2build technical debt" 2022-05-23 18:01:04 +00:00
Lukacs T. Berki
2da6c3cc86 Keep a "sanitizer dependency" flag for each sanitizer.
This is so that we can avoid mutating state in sanitizerMutator, as
would be necessary if we only had a single bit for every sanitizer
together.

Test: Presubmits.
Change-Id: I5576367c12972fbea64342ab123118ec5a2cfeec
2022-05-19 09:48:57 +02:00
Liz Kammer
3bf97bd1c0 Clean up some bp2build technical debt
Previously we ran mutators in bp2build mode to add dependencies, now we
look up modules by name directly. Remove workarounds to allow bp2build
mode to not fail when adding/handling dependencies.

Test: m bp2build
Change-Id: Ibf6fd905150cac306e5c395902ef28f609f4df2a
2022-05-13 19:47:48 -04:00
Treehugger Robot
dd58c3fe2b Merge "Add cross-referencing support for Rust" 2022-05-03 19:10:17 +00:00
Treehugger Robot
5b70a8d677 Merge "Update clang version to clang-r450784d" 2022-05-02 18:33:32 +00:00
Yi Kong
4f6c92765d Update clang version to clang-r450784d
Test: presubmit
Bug: 219872355
Change-Id: If6c2c331044a363cb8f20a2516da894e72c4b7e7
2022-05-02 23:52:44 +08:00
Martin Geisler
507f9b26d5 Merge "Tell rustc to always use color output" 2022-05-02 13:00:40 +00:00
Matthew Maurer
e91f9d439e Merge "Allow BoringSSL's Rust bindings to build" 2022-04-29 17:40:24 +00:00
Martin Geisler
d352e3b788 Tell rustc to always use color output
By default, rustc will disable color output when it detects that its
stdin isn’t connected to a terminal. However, since we will print the
output to the user’s terminal, it makes sense to override this.

Test: Manually by triggering a compilation error. I ran
  * m pdl
  * atest --host --no-bazel-mode pdl_inline_tests
  * atest pdl_inline_tests
  and got useful color output in my terminal in each case.
Change-Id: I8b593d2eb59d13db17a3456e3fb053556fc16f07
2022-04-29 15:21:15 +02:00
Jooyung Han
10bea7d44a Put rust_test.data_libs under lib[64]
Rust test binary depending on native libraries would require them under
lib[64] directory so that the test binary can open them with default
rpath values.

Bug: 204562227
Test: presubmit
Change-Id: I029bb32c4c98fba21bd28e579a9df9f184a7f045
2022-04-28 23:55:43 +00:00
Matthew Maurer
14f26aaa4e Allow BoringSSL's Rust bindings to build
Bug: 177080016
Test: mm in boringssl
Change-Id: I3cdf031ebf7c5bafce00c078107fd7fb3a26ba2d
2022-04-27 14:28:43 -07:00
Chris Wailes
c28bd05753 Update RustDefaultVersion to 1.60.0
Test: m rust
Change-Id: I5fb8a831b77cb715679c4653d22aba78c1e19db2
2022-04-22 15:42:18 -07:00
Sasha Smundak
a76acba553 Add cross-referencing support for Rust
Bug: 222044478
Test: run TARGET_BUILD_VARIANT=userdebug TARGET_PRODUCT=cf_x86_64_phone XREF_CORPUS=googleplex-android.googlesource.com/codesearch/android build/soong/build_kzip.bash
Change-Id: Ia12eed53fafd0cbbbf2cc499fa20a0f5a40031de
2022-04-20 20:02:28 -07:00
Ivan Lozano
3736abfa01 Merge "rust: Allow rustlibs to fallback to rlibs." 2022-04-18 18:53:58 +00:00
Ivan Lozano
5e7455996e Merge "rust: set ANDROID_RUST_VERSION based on prebuilts" 2022-04-13 12:56:27 +00:00
Ivan Lozano
f1868af5d5 rust: Don't append '.vendor' to vendor modules.
Rust vendor-only modules would have the '.vendor' subname appended to
them, which meant that 'm <vendor_module>' would not work -- instead
you would need to call 'm <vendor_module>.vendor', which leads to some
confusion.

This CL fixes the behavior by using the same SubName logic as the cc
module.

Bug: 205577906
Test: m <vendor_module> # works without .vendor suffix
Change-Id: I6ba18ce1d7281a1f8342ed6014644b48009d78e0
2022-04-12 13:42:04 -04:00
Ivan Lozano
2d407633ae rust: Allow rustlibs to fallback to rlibs.
Allow adding rlib-only libraries to rustlibs by having it fallback to
selecting the rlib variant if a dylib variant is requested but not
available.

Bug: 224771894
Test: m nothing
Test: New Soong test
Change-Id: I47b19ec9dbf3da90a2b090aeda04556a0400c7d1
2022-04-12 11:30:40 -04:00
Ivan Lozano
6d14ed157e rust: set ANDROID_RUST_VERSION based on prebuilts
ANDROID_RUST_VERSION is always set to the default Rust version, rather
than than respecting the RUST_PREBUILTS_VERSION setting. This is not the
correct behavior, this CL resolves the issue.

Test: m nothing
Change-Id: I3f8a2fc3590b7313286278b77534bb669cc693d6
2022-04-12 10:29:43 -04:00
Treehugger Robot
de0d46f5e0 Merge "Add libtrusty-rs to Rust allow list" 2022-04-05 20:54:18 +00:00
David LeGare
3eee5c4d14 Add libtrusty-rs to Rust allow list
Test: Local build
Bug: 226659377
Change-Id: I00798295b0fe1df4dd782361c368f08b991351ae
2022-03-31 16:59:15 +00:00
Andrew Walbran
838febf35e Allow Rust for tombstoned client.
Bug: 226162295
Test: m libtombstoned_client_rust
Change-Id: I0a8e1f8e1c08f47e75e62f008160da746ee2e7f5
2022-03-30 14:23:04 +00:00
Colin Cross
441898c285 Switch to libunwind to remove dependency on libgcc for musl
The libgcc dependency is only used for _Unwind* symbols, remove
it now that libc_musl.so embeds libunwind.a.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: I1ad4c1435fc0090c6df2d50d542d2203dfb94d7b
2022-03-29 13:35:17 -07:00
Ivan Lozano
872d579a22 rust: rust_proc_macro host snapshot support.
Adds support for capturing rust_proc_macros as part of the host
snapshot. Proc macros target the host and can be thought of as compiler
plugins. Because of this, they don't have vendor image variants and
can't be easily captured as part of the vendor snapshot. Instead we
capture them as part of the host snapshot.

This adds a rust_prebuilt_proc_macro module type.

Bug: 204304380
Test: m HOST_FAKE_SNAPSHOT_ENABLE=true host-fake-snapshot dist
Test: python3 development/vendor_snapshot/update.py --image=host
  --install-dir=vendor/vendor_name/ 31 --local out/dist
Test: Checked Android.bp for rust_prebuilt_proc_macro modules.
Change-Id: I4a8c4d9c41b7ca361b5b97d3f74973918c2a5fe3
2022-03-25 09:25:07 -04:00
Pirama Arumuga Nainar
fac98b5c8e [rust] Add path for coverage tests to allowed list
Bug: http://b/214396112

The goal is to run this smoke test in presubmit on all platform changes.

Test: build with aosp/
Change-Id: I4abb7f46905bd4160a2d628be2761874df6b1b34
2022-03-08 23:08:33 -08:00
Treehugger Robot
86ac783d8e Merge changes from topic "vsdk_ramdisk"
* changes:
  Add InstallInRoot property to snapshot binary json file.
  Fix for duplicate modules across vendor and ramdisk snapshots.
2022-03-08 17:10:54 +00:00
Andrew Walbran
1e17a78c55 Merge "Add stdlibs property for Rust build rules." 2022-03-08 16:07:16 +00:00
Colin Cross
3c66771c62 Merge "Use single module for clang runtime libraries" 2022-03-08 06:51:43 +00:00
Colin Cross
4c4c1be915 Use single module for clang runtime libraries
The clang prebuilts now provide a single module with per-architecture
variants instead of a module per architecture.

Bug: 220019988
Test: m checkbuild
Change-Id: I39e2cf8ae14edf8510276dab38011afaef85822c
Merged-In: I39e2cf8ae14edf8510276dab38011afaef85822c
2022-03-07 14:56:32 -08:00
Jose Galmes
61741e20a5 Fix for duplicate modules across vendor and ramdisk snapshots.
Bug: 215295121
Test: Generated snapshots and verified there are no duplicates.
Change-Id: I6ba7deb4941e21d87578038de19ab313f2be539c
2022-03-07 14:48:12 -08:00
Andrew Walbran
797e4be221 Add stdlibs property for Rust build rules.
This lets no_std crates depend on system crates like core and alloc.

Bug: 223152204
Test: built pVM firmware skeleton with rust_ffi_static rule
Change-Id: I0f9b0ab3f5e3289fb8ce66f28d779bcf62a7181f
2022-03-07 15:42:34 +00:00
Pirama Arumuga Nainar
b37ae58a3d Memory mapped coverage (take 2)
Add a build variable, CLANG_COVERAGE_CONTINUOUS_MODE, instead of
selecting based on paths.

Test: CLANG_COVERAGE_CONTINUOUS_MODE=true m and verify continuous mode works

Change-Id: I731172fc1f00e1cabff8efcf8b99f9a48210b446
2022-03-04 14:07:53 -08:00
Charisee
5ddec43280 Update RustDefaultVersion to 1.59.0
bug: 215232614
Test: TreeHugger and compiling with m rust
Change-Id: Ia60c77637ab2e41844010e021656fad0870013ac
2022-03-02 19:54:47 +00:00
Treehugger Robot
744c740c92 Merge "Update Rust OWNERS" 2022-02-24 21:43:15 +00:00
Stephen Hines
a982582cf8 Update Rust OWNERS
We haven't updated this in a while, and we have new team members who
should be able to edit Rust build-related rules.

Test: N/A
Change-Id: Iaf001d0718ca187e5570a1198d06a3ae4db78e4c
2022-02-23 12:05:27 -08:00
Pirama Arumuga Nainar
f80a59fac9 [rust] Update clang version used to build bindgen
Bug: http://b/214080353

Use clang-r445002

Test: presubmit
Change-Id: I8b7d5b55757838c303e3695e398e84687804e948
2022-02-23 19:35:08 +00:00
Treehugger Robot
309ee8d398 Merge "Propagate data_bins from Soong to Make" 2022-02-18 01:26:07 +00:00
yangbill
22bafec042 Propagate data_bins from Soong to Make
Write the list of a test module's data_bins value to the
`LOCAL_TEST_DATA_BINS` Makefile variable defined for each module.
This enables downstream tools to correctly set up the runtime
environment for execution. And currently only sh_test, cc_tests, and
rust_tests has this attribute in Android.bp.

Bug: 215234071
Test: m out/soong/Android-aosp_cf_x86_64_phone.mk
Change-Id: I8d47f5f9b25afdc5975c6b414405badb38dbde4b
2022-02-17 04:06:34 +00:00
Justin Yun
2b3ed6403c Fix rust snapshot to capture static libs correctly
SnapshotStaticLibs must include static libs, but it had shared libs.

Bug: 219746113
Test: build vendor snapshot
Change-Id: I0660811bb94446129ae97f52306b065dec73cabd
2022-02-16 08:15:07 +09:00
Aditya Belsare
c0bd27b3b0 Add cert_validator to allowed rust paths
Test: m libcert_request_validator works

Change-Id: I40b8027e98a775dc1b9d3a8ab4431c12d6088c12
2022-02-08 07:32:31 +00:00
Liz Kammer
0ea7998208 Update error messages for failed globs.
Currently error messages appear like:
&fs.PathError{Op:"open", Path:"..." Err:0x18}
which make them difficult to parse.

Test: CI
Change-Id: I18da18abc43230d0ea37d166179d07e585077f51
2022-02-07 08:56:47 -05:00
Treehugger Robot
7afffe6af0 Merge "Allow UWB to use Rust in reference HAL" 2022-01-28 22:08:36 +00:00
Treehugger Robot
6bf833f428 Merge changes from topic "musl_rust"
* changes:
  Support building rust modules against musl libc
  Support genrules as CrtBegin and CrtEnd in rust
  Support multiple crtbegin and crtend dependencies
2022-01-27 21:39:18 +00:00
Pirama Arumuga Nainar
1785fcb171 Merge "[rust/coverage] Remove obsolete WAR to pass -z,start-stop-gc" 2022-01-27 18:37:40 +00:00
Pirama Arumuga Nainar
668da23096 [rust/coverage] Remove obsolete WAR to pass -z,start-stop-gc
Bug: http://b/199203503

Rust's llvm-project source now includes  https://reviews.llvm.org/D97448
and we no longer need this workaround.

Test: m unicode-xid_test_src_lib and verify __llvm_prf_data section is
      present.
Change-Id: I0387bd3af8bfc765f3aba3b309bfbc7ef49d565d
2022-01-26 21:39:49 +00:00
Matthew Maurer
2f90708221 Allow UWB to use Rust in reference HAL
Bug: 216358770
Change-Id: If0be032a248f6258232e2e47c489983b5416c536
2022-01-25 22:40:12 +00:00