We can save a significant amount of disk space by compressing debug info
in rust builds. This adds a flag that configures compressing debug info
at the link stage for rust binaries.
Test: m
Bug: 305277519
Change-Id: Ia85d8dc0e7bea35d9f9abfeae27a4610b3113e78
This CL changes the handling of Rust flags to only pass one of either
incremental or codegen-units. This is necessary because incremental
implies a codegen-units value of 128 and it may be overridden by the
separate codegen-units argument.
Test: TH
Change-Id: Ia474e4f9fc071d5054cb479ec9de550fa886677e
Prebuilt modules for some clang tools were created in aosp/2746469, but they do not exist for darwin builds. Adding the same modules in prebuilts/clang/host/darwin-x86/Android.bp results in duplicate module names. Instead we can just get a path to these files directly in Soong.
Test: CI
Test: https://android-build.googleplex.com/builds/abtd/run/L90700000963131594
Change-Id: I620cfd7b1ab34bd0959feea562d599b963717198
This commit adds support for compiling rust rules inside the sbox
sandbox. To compile a rust module with sandboxing enabled, the entry
point to the crate must be specified via the `crate_root` property, and
all input sources and compile-time data must be specified via the `srcs`
and `compile_data` properties.
Bug: 286077158
Change-Id: I8c9dc5cf7578037a583b4be2e2f73cf20ffd4408
This CL enables the following features for riscv64 Rust builds in
Android: V, Zba, Zbb, and Zbs
Test: m rust
Bug: 300313717
Bug: 300312461
Change-Id: I8712b1850a60a05e99a3e89e602bb56d2ccf2563
This adds support for correctly handling Rust sanitized snapshots,
ensuring they only have one variation.
The presence of multiple variations were causing build failures
when a rust_fuzz module for host was defined and a snapshot
build was requested.
This also sets -Z link-native-libraries=no on host modules
(in addition to device modules) to avoid emitting extra linkage
flags due to link attributes.
Bug: 282897366
Test: SOONG_SDK_SNAPSHOT_USE_SRCJAR=true m
Change-Id: Idf980c29145f11c530ad635a4eb5b01a1730ac24
The config constant is consumed by rust toolchain implemented in aosp/2709668.
Bug: 295918553
Test: go test
Change-Id: I0a28a802ad28f6ee24dfb1b5bdab72094534ae04
- 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
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
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
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
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
Armv9 with mandatory PAC and BTI extensions.
Stack protector is disabled as it is irrelevant with PAC.
Bug: 263283855
Test: NFC
Change-Id: I2f298f21dade12824597e0a6920772a2bfc63afb
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
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
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