Commit graph

210 commits

Author SHA1 Message Date
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
Treehugger Robot
7afffe6af0 Merge "Allow UWB to use Rust in reference HAL" 2022-01-28 22:08:36 +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
Charisee
1a716de57e Update RustDefaultVersion to 1.58.1
Change-Id: Idf6b1e2a83eeb0bdace0583ab02d7c1b393b6c4c
2022-01-21 19:47:53 +00:00
Treehugger Robot
706ab94ee7 Merge "Allow tools/vendor to build rust" 2022-01-18 22:04:14 +00: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
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
Matthew Maurer
c1738b449b rust: Migrate default edition to 2021
Bug: 210475268
Test: Presubmit
Change-Id: I915a8779c032dc463bf76a1a41f545d29a7be044
2021-12-13 18:20:53 +00:00
Chris Wailes
bc62193c7f Replace Rust global arg with more legible alternative
Bug: 201431719
Test: m rust
Change-Id: I5e0fae74e1df02f059ddcfa004b29059126a52e0
2021-12-09 13:56:32 -08:00
Yi Kong
203e6f4115 Add "-Z debug-info-for-profiling" flag for AutoFDO
Test: presubmit
Bug: 195134194
Change-Id: I0133ce99e2d5f415e553f7ae8e2ff93c739d6a32
2021-12-07 02:43:20 +08:00
Treehugger Robot
f8646fc937 Merge "Update RustDefaultVersion to 1.57.0" 2021-12-03 23:04:54 +00:00
Chris Wailes
284b7f32cc Update RustDefaultVersion to 1.57.0
Change-Id: I90e03f864541175e13701184ee74a89ffd03790b
2021-12-03 12:00:59 -08:00
Matthew Maurer
0e714da0f3 rust: Ensure unwind tables are generated
Currently, we are depending on a platform default in rustc's
android_base module to keep unwind tables generated. That default was
configured specifically to change the behavior for Firefox profiling
purposes prior to the existence of the override flag. As a result,
there's no structural reason the default will remain as is.

Bug: 193702360
Test: m
Change-Id: Ic5b57d5a31f4e67a66351a3f0efc530c95aa3836
2021-11-24 22:03:25 +00:00
Pirama Arumuga Nainar
1381dceeba Update rust prebuilt version to 1.56.1p1
Respin rust point release 1.56.1p1 with cherry-pick of
https://reviews.llvm.org/D104556 (needed for Rust coverage).

Bug: https://issuetracker.google.com/issues/206980172
Test: m rust
Change-Id: Ib63a7d8128c86ae9291c4f5275726cfc3bc15f48
2021-11-22 09:55:44 -08:00
Janis Danisevskis
73f2104588 Allow open-dice to build tests for generatied open-dice rust bindings.
Test: N/A
Bug: 205626417
Change-Id: Iafa79f07005b9863468252828c74ee199279c457
2021-11-12 20:33:49 +00:00
Treehugger Robot
09104df494 Merge "Add hardware/interfaces/security to rust allow list." 2021-11-12 00:55:52 +00:00
Matthew Maurer
739edbc0bc Merge "Update the Rust prebuilt version number to 1.56.1" 2021-11-10 23:57:44 +00:00
Janis Danisevskis
a9029d1f7e Add hardware/interfaces/security to rust allow list.
Test: N/A
Bug: 205626417
Change-Id: I3a648063c8380074713ce58957e4ac062a331e40
2021-11-10 10:59:46 -08:00
Baligh Uddin
5dd07e514e update allowlist to new path for bluetooth
BUG: 196026708
Test: TH
Merged-In: I53c4d72321c7c0aff589969989b5f1990aa0133c
Merged-In: Ia511786ea3f47f673d638bdde8581fe0a31a3cc1
Change-Id: I06e125dfa1f063903b5af9b8d37592b9446eb29e
2021-11-06 14:45:48 +00:00
Chris Wailes
60c22ec7ed Update the Rust prebuilt version number to 1.56.1
Bug: 201431381
Test: m rust
Change-Id: Ic3b428ff6eb4b1e346eb37c44468824fc1fb143d
2021-11-02 16:59:01 -07:00
Dan Willemsen
8528f4ec5e Add Darwin+Arm64 toolchain support
This just sets up the toolchain and allows Darwin+Arm64 to be specified
as a HostCross target. These variants will not be exported to Make, or
be installed on a Soong-only build. A future CL will add support for
universal binaries using these variants.

This config is a bit stranger than the regular 64/32 multilib, as it's
two primary 64-bit configs. And on a Darwin/X86 machine, the Arm64
versions are HostCross (doesn't work on the current machines), while a
Darwin/Arm64 machine, either version works (if Rosetta is installed).

Bug: 203607969
Change-Id: Iacaed77d267773672da027cd74917e33fb1c1e94
2021-11-01 15:07:37 -07:00
Treehugger Robot
2a524318e4 Merge "Add path of uwb NativeManager to rust allowlist." 2021-10-27 21:03:22 +00:00
ziyiw
f3d0222262 Add path of uwb NativeManager to rust allowlist.
Test: mmm
Bug: 197341298
Change-Id: I70a40f493efced15702dcd0f9ab50733ea23df9f
2021-10-27 11:28:17 -07:00
Joel Galenson
d993155204 Allow writing Rust fuzzers for third-party crates.
These would ideally be upstreamed, but until then we can host them here.

Test: Run fuzzers.
Change-Id: Ie1bfd8ce6dffeaa211b85cd6340dfb435ab83c71
2021-10-21 14:28:00 -07:00
Zach Johnson
5145e9d917 Add NFC to the Rust allowlist
rustfmt & preupload checks are being checked in shortly

Bug: 197333653
Test: compile
Change-Id: I91f14dc9a58d04fda6ae77de2ea5d85f481d0563
2021-09-17 12:08:44 -07:00
Christian Wailes
c3cb99e61b Merge "Update the Rust prebuilt version number to 1.55.0" 2021-09-13 16:39:37 +00:00
Chris Wailes
d23f0d07e1 Update the Rust prebuilt version number to 1.55.0
Bug: 199547393
Test: m rust
Change-Id: I05831a107b46019205c0a7d530b6f2a3b1beba75
2021-09-13 16:38:27 +00:00
Colin Cross
748c8c7e09 Make rust builds hermetic
Rust builds were picking up the crt objects and system libraries like
libc.so from /usr/lib/x86_64-linux-gnu/Scrt1.o and
/lib/x86_64-linux-gnu/libc.so.6.  Pass --sysroot to the linker to
point it to the glibc prebuilts.

Test: manual
Change-Id: I6540df8aef0e5c2258de77456d18a6052db627d4
2021-09-10 09:55:54 -07:00
Matthew Maurer
80f0eb1e01 rust: Add UWB to allowlist
Change-Id: Ic89e274412c97631f615e6e9ccd711e9300397d1
Test: None
2021-08-26 20:38:16 +00:00
Joel Galenson
a7614dd626 Add system/logging/liblog.
This is needed so it can run bindgen tests.

Test: Build
Change-Id: Iefcd1077e3b572c662474c4bb461b04dc66c6204
2021-08-23 14:02:49 -07:00
Joel Galenson
e4d6390558 Add libselinux to the Rust allowlist so we can run its test.
Test: Build and atest
Change-Id: Id828f286b35decfd16166e9cbb78cdf477014bf6
2021-08-10 11:54:14 -07:00
Treehugger Robot
27ac52198d Merge "Update the Rust prebuilt version number to 1.54.0" 2021-08-04 21:28:20 +00:00
Chris Wailes
3ac8f638df Update the Rust prebuilt version number to 1.54.0
This CL changes the Rust prebuilt version number from 1.53.0 to 1.54.0.

Test: m rust
Bug: 194812675
Change-Id: Icdbeab414dd39814f060e400cdca1fdb59f4f859
2021-07-30 18:10:30 +00:00
Joel Galenson
84be2fc380 Add librustutils to the Rust allowlist and remove libc.
Bug: 182498247
Test: Build
Change-Id: I0ea6c9b61cfdb667646e0067098f0ee5b9d9a2b3
2021-07-30 07:47:56 -07:00
Christian Wailes
3d976a7148 Merge "Update the Rust prebuilt version number" 2021-07-28 14:05:25 +00:00
Ivan Lozano
6d58321f94 Merge "rust: Add vendor/ to allowed list." 2021-07-27 18:30:43 +00:00
Ivan Lozano
dca00cb76b rust: Add vendor/ to allowed list.
Bug: 191507775
Test: N/A
Change-Id: I077459f545d4a16de092a3cce27ce97afb76d514
2021-07-27 11:58:38 -04:00
Chris Wailes
dff3901c89 Update the Rust prebuilt version number
This CL changes the Rust prebuilt version number from 1.52.1 to 1.53.0.

Test: m rust
Bug: 194400612
Change-Id: Icaafda64a267742593f7745aa4e90ed81665d075
2021-07-26 19:26:02 -07:00
Colin Cross
528d67e523 Reland "Split the x86 host toolchain into glibc and musl variants"
Split the x86 host toolchain into glibc and musl variants

Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.

This relands Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546 with changes
for I46672e3a096b6ea94ff4c10e1c31e8fd010a163c.

Bug: 190084016
Change-Id: Iaa9f7a50ff601155ecd73acc5701a2c226be66dc
Test: TestArchMutator
2021-07-23 22:25:36 +00:00
Colin Cross
c5647ca16e Merge "Revert "Split the x86 host toolchain into glibc and musl variants"" 2021-07-23 22:22:11 +00:00
Colin Cross
5d6904e1cf Revert "Split the x86 host toolchain into glibc and musl variants"
This reverts commit 4fb4ef2242.

Reason for revert: crossed with aosp/1775072

Change-Id: Ied922850b810d82627ba4f9ee42f672cfe286c91
2021-07-23 22:20:29 +00:00
Colin Cross
7628e933b6 Merge changes Idbeb4819,Ifc02f9e5
* changes:
  Add dynamic_list property
  Split the x86 host toolchain into glibc and musl variants
2021-07-23 22:08:19 +00:00
Treehugger Robot
02fa0c36e4 Merge "Update the Rust prebuilt version number" 2021-07-23 20:18:30 +00:00
Colin Cross
4fb4ef2242 Split the x86 host toolchain into glibc and musl variants
Create new musl toolchains that are based on the existing glibc
toolchains, and add the necessary flags for musl compiles.

Bug: 190084016
Test: TestArchMutator
Change-Id: Ifc02f9e5afa61ff758be98b0c962f3a4b53d0546
2021-07-23 08:57:17 -07:00
Chris Wailes
f498417977 Update the Rust prebuilt version number
This CL changes the Rust prebuilt version number from 1.51.0 to 1.52.1.

Test: TH
Change-Id: I02bf6166323040621dcbfe9c823bb1982a2e9a36
2021-07-22 16:22:05 -07:00
Joel Galenson
0ba9cd4cc8 Add libc to Rust allowlist.
Bug: 182498247
Test: Build
Change-Id: I3049967e9736e1c0c802f7678f5cafeb6644d4aa
2021-07-21 10:34:51 -07:00
Ivan Lozano
2bd6cce95a Merge "rust: Remove libtest from stdlibs list" 2021-07-16 14:44:25 +00:00
Ivan Lozano
3ee74c8252 rust: Remove libtest from stdlibs list
libtest does not need to be linked for every module type, so remove it
from the stdlibs list. Instead, link it only when building benchmarks or
tests.

Bug: 193782599
Test: cd external/rust/crates/; mma
Test: Rust tests still run correctly.
Change-Id: I536be8754da0987e09340744d9ebf668b8e734d0
2021-07-15 15:45:31 -04:00
Colin Cross
0523ba2675 Rename ninja variables with Clang in the name
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
2021-07-14 20:55:23 -07:00
Ivan Lozano
03a94c48da rust: Add missing Rust allow path modules.
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
2021-06-28 11:59:07 -04:00
Matthew Maurer
5fa13b8457 Merge "Enable overflow checks in Rust" 2021-04-26 20:46:21 +00:00
Jeffrey Vander Stoep
3e2d4d419b Merge "Disable clippy::upper-case-acronyms" 2021-04-09 17:48:43 +00:00
Jeffrey Vander Stoep
e9fb49b555 Merge "Rust: use 1.51.0 prebuilts" 2021-04-09 17:48:43 +00:00
Bram Bonné
2b9ee14ce0 Merge "Allow Rust code in system/logging/rust" 2021-04-08 07:47:45 +00:00
Jeff Vander Stoep
0f36d16fee Disable clippy::upper-case-acronyms
Bug: 184269635
Test: TH
Change-Id: Ib941f9d625d1b8cfc395fd926ddf301e11fb0c4a
2021-04-01 19:40:37 +02:00
Jeff Vander Stoep
60b2234c8d Rust: use 1.51.0 prebuilts
Test: TH
Change-Id: I11c10eda1e989db5084556ff248ff0d0fa85b98c
2021-03-31 11:35:35 +02:00
Joel Galenson
f4b139abcd Add system/core/libstats to the Rust allowed list.
This is where the Rust statspull API will live.

Test: Build
Change-Id: Ia3cae85c576fa3caacd87395dc76069b26e134de
2021-03-30 13:40:43 -07:00
Matthew Maurer
378bf736ed Enable overflow checks in Rust
Bug: 184063125
Test: Existing Rust Test Suites
Change-Id: I1b8f3cb22a229bfc7da81bf3857f6bf5a9f6c220
2021-03-30 11:49:08 -07:00
Bram Bonné
e45541d825 Allow Rust code in system/logging/rust
Bug: 162454083
Test: make logger
Change-Id: I1116b930af7e06be31c237867fecc6ccd609e4b3
2021-03-29 16:02:53 +02:00
Thiébaud Weksteen
f1ff54a10b rust: Drop libgcc dependency
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
2021-03-23 13:55:40 +01:00
Treehugger Robot
2046a0c1c7 Merge "Add stats directory to Rust allowed list." 2021-03-09 19:13:49 +00:00
Ivan Lozano
b6d0d9cec4 rust: Disable Byte Grouping Linter
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
2021-02-25 11:24:35 -05:00
Jeffrey Vander Stoep
8348e09173 Merge "Disable unnecessary_wraps clippy lint" 2021-02-20 07:06:41 +00:00
Jeffrey Vander Stoep
92c674dc32 Merge "Update Rust toolchain to 1.50.0" 2021-02-20 07:06:41 +00:00
Jeff Vander Stoep
41f8157ba7 Disable unnecessary_wraps clippy lint
Bug: 180268112
Test: build
Fixes: 180703142
Change-Id: I13f3de49318a6a9d2141042836a08ba7e300648f
2021-02-19 17:19:39 +01:00
Jeff Vander Stoep
dc79fe85e7 Update Rust toolchain to 1.50.0
Bug: 180268112
Test: mm crosvm
Change-Id: Ib36f252a99e06059b413326b8f9d1733534facbc
2021-02-17 23:53:18 +01:00
Dan Albert
a175126009 Merge "[arm64] Build NDK with PAuth and BTI" 2021-02-17 21:37:41 +00:00
Joel Galenson
77a684e8fb Add stats directory to Rust allowed list.
Bug: 178390804
Test: Build Rust code in that directory.
Change-Id: I3b83fdab4158df8aaf7fed164e5a015cd73772e1
2021-02-17 11:22:38 -08:00
Bob Badour
02040de891 Add LOCAL_LICENSE_KINDS to build/soong
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  android/Android.bp
  android/soongconfig/Android.bp
  androidmk/Android.bp
  apex/Android.bp
  bazel/Android.bp
  bp2build/Android.bp
  bpf/Android.bp
  bpfix/Android.bp
  cc/Android.bp
  cc/config/Android.bp
  cc/libbuildversion/Android.bp
  cc/libbuildversion/tests/Android.bp
  cc/ndk_api_coverage_parser/Android.bp
  cc/ndkstubgen/Android.bp
  cc/symbolfile/Android.bp
  cmd/dep_fixer/Android.bp
  cmd/diff_target_files/Android.bp
  cmd/extract_apks/Android.bp
  cmd/extract_jar_packages/Android.bp
  cmd/extract_linker/Android.bp
  cmd/fileslist/Android.bp
  cmd/host_bionic_inject/Android.bp
  cmd/javac_wrapper/Android.bp
  cmd/merge_zips/Android.bp
  cmd/multiproduct_kati/Android.bp
  cmd/path_interposer/Android.bp
  cmd/pom2bp/Android.bp
  cmd/pom2mk/Android.bp
  cmd/sbox/Android.bp
  cmd/soong_build/Android.bp
  cmd/soong_env/Android.bp
  cmd/soong_ui/Android.bp
  cmd/zip2zip/Android.bp
  cmd/zipsync/Android.bp
  cuj/Android.bp
  dexpreopt/Android.bp
  dexpreopt/dexpreopt_gen/Android.bp
  env/Android.bp
  etc/Android.bp
  filesystem/Android.bp
  finder/Android.bp
  finder/cmd/Android.bp
  genrule/Android.bp
  jar/Android.bp
  java/Android.bp
  java/config/Android.bp
  kernel/Android.bp
  linkerconfig/Android.bp
  linkerconfig/proto/Android.bp
  makedeps/Android.bp
  partner/Android.bp
  phony/Android.bp
  python/Android.bp
  python/tests/Android.bp
  remoteexec/Android.bp
  rust/Android.bp
  rust/config/Android.bp
  scripts/Android.bp
  sdk/Android.bp
  sh/Android.bp
  shared/Android.bp
  symbol_inject/Android.bp
  symbol_inject/cmd/Android.bp
  sysprop/Android.bp
  tradefed/Android.bp
  ui/build/Android.bp
  ui/logger/Android.bp
  ui/metrics/Android.bp
  ui/metrics/proc/Android.bp
  ui/status/Android.bp
  ui/terminal/Android.bp
  ui/tracer/Android.bp
  xml/Android.bp
  zip/Android.bp
  zip/cmd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  finder/fs/Android.bp
  third_party/zip/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
2021-02-06 04:23:21 +00:00
Matthew Maurer
20768b8840 rust: Use v0 mangling format globally
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
2021-02-02 00:23:26 +00:00
Yi Kong
2c9b3e0e25 Add system/extras/simpleperf to Rust allowed paths
This is to allow simpleperf to export rust bindings for use by
profcollect.

Test: build
Change-Id: I187139d6133c144e86cbdb05d20c2515c189718e
2021-01-27 15:48:31 +08:00
Jeff Vander Stoep
bf7a902951 Rust: abort on panic
Test: build (test included in build)
Bug: 162266455
Change-Id: I7f53956d3a35f923d0282d511d6360051f945a88
2021-01-26 09:09:06 -05:00
Tamas Petz
bca786d742 [arm64] Build NDK with PAuth and BTI
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
2021-01-26 08:15:07 +01:00
Ivan Lozano
6cd99e6ab4 Add Rust fuzzing support.
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
2021-01-25 11:11:10 -05:00
Thiébaud Weksteen
d7e51e0891 Merge "Use 1.49.0 prebuilts" 2021-01-14 18:26:41 +00:00
Thiébaud Weksteen
cb738204fa Use 1.49.0 prebuilts
Bug: 176888219
Test: build external/rust/crates
Change-Id: I979720ac75e8546058c23ac86b2b64ac518b115c
2021-01-08 14:20:04 +01:00
Peter Collingbourne
b143cd9482 Enable debug info in Rust modules.
This allows tombstones to be symbolized and is consistent with C/C++
where we pass -g.

Bug: 173723155
Change-Id: I597e2bf97517407b428277f1cf7aa19b73371efa
2021-01-07 12:05:04 -08:00
Treehugger Robot
4d24e65bbf Merge "Put external/libchromeos-rs in the Rust allowlist" 2020-12-15 23:28:19 +00:00
Ivan Lozano
78b340f375 Merge "Add LinuxBionic toolchain to Rust" 2020-12-08 22:04:49 +00:00
Ivan Lozano
bf3b6e9b8d Add LinuxBionic toolchain to Rust
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
2020-12-08 09:04:21 -05:00
Victor Hsieh
274597b951 Put external/libchromeos-rs in the Rust allowlist
Bug: 174797066
Test: m
Change-Id: Ieef7df3c17e6d6b1223769cfd07301dfe7d91363
2020-12-04 11:21:06 -08:00
Bernie Innocenti
3a710d6bbb Allow rust code in packages/modules/DnsResolver
Test: m com.android.resolv.apex
Change-Id: I6cb5234f51ac6c31440e7cd5aeca4655629a35d6
2020-12-05 02:55:53 +09:00
Treehugger Robot
93bfe6bf76 Merge "Allow rust code in device/google/cuttlefish" 2020-12-01 00:16:41 +00:00
Thiébaud Weksteen
c6fe19d637 Use 1.48.0 prebuilts
Bug: 173721343
Test: build external/rust/ and crosvm
Change-Id: Ifde24640fc262c5eebdcd623556e925e7d78ae85
2020-11-27 14:42:57 +01:00
A. Cody Schuffelen
4e5fc3b422 Allow rust code in device/google/cuttlefish
Test: TreeHugger
Change-Id: If7bce48e101bd49389d952556bfdf95d7899f01b
2020-11-25 18:29:39 -08:00
Thiébaud Weksteen
3e0d3f6ef5 Use Rust 1.47.0 prebuilts
Bug: 171280890
Test: cd external/rust; mm
Change-Id: I61097821a73a28a383a07b1fdcfe867872397b43
2020-11-05 17:35:34 +01:00
Thiébaud Weksteen
71512f3265 rust: set STD_ENV_ARCH
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
2020-11-05 17:35:17 +01:00
Qasim Javed
d271ada0c9 Add system/bt to Rust allowed paths.
Test: m nothing

Change-Id: Ie467a622dfdb8aea94a06f5fe20183dc9d149254
2020-10-29 11:18:08 -07:00
Alistair Delva
ea2974c8b3 Add external/vm_tools/p9 to rust allowed paths
Change-Id: Ifccb7b94a6655524b99d669168c54cf93eed5f89
2020-10-21 06:57:00 -07:00
Alistair Delva
e172eaf67b Alpha sort rust allowed_list.go
Change-Id: If0e9938bb776f42037b57680505de19b9cd88771
2020-10-21 06:56:20 -07:00
Andrew Scull
5a58bca1f4 Update rustfmt preupload example reference
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
2020-10-13 13:52:37 +01:00
Andrew Scull
af2015d7d6 Allow packages/modules/Virtualization to use rust
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
2020-10-13 11:43:52 +01:00
Joe Onorato
a80b480eea Refactor OWNERS files in platform/build/soong.
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
2020-10-08 16:14:32 -07:00
Treehugger Robot
614b06c8ce Merge "Add allow rust rule for android.system.keystore2 vts tests." 2020-10-06 21:03:42 +00:00
Janis Danisevskis
1edd039bff Add allow rust rule for android.system.keystore2 vts tests.
Bug: 160623310
Test: N/A
Change-Id: Ie501a56c3ed6c1352fc57b5b956df6ac3f4af39f
2020-09-30 14:43:40 -07:00
Thiébaud Weksteen
425a542e2b rust: document manual configuration for rustfmt
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
2020-09-30 08:37:42 +00:00
Matthew Maurer
ad64c39442 Switch to armv7 for Rust ARM
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
2020-09-24 14:28:47 -07:00
Roland Levillain
dba548af83 Merge "Introduce new Arm64 arch variant with dot product features" 2020-09-21 17:54:04 +00:00
Jeffrey Vander Stoep
4b524bac10 Merge "Use Rust 1.46.0 prebuilts" 2020-09-21 13:04:33 +00:00