This adds a cfg flag `android_platform` which can be used
to indicate there's some conditional compilation need specific to
AOSP.
Test: New flag is emitted on builds
Change-Id: I833a7d68db2dad7ab2d32a5eb51d764f0d66b849
There was infrastructure to export ninja variables to bazel. Now that
the bazel migration is cancelled, we don't need it anymore.
Bug: 315353489
Test: m nothing
Change-Id: I298cc2ac7ebd004557be3b30d75f7357cab0b7a0
https://rust-lang.github.io/rust-clippy/master/index.html#/disallowed_names
The current list is extremely short ("foo", "baz", "quux"), and thus
this really just prevents people from temporarily using `foo` to debug
code. In the spirit of improving productivity and reducing frustration,
it's easier to just allow this.
Bug: N/A
Test: TH
Change-Id: I50b65486ed2b58bfd2cf699ee3b43b936d25f2cb
This lint is part of Rust 1.75.0, but has a lot of problems with FFI
data types that change size between 32-bit and 64-bit targets. This
makes the lint check far less useful, so we are just globally
suppressing it for now.
Bug: http://b/321303117
Test: m
Change-Id: I39531c961a26f533451d73b025caca02e593a269
For chromebooks, we need a new build variant whose target arch is
goldmont, but without SHA and XSAVES support (b/314243939#comment21)
Bug: 314243939
Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-sha-xsaves
Change-Id: If73660b515b443d5c138ca367fa3d1c6f18485b5
Its target arch is goldmont, but without xsaves support.
This ensures efficient execution on a broad range of Intel/AMD CPUs used
in Chromebooks, including those lacking xsaves support.
(e.g. Kaby Lake, Gemini Lake, Alder Lake and AMD Zen series)
Bug: 314243939
Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-xsaves
Change-Id: I9963cc3356394815f068fc998a9708bdb30c8266
Remove the ConvertWithBp2build implementations from all the module
types, along with the related code.
Bug: 315353489
Test: m blueprint_tests
Change-Id: I212672286686a318893bc7348ddd5a5ec51e77a7
Upstream currently uses pthread keys to emulate TLS on Android because
it historically did not have it, and is going to move to LLVM emulated
TLS, which is needed to target L. Since we know the platform is Q+, we
can just use the new features.
Test: Treehugger
Change-Id: I7c7747d89cba736377cfeb4080573a89b801e8fe
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