Commit graph

1112 commits

Author SHA1 Message Date
Ivan Lozano
b0e1035417 Merge "rust: Add support for host fuzzers." into main 2023-08-16 14:07:19 +00:00
Vinh Tran
e6adc83c6c Merge "Remove dylibs prop from rust module types" into main 2023-08-15 13:45:10 +00:00
A. Cody Schuffelen
c183e3a473 Rust library linking fixes
- Hide universal binary dependency for rust

Without a darwin_arm64 libstd prebuilt, many rust binaries are not
possible to build as a universal binary anyway. This fixes an
intermediate error with compiling rust FFI targets, where C++ shared
library dependencies for both architectures were combined into the same
linker command.

There is still an outstanding problem with C++ executable targets that
include rust FFI library targets, as the rust FFI library targets
fail to find a proper libstd to build the arm64 side of the universal
executable.

- Use dynamic_lib instead of soname

This matches similar logic in cc/library.go : linkerFlags for including
shared libraries.

Bug: 291830024
Test: m libkmr_cf_ffi (when enabled for darwin)
Change-Id: I1d6b6a7855c6649b93ab6592ea43b17c6e37b3a3
2023-08-14 21:27:41 -07:00
Vinh Tran
5ce68092d3 Merge "Add unit test to verify default linkage for rust binaries" into main 2023-08-14 18:13:04 +00:00
Vinh Tran
4eeb2a9514 Remove dylibs prop from rust module types
For device build, rust defaults to dylib linkage for rustlibs deps. `dylibs` prop was provided for flexibility.

By removing it, we're enforcing users to either use the default linkage (dylibs for device and rlibs for host) or rlibs prop explicitly. This means no dylibs for host modules. This makes sense because host modules always uses rlib linkage against libstd. The flexibility with dylibs prop opened room for linkage collisions because the dependencies don't link against libstd the same way.

Test: go test
Change-Id: I2fc221daa8a9bb42bdcf6d9823c723a4ddabe7b5
2023-08-14 14:03:28 -04:00
Vinh Tran
05b3410290 Add unit test to verify default linkage for rust binaries
Test: go test
Change-Id: I16eed90dffc8f98a880aa801e96601227dcc37be
2023-08-14 11:26:18 -04:00
Ivan Lozano
2fcbffa4a1 rust: Add support for host fuzzers.
Adds support for host-based Rust fuzzers.

Bug: 282897366
Test: SANITZE_HOST="address" m <host_fuzzer>
Test: run fuzzer
Change-Id: Ibb951f651ef12e763778ebbf12e66769a7113920
2023-08-10 09:48:13 -04:00
A. Cody Schuffelen
f29ca58e88 Darwin/Mac OS host rust compilation fixes
- Don't pass `--as-needed` to the linker on Mac OS which is unsupported
  there
- Use `--force_load` rather than `--Wl,--whole-archive` on Mac OS
- Scan `rustc`'s linker arguments for `-dylib` and `-dynamiclib`, which
  it can use instead of `-shared` on Mac OS:
  7bd81ee190/compiler/rustc_codegen_ssa/src/back/linker.rs (L319)

Test: m libhalf serde_derive
Bug: 291164566
Change-Id: Iecd6c2532fa31c9476834f49b109de98cbd2dccf
2023-08-03 16:26:44 -07:00
Colin Cross
0a10dfd6dc Merge "Fix missing rust dependencies when ALLOW_MISSING_DEPENDENCIES=true" into main 2023-08-01 20:07:53 +00:00
Colin Cross
a86ea0e0eb Fix missing rust dependencies when ALLOW_MISSING_DEPENDENCIES=true
Register a missing dependency when a dependency returns an invalid
OptionalPath.

Fixes: 294070048
Test: rust_test.go
Change-Id: Ibccfc30d59c706308e99f11e372f7c9b60d9dc74
2023-08-01 10:19:53 -07:00
Treehugger Robot
d97daa5a39 Merge "rust: Add Bindgen_flag_files property" into main 2023-07-31 22:38:31 +00:00
Ivan Lozano
17ac9fa93e Merge "Revert "rust: Add SCS sanitizer option for AArch64"" into main 2023-07-31 18:13:40 +00:00
Ivan Lozano
22823eed4b Revert "rust: Add SCS sanitizer option for AArch64"
This reverts commit 8827113577.

Reason for revert: hwasan builds breaking

Change-Id: I28094e27d5935c6f371fddddf4b6b0334de9b12c
2023-07-31 18:01:26 +00:00
Ivan Lozano
0e403456b0 Merge "rust: Add SCS sanitizer option for AArch64" into main 2023-07-31 17:27:01 +00:00
Ivan Lozano
f74612e346 Merge "rust: Add support for more cargo pkg version vars" into main 2023-07-31 16:31:14 +00:00
Ivan Lozano
f445562840 rust: Add support for more cargo pkg version vars
Add support for CARGO_PKG_VERSION_{MAJOR,MINOR,PATCH}.

Bug: 293602526
Test: m
Test: check build flags for cargo_env_compat module
Change-Id: I6b2796656e3a489cd077c2f42b0bbd04de610ba4
2023-07-31 09:25:18 -04:00
Ivan Lozano
7113df6c8f Merge "rust: Pass ASAN/HWASAN flags alongside fuzzers" into main 2023-07-31 12:42:46 +00:00
Ivan Lozano
8827113577 rust: Add SCS sanitizer option for AArch64
SCS has been supported in Rust since 1.64.0.

This adds SCS as a sanitizer option in Rust.

Bug: 168914033
Test: Built module with sanitize: { scs: true }
Change-Id: Ie54ac4693286878b98704cf052649a267777d764
2023-07-28 14:34:28 -04:00
Ivan Lozano
408d37319a rust: Pass ASAN/HWASAN flags alongside fuzzers
'-Z sanitizer={hw}address' was not being passed if the fuzzer sanitizer
property was also set. Additionally, trying to use the fuzzer sanitizer
with the address sanitizer incorrectly linked in the hwasan runtime.

Bug: 293466009
Test: SANITIZE_TARGET="fuzzer address" m android_logger_fuzzer
Test: SANITIZE_TARGET="fuzzer hwaddress" m android_logger_fuzzer
Test: ldd <fuzzer_on_device> # ensure correct libraries linked
Test: Check build flags
Change-Id: I6b01c8808af07c642217b642af128ebf934f4bc6
2023-07-27 14:00:07 -04:00
Ivan Lozano
7e377d045e Merge "Revert "rust: Add SCS sanitizer option."" into main 2023-07-27 15:08:50 +00:00
Ivan Lozano
f9780422b3 Revert "rust: Add SCS sanitizer option."
This reverts commit 447f5b1ea9.

Reason for revert: b/293445283

Change-Id: Iadc6c7ed196be2a65329f86423730ba7f851002c
2023-07-27 14:52:20 +00:00
Ivan Lozano
c7c29b9b8e Merge "rust: Add SCS sanitizer option." into main 2023-07-27 14:23:33 +00:00
Andrei Homescu
78a1f8dfb8 rust: Add Bindgen_flag_files property
Add a new Bindgen_flag_files property to bindgen modules
that let users specify files that contain extra flags for
bindgen.

Bug: 242243245
Test: presubmit
Change-Id: I21d987c08ac417c04aaa3bfb3b75d563fc662d5b
2023-07-27 07:03:14 +00:00
Ivan Lozano
447f5b1ea9 rust: Add SCS sanitizer option.
SCS has been supported in Rust since 1.64.0.

This adds SCS as a sanitizer option in Rust.

Bug: 168914033
Test: Built module with sanitize: { scs: true }
Change-Id: Ibdc116a335339af6d0b0d6dd0bb82c0358fa9087
2023-07-26 13:34:55 -04:00
Ivan Lozano
2797e876f1 rust: Add BTI/PAC for supported targets.
This mirrors the support provided for cc modules.

Bug: 181027427
Test: m rust
Change-Id: I1354b37ec8c47132f143400adba6d42cf2081df5
2023-07-25 14:25:43 -04:00
Chris Wailes
9081d142cb Merge "rustc-1.71.0 Build 10534657" into main 2023-07-24 19:21:11 +00:00
Ivan Lozano
5b55c2f366 rust: Enable Product support for dylibs.
There is no longer a reason to restrict dylibs on product, make them
available.

Bug: 204303985
Test: m
Change-Id: I315d22307f64d02633940f30ae600c63f16f0e7a
2023-07-21 14:02:21 -04:00
Chris Wailes
2e23a3d140 rustc-1.71.0 Build 10534657
Bug: https://issuetracker.google.com/issues/288268986
Test: m rust
Change-Id: If1db6f9e866eeda121f757159a02cfb9018ab270
2023-07-20 14:52:57 -07:00
Yabin Cui
2850da608e Update rust bindgen to clang-r498229
Bug: 280683256
Test: presubmit
Change-Id: I30c57035eaba408cdbaa4f1151ea2605fdd9d32b
2023-07-18 13:41:21 -07:00
Treehugger Robot
8edcba4c2f Merge "Create one rule per one corpus/data files" into main 2023-07-18 15:37:25 +00:00
Inseob Kim
3b24406dda Create one rule per one corpus/data files
To avoid MAX_ARG_STRLEN hardlimit.

Test: build and check intermediate directory
Change-Id: I44db1ed14cae4de6ace5b25a392d394d0f9f617a
2023-07-18 12:38:08 +00:00
Ivan Lozano
add122a828 rust: Add vendor and recovery dylib support.
Adds dylib support for vendor and recovery images.

This changes the default linkage for vendor and recovery images to
dylib, which matches the platform default linkage. This also means that
by default, dylib-std variants are used for rlib dependencies.

Bug: 204303985
Test: Soong tests.
Test: m dist vendor-snapshot
Test: RECOVERY_SNAPSHOT_VERSION=current m dist recovery-snapshot
Change-Id: If84074b8615a70c45e7e162abeb853dc8c34d49a
2023-07-14 12:43:09 -04:00
Andrei Homescu
4494685aec rust: Allow any host tool for custom_bindgen
Switch custom_bindgen to use any HostToolProvider
instead of just Rust modules, so any host binary can
be used as the bindgen wrapper.

Bug: 242243245
Test: presubmit
Change-Id: I9ba189b2857b3049dcf14842c178ce5846bab2f7
2023-07-07 04:59:07 +00:00
Andrew Walbran
7d61fae91d Require safety comments for unsafe blocks.
Also require unsafe blocks even within unsafe functions.

Bug: 290018030
Test: m pvmfw_bin
Change-Id: I6ffce7b59a9b2f22572a88e0ba55aaf01576273c
2023-07-06 17:30:47 +01:00
Matthew Maurer
34609faea3 rust: Set env variables consistently for build/doc
Test: m rustdoc
Bug: 288151817
Bug: 288129815
Change-Id: I7fbf9eaea243fa2832f3dff717deb7889e0ed17c
2023-06-26 21:10:13 +00:00
Ivan Lozano
184893a851 Merge "rust: Enable stack-protector for Rust modules" 2023-06-23 13:08:37 +00:00
Colin Cross
313d32f730 Merge "Use generics for DepSets" 2023-06-22 20:57:01 +00:00
Ivan Lozano
464f3b381e rust: Enable stack-protector for Rust modules
Bug: 288407220
Test: m
Change-Id: Ifea0d4e3be715d9cef74ddfc6e64447a006fe0ed
2023-06-22 18:03:16 +00:00
Colin Cross
c85750bfe3 Use generics for DepSets
Use Go's generics for DepSets so they don't require a type-specific
wrapper and reflection.

Test: depsets_test.go
Change-Id: I22ba0b7d680d37d2cd05230b0f560d166c4dd20b
2023-06-22 08:18:33 -07:00
Ivan Lozano
85cc859d73 Merge "rust: Make dylib-std the canonical rlib form" 2023-06-16 00:39:55 +00:00
Ivan Lozano
4df0257fe5 rust: Make dylib-std the canonical rlib form
This removes the dylib-std suffix from rlib variants which link against
libstd dynamically. This is by far the common case.

This fixes an issue where 'm <rust_library_rlib>' would fail since Make
would expect the suffix to be included (e.g. 'm libfoo.dylib-std').

Bug: 173312517
Bug: 268086496
Test: m <rust_library_rlib> # without a suffix
Change-Id: I1e5778c57468302a8d672d5eb540047d8bb79314
2023-06-15 18:29:22 +00:00
Charisee
4fa57fbadb rustc-1.70.0 Build 10322039
bug: 285036397
Test: m rust
Change-Id: I44fc85e53d23c834007cbd1922376a7a64af2bb4
2023-06-14 22:30:12 +00:00
Matthew Maurer
9c8c9ff82a rust: Add support for CARGO_PKG_NAME
Technically cargo package names and crate names can be different, but
this is rare and usually only a matter of presentation. Adding basic
support in this fashion lets several crates build without adding
significant machinery.

Bug: 276464273
Test: Build a crate which uses this environment variable
Change-Id: I4f4c8c9e277789de7a63be2457f00090e8c3e973
2023-06-14 00:25:33 +00:00
Ivan Lozano
b10aabae61 Merge "rust: Fix flags for Rust libfuzzer fuzzers" 2023-06-13 20:27:21 +00:00
Ivan Lozano
1247b3c8a0 rust: Fix flags for Rust libfuzzer fuzzers
Rust libfuzzer flags have changed upstream, so update our set of flags.

This fixes the following fuzzer error:

  ERROR: The size of coverage PC tables does not match the
  number of instrumented PCs. This might be a compiler bug,
  please contact the libFuzzer developers.

Bug: 249551848
Test: SANITIZE_TARGET="hwaddress fuzzer" m <fuzz_target>
Test: Test running the fuzzer.
Change-Id: I4f7df1fbe636133c646dfb0bd12757c947995ffe
2023-06-12 15:08:45 -04:00
Ivan Lozano
61c02cc537 rust: Bundle Rust shared dependencies in fuzzers
Rust shared library dependencies are not always bundled in cc_fuzz or
rust_fuzz modules, which can lead to difficult to debug runtime errors
when running these fuzzers. It can also be hard to determine which
dependencies need to be explicitly declared.

This CL makes sure that we bundle the appropriate transitive
dependencies for our fuzzers.

Bug: 249551848
Test: Soong tests
Test: m <fuzzer> # check data/fuzz/<arch>/lib dir contents
Change-Id: I957ca8898079b61e2ff20d750f8c92bf61ac394f
2023-06-09 14:17:49 -04:00
Chris Wailes
547bfdd1d1 Remove the last allow-listed unstable features
This CL removes the custom_inner_attributes and mixed_integer_ops
features from the allow-list.  This also allows us to remove the `-A
stable-features` flag.

Bug: 267698452
Test: m rust
Change-Id: I4770c2e9477337f112732c354bf477a99d11a467
2023-05-31 11:53:44 -07:00
Ivan Lozano
7f9d7cbb75 rust: Support sanitizers in rust_ffi modules
Don't automatically assume that HWASAN or ASAN is enabled if Fuzzer is
enabled.

Bug: 178365482
Test: m bluetooth_stack_with_facade
Test: SANITIZE_TARGET=fuzzer m bluetooth_stack_with_facade
Test: SANITIZE_TARGET=address m bluetooth_stack_with_facade
Test: SANITIZE_TARGET=hwaddress m bluetooth_stack_with_facade
Test: SANITIZE_TARGET="fuzzer address" m bluetooth_stack_with_facade
Test: SANITIZE_TARGET="fuzzer hwaddress" m bluetooth_stack_with_facade
Change-Id: Ief8c0f899837c5889a8035782616025f1b0d54e7
2023-05-24 20:15:52 +00:00
LaMont Jones
0c10e4dcc0 Parallelize singleton execution
Bug: 281536768
Test: manual, presubmits
Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
2023-05-19 20:31:32 +00:00
Treehugger Robot
ff007311e3 Merge "Update clang version for Rust bindgen to clang-r487747c" 2023-05-12 18:21:10 +00:00
Yi Kong
6974c7ec72 Update clang version for Rust bindgen to clang-r487747c
Test: presubmit
Bug: 279955553
Change-Id: I9092263024b5b8dc7a1538b00f318ef0d5c29bb7
2023-05-12 15:06:20 +01:00
Chris Wailes
6b82616c83 rustc-1.69.0 Build 10117114
Bug: https://issuetracker.google.com/issues/274972941
Test: m rust
Change-Id: If5570ba26080bdff38bdcbd65f6f1d7dc9f5bffc
2023-05-11 16:08:44 -07:00
Lei Ju
c38f1d5145 Merge "Revert "rustc-1.69.0 Build 10095304"" 2023-05-11 16:42:20 +00:00
Android Culprit Assistant
f36b2fae67 Revert "rustc-1.69.0 Build 10095304"
This revert was created by Android Culprit Assistant. The culprit was identified in the following culprit search session (http://go/aca-get/1fa75415-4722-46e3-b61b-7de26844a12d).

Change-Id: I7aabd3ff76c255ca13d594cc0f2f331ed8edc01b
2023-05-11 06:37:03 +00:00
Chris Wailes
a1909da281 Merge "rustc-1.69.0 Build 10095304" 2023-05-10 22:53:50 +00:00
Hamzeh Zawawy
38917496e5 Support removing suffix for device specific prebuilt during build
Some device specific prebuilts have a suffix that varies depending on the lunch target.
The resulting install dependency binary has the suffix.
The fuzzer build expects the presubmit binary without the suffix.
This change is to drop the suffix.

Test: make haiku
Change-Id: I8eadd84bf5797659b17bc428dca47b7c3f382aff
2023-05-09 23:11:42 +00:00
Chris Wailes
883507a7c9 rustc-1.69.0 Build 10095304
Bug: https://issuetracker.google.com/issues/274972941
Test: m rust
Change-Id: I5f376bd661eee014793aceeeb37a012dfad1fd80
2023-05-09 13:19:31 -07:00
Chris Wailes
34f2bc5693 Revert "rustc-1.69.0 Build 10027731"
Revert submission 2579357-rust-update-prebuilts-1.69.0

Reason for revert: Patch got dropped accidentally that broke a postsubmit test

Reverted changes: /q/submissionid:2579357-rust-update-prebuilts-1.69.0

Change-Id: I3fdd44a9df6c9c775c4f4157ea58df5e4215c47e
2023-05-05 18:19:32 +00:00
Chris Wailes
b5ae9bcf90 rustc-1.69.0 Build 10027731
Bug: https://issuetracker.google.com/issues/274972941
Test: m rust
Change-Id: I03ba07802c2d77d5e3776cc49abac8b98d6ebbfe
2023-04-28 01:15:55 -07:00
Jeff Vander Stoep
c1490ec25e Add option to use protobuf3
Users of the rust_protobuf module can use the 'use_protobuf3'
option to select version 3 of the protobuf crate instead of the
current default of version 2. This unblocks teams that would like
to use protobuf 3 immediately and provides a mechanism for us to
incrementally migrate users of protobuf 2 to protobuf 3.

Test: Adds tests that are executed during every build.
Bug: 270895633
Change-Id: Ib6a18b77cfa7dc3cc604cea05269004b3712bbb6
2023-04-24 11:33:50 +02:00
Peter Collingbourne
67237c82ed Merge "Pass -Wl,--as-needed when linking Rust binaries." 2023-04-18 19:17:41 +00:00
Peter Collingbourne
4629f7c886 Pass -Wl,--as-needed when linking Rust binaries.
aosp/2518976 revealed a pre-existing bug, which was that some Rust test
targets did not have all of their shared library dependencies packaged in
the host-unit-tests.zip file. Conveniently enough, these targets did not
actually depend on any of the symbols in the missing shared libraries, so
their DT_NEEDED entries were being removed by the --as-needed flag being
passed to the linker by rustc. This flag was dropped when we switched
to running the link command directly, causing the DT_NEEDED entries to
reappear and leading to runtime failures for these test binaries.

Although we could fix the issue that prevented these (unused) dependencies
from being packaged, there wouldn't be much point in doing so because
we already know that they aren't needed. So for now, let's return to
the status quo and keep passing --as-needed to the linker.

Bug: 278168700
Change-Id: Iae103803983240fa14cdbc2ff0d8ffb4329c6024
2023-04-14 17:36:57 -07:00
Peter Collingbourne
e7c71c344d Split Rust crate builds into compile and link phases.
Teach rustc to generate object files instead of a linked executable
for binary and shared library crates. This lets us skip the lengthy
Rust compilation phase when only the C++ dependencies of these crates
have changed.

This works using a Python script that replaces the linker invoked by
rustc and converts the linker command line into a rspfile that can be
used during the link phase. The script makes certain assumptions about
how rustc invokes the linker, but since we control the version of Rust
we use, we can update the script if those assumptions ever break. I've
asked the Rust developers about adding an official way to do this so
hopefully we won't need to rely on this hack in the future.

The rustc rule for Kythe has been altered to pass linker=true, somewhat
consistent with the main rustc rule, which now doesn't invoke the actual
linker either. `m xref_rust` still succeeds, but hopefully we can find
someone who knows more about the rest of the Kythe pipeline who can let
us know whether it should still work. Otherwise, let's use this CL as
an opportunity to find out whether the rest of the pipeline is happy
with linker=true, since otherwise we will find it hard to maintain the
Kythe rule in the future.

Change-Id: Ifb9c8689c1bd78c0afcf6fdfd111140d20377536
2023-04-12 15:51:41 -07:00
Treehugger Robot
43a2a9a5c6 Merge changes from topic "fdo_profile"
* changes:
  Reimplement afdo support for rust
  Implement fdo_profile module type
2023-04-03 22:35:25 +00:00
Treehugger Robot
d61ea3580d Merge "Set OUT_DIR=out with no src_deps." 2023-04-03 19:01:58 +00:00
Peter Collingbourne
0dcd62e8a0 Set OUT_DIR=out with no src_deps.
Some Rust crates with no src_deps have generated files checked in in an
"out" subdirectory and included via a reference to $OUT_DIR, such as
external/rust/crates/userfaultfd-sys.

Astonishingly, some people must be leaving $OUT_DIR set to the default
value of "out", because with $OUT_DIR set to this value, building these
crates would presumably succeed. For everyone else, the build fails
when building one of these crates because it will attempt to load from
the wrong directory. Presumably these crates should be using src_deps
instead (and once that's fixed, we should probably *unset* $OUT_DIR in
rustc invocations to prevent the same thing from happening again), but
for now, fix the build with non-default OUT_DIR by explicitly setting
OUT_DIR to "out" if there are no src_deps.

Change-Id: I09f99424fc01a1e42e910622c77ab8f7312819bd
2023-04-01 01:34:19 -07:00
Treehugger Robot
553d89a825 Merge "Fix rust snapshotInfo provider bug" 2023-04-01 06:41:25 +00:00
Vinh Tran
cde1016aff Reimplement afdo support for rust
Ignore-AOSP-First: The parent CL is internal
Bug: 267229065
Test: go test
Change-Id: Ia14679285b92f3f14ff269392a61f978c71311b2
Merged-In: Ia14679285b92f3f14ff269392a61f978c71311b2
2023-03-31 17:55:16 -04:00
Treehugger Robot
10361f5177 Merge "rust_proto: use protobuf crate version 2.x" 2023-03-31 10:37:24 +00:00
Inseob Kim
cd2b46aae3 Fix rust snapshotInfo provider bug
We must pass pointer of pointer to correctly cash snapshotInfo and
register provider only once.

Bug: 271215084
Test: build
Change-Id: Ia7b43c7b97a8fcabd3b4d6ac8b990c622b6ceb6e
2023-03-31 18:04:12 +09:00
Chris Wailes
fef4a02805 Remove stable feature from allowed features list
This CL removes the `default_alloc_error_handler` feature from the
allowed feature set passed to rustc.  This feature was stabilized in
Rust 1.68.0 and now that that has been deployed we can remove the
feature annotations from our codebase.

Bug: 267698452
Test: m rust
Change-Id: Ifc543ec83d3221cc8bcb6c83658abe09696b51ea
2023-03-29 16:18:04 -07:00
Treehugger Robot
0bdbc1c387 Merge "pass cc shared libs as order-only to rustc" 2023-03-29 18:25:50 +00:00
Sam Delmerico
51d6d1c585 pass cc shared libs as order-only to rustc
The library file for a cc_shared_library dependency is added to the linkFlags of the rustc compilation action, but no explicit dependency was made on it from a Ninja perspective if a TOC was also present. This change adds the explicit dependency on the library file whether or not a TOC is present.

Test: m crosvm
Bug: 275416061
Change-Id: I625b62762d9ba7b4fd2b8362285528e47f728dd4
2023-03-29 14:33:20 +00:00
Vinh Tran
2e7b0fd271 Add tests to verify more use cases of afdo in cc and rust
Test: go test
Bug: 267229065
Change-Id: I4aa9538e92aa27e0f842bdce3725bc82739196cb
2023-03-27 14:01:40 -04:00
Yi Kong
a137aa2e6e Merge "Revert^2 "Update clang version to clang-r487747"" 2023-03-24 13:19:52 +00:00
Jeff Vander Stoep
91c0466094 rust_proto: use protobuf crate version 2.x
Test: build
Bug: 270895633
Change-Id: I04e5e7fe70b8c509cd1b35852b75a0f24a633ce9
2023-03-24 09:32:36 +01:00
Yi Kong
fd07ed2c14 Revert^2 "Update clang version to clang-r487747"
9ede280375

Bug: 264965700
Change-Id: I4154c70c050a825525d5b591fa757104eb78c158
2023-03-23 14:14:31 +00:00
Treehugger Robot
ec68cf48e0 Merge "rustc-1.68.0 Build 9751466" 2023-03-21 17:51:27 +00:00
Spandan Das
0c7ea9582a Merge "Build rust libraries against C ModuleLib API surface." 2023-03-21 17:22:23 +00:00
Spandan Das
604f376dcf Build rust libraries against C ModuleLib API surface.
Previously, rust libs in platform would build against stubs even if the
dependency was part of platform. Port the correct logic from the
recently implemented aosp/2421967

Test: TH

Change-Id: I7f6a0ca24654b4424d2f4cfcef2d15e15b1298fc
2023-03-16 23:17:36 +00:00
Justin Yun
24b246a7a8 Fix the make name of rust snapshots
Rust snapshot must have proper suffix for androidmk to avoid conflict
with the existing modules.

Bug: 230780263
Bug: 235895567
Test: m nothing
Change-Id: I35794196553621cd722c067d7965b2a61aa351bd
2023-03-16 11:05:41 +09:00
Charisee
39f2d443ea rustc-1.68.0 Build 9751466
Bug: 270756468
Test: m rust
Change-Id: Ifa04d7fbbdc8ced9956aa50372df80ed6f481c02
2023-03-15 18:42:31 +00:00
Treehugger Robot
4b68649eb0 Merge "Remove slice_internals from features allow list" 2023-03-08 21:38:01 +00:00
Evgenii Stepanov
80d74920fd Introduce armv9-a arch variant.
Armv9 with mandatory PAC and BTI extensions.
Stack protector is disabled as it is irrelevant with PAC.

Bug: 263283855
Test: NFC
Change-Id: I2f298f21dade12824597e0a6920772a2bfc63afb
2023-03-07 11:18:52 -08:00
Chris Wailes
7d6e843e76 Remove slice_internals from features allow list
Test: m rust
Test: TH
Bug: 267698452
Change-Id: Ida4f4889d036392518639ce976d82ce6f19db1fd
2023-03-06 12:27:47 -08:00
Chris Wailes
5f78840308 Enable LTO for Rust dylibs
Test: m rust
Test: TH
Change-Id: I2257fe9fce1457821a5cf7df644c73f3137a62bb
2023-03-02 16:06:01 -08:00
Treehugger Robot
f58396a4c7 Merge "Update non-user-facing properties to be mutated" 2023-03-01 15:49:17 +00:00
Liz Kammer
884fe9e174 Update non-user-facing properties to be mutated
Test: m nothing
Test: CI
Change-Id: Ibfbb91653fa36277a19555a39a5df8da27a7a765
2023-02-28 14:29:13 -05:00
Chris Wailes
6d12db423c Disallow the use of new unstable features
This CL adds a set of allowed unstable featuers for Rust code.  The goal
is to get this down to an empty list.

Bug: 267698452
Test: m rust
Change-Id: I09e61bf19594101f064bdf67dc81c3b4d1236266
2023-02-24 16:58:18 -08:00
Chris Wailes
2760e81c82 Merge "rustc-1.67.1 Build 9645761" 2023-02-24 23:12:10 +00:00
Matthew Maurer
65a54a8e3d rust: Set android_vendor and android_product cfg
Add `android_vendor` and `android_product` cfgs, similar to
__ANDROID_VENDOR__ and __ANDROID_PRODUCT__ defines for C++

Bug: 270718001
Test: m nothing with added test
Change-Id: Ibeabe2983d1454e5a2ec0bb2f43e793b8f32a5c2
2023-02-24 19:21:08 +00:00
Chris Wailes
9744521db2 rustc-1.67.1 Build 9645761
Bug: https://issuetracker.google.com/issues/268053615
Test: m rust
Change-Id: Ie4919008285ce72a625676e65555a60160049db8
2023-02-23 11:35:19 -08:00
Dan Albert
30e66dcce5 Don't link bionicDeps for noStdlibs bindgen.
Bug: None
Test: treehugger
Change-Id: I213328f038061099d5c0dad0ef22cfd632ed268d
2023-02-23 19:17:50 +00:00
Chris Wailes
7b3eb24e29 Silence rustdoc warnings from 3rd party Crates
Test: m rustdoc
Change-Id: I25599845b2bec76d92fd325b62132aeac9dd74c4
2023-02-14 16:09:49 -08:00
Ivan Lozano
9ef9cb8b3f rust: Fix coverage in no-std crates
Coverage builds for no_std crates currently fail because
profiler_builtins are part of libstd and therefore do not get included.

When calculating the dependencies for coverage enabled targets, check if
the stdlib is being included, and if it is not then pull the
profiler_builtins sysroot.

Bug: 249551848
Test: CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS='*' make libtinyvec_nostd.rlib-std
Change-Id: I73f89bddcb2d4d9c704cb3962ee39b73888c7f3f
2023-02-14 11:04:21 -05:00
Chris Wailes
7ebba7ebf9 rustc-1.66.1 Build 9591243
Bug: https://issuetracker.google.com/issues/263153841
Test: m rust
Change-Id: I3927163f7df2bacb2096328d0557acf9c9668b77
2023-02-10 12:24:41 -08:00
Yi Kong
aa0833a8fb Merge "Migrate to the new clang lib dir" 2023-02-08 20:29:17 +00:00
Ivan Lozano
e37e1578c1 Merge "Copy Rust fuzzer dependencies to /data." 2023-02-08 13:46:17 +00:00
Yi Kong
bd1888156a Migrate to the new clang lib dir
Test: presubmit
Change-Id: I7ac7eb415a5f5c3d8b6d9298c1b4ccf2839aaea6
2023-02-08 19:54:05 +09:00
Colin Cross
1fecba1f72 Merge "Pass -C panic=abort to rustc linux bionic compilations" 2023-02-08 05:13:18 +00:00
Colin Cross
91c8f259eb Pass -C panic=abort to rustc linux bionic compilations
Pass -C panic=abort to rustc when targeting linux bionic to match
device bionic builds.  Fixes building on master-art-host when a
rust dependency is added to the linux bionic target.

Bug: 268035710
Test: master-art-host linux bionic build
Change-Id: I411a8622002709030dfd207b9decb8846a1ccef3
2023-02-07 09:55:25 -08:00
Chris Wailes
83ed187b2a Revert "rustc-1.66.1 Build 9561314"
Revert submission 2421642-rust-update-prebuilts-1.66.1

Reason for revert: Missing riscv support and out of date base64 crate causing brekages

Reverted changes: /q/submissionid:2421642-rust-update-prebuilts-1.66.1

Change-Id: I6c0d6c3539e766012570e4542f529706fe49928c
2023-02-06 20:36:37 +00:00
Ivan Lozano
0f9963e9e4 Copy Rust fuzzer dependencies to /data.
Fix an issue where rust_fuzz modules were
not correctly packaging and copying their
dependencies.

This is done by extending the CC fuzz packager
to simply handle both Rust and CC modules,
ensuring this doesn't get out of sync again.
Fuzzer related functions are added to the
Linkable interface to facilitate this.

There was a bug where the Make definitions for
Rust fuzzers were not being created as well,
and that is addressed here.

Bug: 249551848
Test: m android_log_fuzzer #check $OUT/data/fuzz/arm64/libs
Change-Id: I9b41153e0cf08ab510476b75003c3a3baccc3858
2023-02-06 13:48:23 -05:00
Chris Wailes
b85d7d459b rustc-1.66.1 Build 9561314
Bug: https://issuetracker.google.com/issues/263153841
Test: m rust
Change-Id: If7d96b940269d7be0bafc972ce78b4e14f8be09e
2023-02-03 15:52:51 -08:00
Chris Wailes
28f4af7955 Merge "Turn stable-features error into a warning" 2023-02-03 09:36:02 +00:00
Chris Wailes
0152dd9d69 Turn stable-features error into a warning
This CL turns the stable-features lint into a warning.  This is
necessary to complete toolchain updates until we finish enforcing the
"no unstable features policy".

Test: ./test_compiler --prebuilt-path ../../dist/rust-1.66.1.tar.gz
Bug: 267698452
Bug: 263153841
Change-Id: Ib095dea045111ad3d89327a694aa5fa5b7f3128c
2023-02-02 22:05:19 -08:00
Yabin Cui
43d873625f Update bindgen clang version to r475365b
Bug: 253033919
Test: build
Change-Id: I2fd71206a540da7001956f1f6f5aae5d4f925920
2023-02-01 11:17:09 -08:00
Treehugger Robot
f987b38cf9 Merge "Remove unused field 'subAndroidMkOnce'." 2023-01-31 21:52:29 +00:00
Colin Cross
dd60d3aa66 Merge "rustc-1.65.0.p1 Build 9523344" 2023-01-27 18:56:29 +00:00
Colin Cross
3970b9e990 rustc-1.65.0.p1 Build 9523344
Test: m rust
Change-Id: Idb592ac87af21d21caf43b46da21b49ab08c1dbf
2023-01-26 14:54:42 -08:00
Andrew Walbran
c61652ee5a Remove unused field 'subAndroidMkOnce'.
Test: m crosvm vmbase_example_bin
Change-Id: Ica201b8bfa89073bcd7d5e3c1a2822adfe7ad28c
2023-01-26 14:06:35 +00:00
Vinh Tran
ba46e76622 Merge "Delete __ANDROID_APEX_MIN_SDK_VERSION__ from Soong" 2023-01-25 19:09:27 +00:00
Matthew Maurer
993db7a7cc rust: Enable Rust modules in Product
The prohibition on Rust dylibs outside system still stands, but rlibs,
rust_ffi_static, and binaries will all work fine.

Test: m nothing (new soong tests added by this commit)
Test: Created sample product_specific rust_binary, checked out/ location
Bug: 165791368
Change-Id: I6453274064bb24b2019f38e57fc0d09b7c0fcf30
2023-01-24 16:39:52 -08:00
Vinh Tran
f9754735f2 Delete __ANDROID_APEX_MIN_SDK_VERSION__ from Soong
Currently, Bazel sets __ANDROID_APEX_MIN_SDK_VERSION__ based on the cc library's min_sdk_version while Soong does based on apex's min_sdk_version. This causes a diff in the clang commands.

Digging further, we realized __ANDROID_APEX_MIN_SDK_VERSION__ isn't used anywhere so we might just delete it altogether instead of fixing it.

Bug: 265134933
Test: presubmit
Change-Id: I08e89dc8f6ef86669248ea5c47de6603e9d2ffbb
2023-01-20 00:14:48 -05:00
Chris Wailes
60e7bbfd01 rustc-1.65.0 Build 9502310
Bug: https://issuetracker.google.com/issues/250026064
Test: m rust
Change-Id: Iee2719610de8628c32d1b013167aee54495d26c3
2023-01-18 14:47:15 -08:00
Colin Cross
225a37a7f0 Use the same rpaths for tests and binaries and cc and rust
Rust and cc binaries currently use $ORIGIN/lib64:$ORIGIN/../lib64 as the
rpath, and cc tests add $ORIGIN/../../lib64:$ORIGIN/../../../$ORIGIN:$ORIGIN.
This causes problems when a binary is included as test data in
out/host/linux-x86/testcases/<test dir>/<CPU>/<test>, as the
binaries can't find the libraries in out/host/linux-x86/lib64.

Use the same rpath for test and binaries, and for cc and rust.

Bug: 264604160
Test: m USE_HOST_MUSL=true out/host/linux-x86/testcases/acpi_tables_test_src_lib/x86_64/acpi_tables_test_src_lib && out/host/linux-x86/testcases/acpi_tables_test_src_lib/x86_64/acpi_tables_test_src_lib
Test: m USE_HOST_MUSL=true out/host/linux-x86/testcases/gen_sdk_test/x86_64/gen_sdk_test && out/host/linux-x86/testcases/gen_sdk_test/x86_64/toybox
Change-Id: I10fe5dc0de01d1f3c6aea8dbabbf60edab5989c3
2023-01-11 16:04:19 -08:00
Cole Faust
216805457c Allow adding extra tradefed options in the Android.bp file
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.

Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.

Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I50d4ad139322e9e207202f1e1a50f5bbb424aa6f
2023-01-03 12:47:11 -08:00
Jigar Thakkar
1d174b185f Merge "Revert "Allow adding extra tradefed options in the Android.bp file"" 2022-12-20 16:24:20 +00:00
Tahsin Loqman
77dc7d0839 Revert "Allow adding extra tradefed options in the Android.bp file"
This reverts commit 8ec823cba1.

Reason for revert: DroidMonitor: Potential culprit for Bug b/262965953 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I236cc36981d8b30527ca286632727f8ca267e969
2022-12-19 16:27:25 +00:00
Treehugger Robot
2731ca8377 Merge "Allow adding extra tradefed options in the Android.bp file" 2022-12-17 03:40:01 +00:00
Treehugger Robot
7853388422 Merge "Add arch variants for Intel Atom CPUs" 2022-12-14 03:32:13 +00:00
Cole Faust
8ec823cba1 Allow adding extra tradefed options in the Android.bp file
Some tests need to add custom tradefed options, but still want to
keep most of the soong autogenerated tradefed xml file.

Expose a test_options: { tradefed_options: [...] } property that
will allow tests to add more options to the autogenerated xml file.

Fixes: 184895128
Test: go test, and verified that the ninja files did not change for aosp_arm64
Change-Id: I75f7eb002c8325ce7cdc76e12e76e16195320620
2022-12-09 15:23:26 -08:00
Martin Geisler
a512bb53ad Merge "rust: expand docstrings for Rust module types" 2022-11-21 10:33:56 +00:00
Martin Geisler
3e9a5d9e2f Merge "rust: Test with full Rust “crate_type”" 2022-11-21 10:29:42 +00:00
Martin Geisler
67ec054ad0 rust: expand docstrings for Rust module types
This gives a tiny bit of context in the documentation and allows
people to more easily map the Soong build rules to the Rust
terminology.

Bug: 254469782
Test: atest
Change-Id: Ia8fde42c15919dd03954e9ebf83022d0a569407e
2022-11-18 12:11:03 +01:00
Martin Geisler
b8a4c2cad1 rust: Test with full Rust “crate_type”
What we call “static” in Soong is called “staticlib” in Rust, see
https://doc.rust-lang.org/reference/linkage.html for details.

Bug: 254469782
Test: atest
Change-Id: I65bba511d3ce8e7e53c6a1de3e77e30568934ce7
2022-11-18 12:10:58 +01:00
Martin Geisler
bd736daba3 rust: Fix indentation, convert to TABs
The two “rust_ffi_host” modules looked different in my editor because
one was indented with TABs and the other with spaces. They now
consistently use spaces (like the other examples in this file).

Test: atest
Change-Id: I7d0cdba5978da92a1a299bb290472403d4f13462
2022-11-18 11:59:09 +01:00
Ryo Hashimoto
f68c18f710 Add arch variants for Intel Atom CPUs
Bug: 259201836
Test: Build aosp_x86_64-eng with modified build/make/target/board/generic_x86_64/BoardConfig.mk
Change-Id: Ic7410d6874c17af0e4492bf7704066ae9af1a531
2022-11-16 17:26:53 +09:00
Colin Cross
6b89a133b3 Merge "Update musl bindgen clang lib directory" 2022-10-20 21:53:43 +00:00
Treehugger Robot
714203c354 Merge "Update bindgen clang version to r468909b" 2022-10-20 21:53:42 +00:00
Muhammad Haseeb Ahmad
431ddf9b76 Output shared dependendencies of JNI libs for Java fuzzers
Test: m example_java_jni_fuzzer
Bug: 252846698
Change-Id: Ib583de335482350bfe293f9c3d021a595edd4f44
2022-10-20 00:55:58 +00:00
Colin Cross
645874d0cd Update musl bindgen clang lib directory
Musl libclang.so is in musl/lib, not musl/lib64.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native -k
Change-Id: Id12630d5c0f51d85278f8562b3d988458a56021a
2022-10-18 12:26:05 -07:00
Colin Cross
8a5a1e2074 Update bindgen clang version to r468909b
r468909b is the first version to contain musl libclang.so.

Bug: 216192129
Test: m checkbuild
Change-Id: If4c986e285914ca909981ea5dc972c3047c2ac7c
2022-10-18 12:25:05 -07:00
Florian Mayer
296d595260 Driveby: remove duplicate condition
Change-Id: I8deddf40542d92a69d87334a292d6d1c038ae69a
2022-10-12 19:30:15 +00:00
Colin Cross
a497606f1d Merge changes I154a6f3a,I79f0c20a,I605ae9af,I647c7305,I95e96e3e, ...
* changes:
  Move fuzzer's CollectAllSharedDependencies into GenerateAndroidBuildActions
  Support AllowMissingDependencies in prebuilt_apex modules
  Support AllowMissingDependencies for apex dependencies
  Add AllowMissingDependencies support for prebuilt_etc module with no src property
  Make OutputFileForModule work for AllowMissingDependencies
  Fix panics when target arch is riscv64
2022-10-05 21:25:17 +00:00
Jihoon Kang
0b5f7f153f Merge "Specify jnilib partition in Android-<target>.mk" 2022-10-05 16:19:51 +00:00
Colin Cross
31d89b4e0c Move fuzzer's CollectAllSharedDependencies into GenerateAndroidBuildActions
Make rust and cc fuzzers collect their shared libraries once in
GenerateAndroidBuildActions and store it for later use by the
packaging singleton.  Also use android.OutputFileForModule to get
the paths.  Together this will fix fuzzers that depend on architecture
specific prebuilt shared libraries that are missing a prebuilt for an
architecture when building with AllowMissingDependencies.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I154a6f3a767c883e9fe7067003615db73ee78e2d
2022-10-04 19:15:45 -07:00
Colin Cross
a2aaa2fdef Fix panics when target arch is riscv64
Fix panics in api_level.go and apex.go when using riscv64 as the target
arch.

Bug: 250918230
Test: lunch aosp_riscv64-userdebug && m ALLOW_MISSING_DEPENDENCIES=true nothing
Change-Id: I85c7685f3d14fa2dc7ffbcdea7f490feca304ef7
2022-10-04 10:53:07 -07:00
Martin Geisler
b9f744157a Merge "Remove spurious trailing backslash in prefer_rlib docstring" 2022-10-04 08:48:58 +00:00
Jihoon Kang
f78a890183 Specify jnilib partition in Android-<target>.mk
Context
- Android-<target>.mk currently does not contain information about partition for its dependent unembedded jni libraries, but only lists the name of the unembedded jni libraries.
- If an android_app module depends on an unembedded jni library that is located in a different partition, make cannot find the library.

Implementation
- Create a string field partition in jniLib struct.
- Add variable "LOCAL_SOONG_JNI_LIBS_PARTITION_<target>", an array of mappings of the name of the jni library to its partition.

Bug: 154162945
Test: m
Change-Id: I6b8e1272ff59dc70e3dd6ce8c6c8e4686dad76df
2022-10-04 03:26:05 +00:00
Treehugger Robot
b9238c0b72 Merge "Drop rust dependency on musl_linker_script" 2022-10-03 20:12:51 +00:00
Colin Cross
9531e42407 Merge changes from topic "soong-riscv64"
* changes:
  Add riscv64-linux-android support
  Removed unused GCC references
2022-10-03 19:41:45 +00:00
Colin Cross
f05b0d35d2 Add riscv64-linux-android support
Add barebones riscv64-linux-android support.  This should be enough
to add riscv64-specific entries to Android.bp files, but can't
actually compile anything until there are riscv64 toolchains.

Test: arch_test.go
Change-Id: I0dcc7e797d9352dd38243be908a7f19004ff3db1
2022-10-03 08:43:13 -07:00
Colin Cross
9382c0628c Drop rust dependency on musl_linker_script
musl_linker_script is no longer required as the entry point is now
_start.

Bug: 242601708
Test: m USE_HOST_MUSL=true host-native
Change-Id: I5acfaeb181a2dd39aac72edd94bd2030881d9d27
2022-09-30 15:12:25 -07:00
Treehugger Robot
f99087d6d7 Merge "rust: Don't propagate apex across customBindgenTag" 2022-09-30 02:47:01 +00:00
Matthew Maurer
581b6d82ab rust: Don't propagate apex across customBindgenTag
customBindgenTag is used to describe a particular host tool - don't
propagate apex dependency across it.

Bug: 249849807
Test: Adding rusqlite to apex no longer requires bindgen allowed
Change-Id: Ifcb2a94c577c72558f757bf10e975212558fe790
2022-09-29 16:46:25 -07:00
Martin Geisler
46329e9ba4 Remove spurious trailing backslash in prefer_rlib docstring
Change-Id: I851306c73cb86df4bc4c82c3471ce3b6eaad9ded
2022-09-29 13:12:27 +00:00
Charisee
a688a793e4 rustc-1.64.0 Build 9099361
Test: m rust
Change-Id: I0f104dec7027a01524be155a63cae05f494c7101
2022-09-23 20:41:53 +00:00
Chris Wailes
af1e89e07b rustc-1.63.0 Build 8951290
Bug: https://issuetracker.google.com/issues/241303140
Test: m rust
Change-Id: Ie641a90154d5c3b9cedf671901116f68e5e47edb
2022-08-24 10:04:40 -07:00
Zhenhuang Wang
0ac5a431a9 Move common test_options properties into the android package
Multiple modules (e.g. java, cc, python, rust) define the `test_options`
field. Extract the common properties in test_options to share across
different test rules.

Bug: 240928948
Test: `refreshmod` and diff with original module-info.json
Change-Id: I404a7a157b4ccaa53d800ee2217559ff695bd825
2022-08-17 01:19:15 +08:00
Matthew Maurer
18fa8f641a Merge "Revert^4 "rust: Only allow bindgen to produce rlibs."" 2022-08-11 17:50:17 +00:00
Matthew Maurer
e94f3e73dd Revert^4 "rust: Only allow bindgen to produce rlibs."
199c188502

Change-Id: I28b353fa89354cc572806b2274169342a473a03c
2022-08-10 20:25:50 +00:00
Treehugger Robot
3a4088dfd1 Merge "Introduce cc_api_library" 2022-08-10 04:12:32 +00:00
Kiyoung Kim
487689eaee Introduce cc_api_library
Introduce cc_api_library, which reflects imported API from other
inner-tree. This cc_api_library module type will later refer from
the other ninja module which generates stub library from the interface
description.

Tested environment :
* original libc definition has been removed temporarily, to ensure that
  imported api stub library is being used from build
* Added new definition of libc as below
 cc_api_library {
  name: "libc",
  arch: {
    x86: {
      src: "libs/x86/libc.so",
    },
    x86_64: {
      src: "libs/x86_64/libc.so",
    },
  },
  header_libs: [
    "libc_headers",
  ],
  export_header_lib_headers: ["libc_headers"],
  min_sdk_version: "9",
  vendor_available: true,
 }

Bug: 236087698
Test: `ALLOW_MISSING_DEPENDENCIES=true m vendorimage` succeeded
Change-Id: I67070b0f3561aa2afd73b6c1c0fdf4255218baac
2022-08-10 10:12:18 +09:00
Matthew Maurer
801b058fe3 Merge "Revert^3 "rust: Only allow bindgen to produce rlibs."" 2022-08-02 23:28:26 +00:00
Matthew Maurer
199c188502 Revert^3 "rust: Only allow bindgen to produce rlibs."
9cc801ab7a

Change-Id: Ib59840b51b316c0ad03bc66565814dd96be0b072
2022-08-02 23:26:16 +00:00
Treehugger Robot
c4ee5535f1 Merge "Revert^2 "rust: Only allow bindgen to produce rlibs."" 2022-08-02 21:36:37 +00:00
Matthew Maurer
9cc801ab7a Revert^2 "rust: Only allow bindgen to produce rlibs."
b983c8971b

Change-Id: Ic82433885f7932be8cfe65433330527214807684
2022-08-02 16:57:30 +00:00
Matthew Maurer
d13d15a9c0 Merge "Revert "rust: Only allow bindgen to produce rlibs."" 2022-08-01 22:19:32 +00:00
Matthew Maurer
b983c8971b Revert "rust: Only allow bindgen to produce rlibs."
This reverts commit 53a452d1ff.

Reason for revert: Broken build

Change-Id: I4c1c6f2166c3729ef1916ad7c21e32599c5e692f
2022-08-01 21:59:00 +00:00
Matthew Maurer
a8ea3ff66e Merge "rust: Only allow bindgen to produce rlibs." 2022-08-01 20:50:41 +00:00
Matthew Maurer
53a452d1ff rust: Only allow bindgen to produce rlibs.
Generated bindings are intended to be slim translation layers, usually
consisting of nothing more than type signatures and constants.
Generally, they should also be used in exactly one location by the safe
wrapper for these bindings. By preventing them from building as
`dylib`s, we avoid the per-library overhead of these non-reused pieces
of code.

Additionally, default visibility restrict all bindgen modules to their
subpackages. This is being done both:
* to encourage use of a single safe bindings crate
* to avoid diamond dependency graphs with mixed rlib/dylib dependencies

Bug: 166332519
Test: m; Make sample module use dylib bindgen dependency, see build failure.
Change-Id: I8e9d9cb851c2ec99f4ed63e6e18c4ba26b29721c
2022-08-01 16:28:51 +00:00
Matthew Maurer
cf3844c879 rust: Rust is now GA for platform usage
Rust is now approved for general platform use without project-specific
review.

Bug: 240501326
Test: m
Change-Id: I6fd4c22ba2c6a3a5bac6f91fd087fe5cffe46c01
2022-07-28 06:57:26 -07:00
Charisee
d6a5b15dfe rustc-1.62.0.p1 Build 8836667
Test: m rust
Change-Id: I8e22ce766ccfb64263eba794aa75144c58ebb71a
2022-07-18 22:15:44 +00:00
Yi Kong
cc3ad51a36 Merge changes from topic "llvm-stable-r458507"
* changes:
  [bindgen] Allow unrecognised -Wno-* flags on LLVM_NEXT
  Add extra cflags for LLVM_NEXT
2022-07-15 07:30:57 +00:00
Cory Barker
b1c8940be1 Merge "Adding support for building AFLpp Test: Build AFL fuzzers locally and ran them" 2022-07-14 16:26:41 +00:00
Yi Kong
4f664e9128 [bindgen] Allow unrecognised -Wno-* flags on LLVM_NEXT
Test: LLVM_NEXT=true m
Bug: 236798112
Change-Id: I5d1625a30d7271c94cba71347f17fbcb0b87f4ae
2022-07-14 12:38:06 +00:00
Cory Barker
a1da26fa9b Adding support for building AFLpp
Test: Build AFL fuzzers locally and ran them

Change-Id: Ie4fbd258c87663cf81d7d64d575b3da1d5febc17
2022-07-12 21:31:47 +00:00
Cory Barker
14058f2c4a Merge "Revert "Adding support for building AFLpp Test: Build AFL fuzzer..."" 2022-07-12 20:20:00 +00:00
Cory Barker
7bc91232d1 Revert "Adding support for building AFLpp Test: Build AFL fuzzer..."
Revert submission 2124256-AFLpp support in Soong

Reason for revert: It is breaking the build
Reverted Changes:
Ie07ec3368:Adding support for building AFLpp Test: Build AFL ...
I5bd6d1e9b:Adding support for building AFLpp Test: Built AFL ...

Change-Id: Id2eec1060f7532fec46293d0c207be800e6eaa03
2022-07-12 18:04:17 +00:00
Cory Barker
7e0b4bae8a Merge "Adding support for building AFLpp Test: Build AFL fuzzers locally and ran them" 2022-07-12 17:21:05 +00:00
Cory Barker
f4b1c3a7a7 Adding support for building AFLpp
Test: Build AFL fuzzers locally and ran them

Change-Id: Ie07ec336892649192a844a4d0d231196673e34a0
2022-07-12 01:20:17 +00:00
Charisee
30332aee9b rustc-1.62.0 Build 8809119
Test: m rust
Change-Id: I6daa0f00428dc46bfb5cc1ca1ae8818fd233d708
2022-07-11 19:02:33 +00:00
Colin Cross
a8941ec69f Don't use prebuilt rust stdlibs for linux bionic
Linux bionic doesn't have rust stdlib prebuilts, don't use the prebuilts
when it is configured as the host os.

Bug: 216192129
Test: builds
Change-Id: I03425dee4b2e3659bf90c0a0c808cc286daa4b7f
2022-07-01 18:30:17 +00:00
Colin Cross
567d342ed8 Use musl rust prebuilts for USE_HOST_MUSL=true
Building rust code with musl enabled can load proc macro crates built
against musl into rustc, so we have to use a version of rustc also
built against musl.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native
Change-Id: Icd23b542a4b64a975850a8a4bb4b69183cc6c2c6
2022-07-01 02:58:14 +00:00
Colin Cross
1faf82305a Add rust musl arm and arm64 toolchains
Add rust toolchain configurations for arm-linux-musleabihf and
aarch64-linux-musl.

Bug: 236052820
Test: builds with linux musl arm64 host cross configured
Change-Id: Icfa73a75eac710e955f71a073cb4b7bb1cdfcc7a
2022-06-28 15:16:15 -07:00
Ivan Lozano
7f67c2a665 rust: Allow rust_ffi_shared in jni_libs
Allow listing rust_ffi_shared modules as a jni_libs dependency
in conjunction with platform_api: true. This allows inclusion by
android_app modules.

Bug: 237304791
Test: android_app module builds with a rust_ffi_shared dependency.
Change-Id: I3a28e1baa522ad8f9c2aa86f1d23b19ce9f967e1
2022-06-27 16:00:26 -04:00
Lukacs T. Berki
6c71676d6c Migrate sanitizers to transition mutators.
The logic is not 100% provably the same since HEAD was quite
confusing at some points, but I did make an effort to preserve
functional equivalence.

In case that effort was not enough, it should be pretty easy to
tweak the logic at HEAD since it's still quite malleable.

Bug: 231370928
Test: Presubmits.
Change-Id: I17b2efbfb5c4d0aedd922caed54ff8d857e578df
2022-06-18 06:20:28 +02:00
Chris Wailes
0a02aba00e rustc-1.61.0.p2 Build 8709792
Bug: https://issuetracker.google.com/issues/232437287
Bug: https://issuetracker.google.com/issues/216192129
Test: m rust
Change-Id: I84d4b9e70a53c0f057a286b77eb7dea6161c03a8
2022-06-13 12:05:33 -07:00
Treehugger Robot
fdc0540751 Merge "[rust/coverage] Use new flag for coverage instrumentation" 2022-06-07 23:44:02 +00:00
Pirama Arumuga Nainar
f1f6dd17d1 [rust/coverage] Use new flag for coverage instrumentation
> warning: `-Z instrument-coverage` is deprecated; use `-C
instrument-coverage`

Test: above warning is absent when running:
    $ m CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS=* rust
Change-Id: I8687c04534db3c8a67f209b93ed13d54c2f86dc8
2022-06-07 11:15:59 -07:00
Charisee
2f46ea40d1 rustc-1.61.0.p1 Build 8688465
Test: m rust
Change-Id: Ic565f8d0aca4081d2afa5b6ee64ed9c3f1d30a3d
2022-06-07 01:04:42 +00:00
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
Colin Cross
e32f093120 Support building rust modules against musl libc
Add a rust toolchain for musl libc, use std library built from source,
and add default dependencies on musl libc.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ic5ff4487db9693aeb08a13405f4d18465eecdc4b
2022-01-24 17:33:05 -08:00
Colin Cross
018cbebd71 Support genrules as CrtBegin and CrtEnd in rust
Musl will use a genrule output as a linker script in CrtBegin,
support genrules as Crt* dependencies.

This is equivalent to Ie384089d26459797d0b4b5fef84846507fc508ad
in cc.

Bug: 216192129
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ibc08fdcff7a6bca2a1ec05b781ce929080e211bd
2022-01-24 17:33:05 -08:00
Colin Cross
fe605e14ee Support multiple crtbegin and crtend dependencies
Musl libc with an embedded linker uses multiple crtbegin dependencies,
convert rust's CrtBegin and CrtEnd to lists.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ie843801e87b1f38ace84502d9e4f938a92ec1fa2
2022-01-24 17:33:05 -08:00
Yi Kong
7433f1d1dc Merge "AFDO for Rust" 2022-01-22 04:16:27 +00:00
Charisee
1a716de57e Update RustDefaultVersion to 1.58.1
Change-Id: Idf6b1e2a83eeb0bdace0583ab02d7c1b393b6c4c
2022-01-21 19:47:53 +00:00
Yi Kong
46c6e59415 AFDO for Rust
Bug: 195134194
Bug: 165018530
Test: build
Change-Id: I30932a22dc0b22716cdc925a3fcc5f9a169fcec4
2022-01-21 18:13:18 +08:00
Pirama Arumuga Nainar
3ae0b5a7c1 Merge "Revert memory mapped coverage" 2022-01-19 06:03:26 +00:00
Treehugger Robot
706ab94ee7 Merge "Allow tools/vendor to build rust" 2022-01-18 22:04:14 +00:00
Pirama Arumuga Nainar
aa966c5630 Revert memory mapped coverage
Bug: http://b/194128476
Bug: http://b/210012154

Reverts:
e6840726bd "[coverage] Override -Wframe-larger-than"
71d697c5cb "Enable memory-mapped coverage instrumentation"

Coverage metrics dropped for ~10 of the 40 modules.  There are also
regressions in mainline when running tests on older platform builds.

Test: presubmit
Change-Id: I4a2b005d3b54764b762b5422e03b7a9ec8727227
2022-01-18 13:13:47 -08:00
Richard Fung
3d11a5698a Allow tools/vendor to build rust
This is necessary to move the mk_payload package from
packages/modules/Virtualization/microdroid to an ARC owned directory.

Bug: 196891323
Test: m -j
Change-Id: Ifa3e509fb4ffa7861e45f69dd4654e8fbe1677ff
2022-01-18 18:26:35 +00:00
Ivan Lozano
2a1291d01d Merge "rust: Fix exported MinSdkVersion" 2022-01-14 22:39:09 +00:00
Ivan Lozano
a91ba25464 rust: Fix exported MinSdkVersion
The exported rust.MinSdkVersion always returns an empty string. Instead
it should return the Min_sdk_version property like rust.minSdkVersion.

This CL renames minSdkVersion to MinSdkVersion so the exported function
has the correct behavior.

Bug: 211858959
Test: m
Change-Id: I4fecfba711c0d3d7a22f4fdf7684924a9457b464
Merged-In: I4fecfba711c0d3d7a22f4fdf7684924a9457b464
2022-01-14 19:57:55 +00:00
Chris Wailes
57c23fa814 Update RustDefaultVersion to 1.58.0
This CL updates the RustDefaultVersion to the new prebuilt version
number and adds an argument to suppress a new linter warning,
non-send-fields-in-send-ty, that is prone to false positives.  See
https://github.com/rust-lang/rust-clippy/issues/8045 for more
information.

Test: m rust
Bug: 213921092
Change-Id: Ide568327f0a8994a6a934d14bb67b3139d0d98da
2022-01-13 17:14:17 -08:00
Treehugger Robot
e751b5355e Merge "Remove self from OWNERS" 2022-01-12 01:45:56 +00:00
Pirama Arumuga Nainar
6609484961 Merge "Enable memory-mapped coverage instrumentation" 2022-01-10 22:36:57 +00:00
Joel Galenson
bfa6a23761 Remove self from OWNERS
Test: None
Change-Id: I14317674f8c9487752ebc2d17c769ed777497ee8
2022-01-06 10:16:34 -08:00
Chih-Hung Hsieh
5140a042e1 Update clang version to clang-r437112b
Bug: 201432564
Test: make
Change-Id: I77bb074ed8dee7cad63d3b3765d9a2c3bc1b8aae
2022-01-05 16:44:51 -08:00
Treehugger Robot
9b3b15c382 Merge "rust: Register rustdoc with checkbuild" 2022-01-05 21:54:40 +00:00