Commit graph

1090 commits

Author SHA1 Message Date
Alex
91c74762f8
rust: Remove unnecessary escaping in grep call
Replicate cfeec1c2dd in the Clippy rule.

Bug: 333445551
Change-Id: I84134569af0f28730a483f091e6da4c78de83b9c
2024-04-12 11:04:22 +02:00
Ivan Lozano
2aee601e95 Merge "rust: Fix handling of bindgen header libs" into main 2024-04-11 13:20:46 +00:00
Charisee
92b7f386e0 rustc-1.77.1 Build 11685613
Test: m rust
Change-Id: I381106a54245b5d096dfcb0b3449f7ef440d067c
2024-04-09 19:39:01 +00:00
Cole Faust
8982b1c49e Remove "exported" ninja variables
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
2024-04-09 09:42:37 -07:00
Kiyoung Kim
4e765b1bfc Remove Device VNDK version usage from Soong
As of VNDK deprecation, Device VNDK version should no longer be used
from build. This change removes all references on Device VNDK version
and related logic with it.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: Ibc290f0b41e8321f80c75c69f810223989af68dc
2024-04-05 01:57:32 +00:00
Kiyoung Kim
37693d0a27 Deprecate Snapshot build
Existing snapshot code will no longer work from VNDK deprecation, but it
can give confusion to users if we keep code for the snapshot - and it
adds complexity on existing code while it is not in use. This change
removes all snapshot definition except host snapshot and its usage.

Bug: 330100430
Bug: 332986564
Test: AOSP CF build succeeded
Change-Id: Ieb6fa43d5e38315c662ce997bc305b744b367c24
2024-04-05 01:56:56 +00:00
Kiyoung Kim
1db4a74a59 Remove VNDK information from Rust, etc, and sysprop tests
VNDK is deprecated in 24Q2, so soong should be tested with no device and
platform vndk versions. This change removes all VNDK related tests and
VNDK versions from soong-etc, soong-rust and soong-sysprop tests.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: Ie34d23f0facab31078de54682f7cc78d37fcd4be
2024-04-01 15:53:58 +09:00
Ivan Lozano
e2524fb87e Merge "rust: Remove unnecessary escaping in grep call" into main 2024-03-29 16:31:44 +00:00
Ivan Lozano
1dbfa144f9 rust: Fix handling of bindgen header libs
Static libraries were being appended to the list of header library
dependencies. They should not be. This also makes sure we track them
appropriately in Make.

Test: m blueprint_tests
Change-Id: Ifa664f09fe2102aea57d22cbaaeba71f0c26074d
2024-03-29 16:30:30 +00:00
Ivan Lozano
cfeec1c2dd rust: Remove unnecessary escaping in grep call
Modules with special characters wouldn't build correctly because $out
was being double escaped -- once in the build command and once by Soong
itself.

Remove the escape in the build command and just let Soong escape as
necessary.

Bug: 320578837
Test: Module with @ in name builds
Change-Id: Ic2554b9c07f37783287e1ebdeb06ef8b7b66a296
2024-03-28 19:27:24 +00:00
Kiyoung Kim
0d1c1e6aef Remove VNDK information from CC and APEX tests
VNDK is deprecated in 24Q2, so soong should be tested with no device and
platform vndk versions. This change removes all VNDK related tests and
VNDK versions from soong-cc and soong-apex tests.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: I45e6c13e6c0a6bc9710b120e8d5b167e2051631e
2024-03-28 15:15:01 +09:00
Kiyoung Kim
d8ec229bc0 Remove vendor_snapshot_test
Remove vendor_snapshot_test from cc and rust as they are no longer in
support.

Bug: 330100430
Test: m nothing --no-skip-soong-tests passed
Change-Id: Ia798bc1c87d3f1d73ea5866dc85ff4073f5f9c5b
2024-03-28 15:11:16 +09:00
Ivan Lozano
aad0b20d2b Merge "rust: Add export_include_dirs property to rust_ffi" into main 2024-03-22 12:59:06 +00:00
Ivan Lozano
f033ca61a2 rust: Add export_include_dirs property to rust_ffi
The cc property include_dirs is neverallowed in certain paths since it
has been deprecated. The property in rust_ffi modules with the same name  functionally works the same way as the CC property export_include_dirs.

To reduce confusion, and avoid triggering the neverallow rule, deprecate
include_dirs and create an export_include_dirs property which does the
same thing. This brings rust module properties into better alignment
with cc module property as well, reducing confusion.

Bug: 330736943
Test: New Soong test
Change-Id: Ib2020a22e6747ac690c46dbff84e38744f93ed15
2024-03-21 17:53:19 +00:00
Andrew Walbran
52533237ef Add aliases property for renaming Rust dependencies.
This is equivalent to specifying a dependency name different to the
package name in cargo, which some external crates do.

Bug: 308790322
Test: Built libgrpcio with aliases for protobuf
Change-Id: I2801222051fdd962460cc7f4900cec357f63b974
2024-03-19 17:27:46 +00:00
Yu Liu
73cf0e87b4 Merge "Support rust in aconfig mode validation." into main 2024-03-18 20:49:35 +00:00
Yu Liu
c888460e5d Support rust in aconfig mode validation.
Bug: 323071835
Test: Unit tests
Change-Id: I6de2a6fe1618e21c9aab728e6d77c6b0c6ce33df
2024-03-15 18:48:38 +00:00
James Farrell
e288cdeda1 rustc-1.76.0 Build 11569723
Bug: https://issuetracker.google.com/issues/327204642
Test: m rust
Change-Id: I3b39a12d1379a9193d348b364897d7df9de16330
2024-03-13 19:47:51 +00:00
Stephen Hines
5f8dae514b Allow clippy::disallowed_names since it can be used for debugging
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
2024-02-29 10:12:19 -08:00
Yi Kong
52e5e6b1a7 bindgen: set -Wno-unknown-warning-option flag by default
Test: presubmit
Change-Id: Id8547c0b3263f4e3b060f8b0fce2aef8a494b1b2
2024-02-25 12:49:41 +08:00
Stephen Hines
b0e708d03d Merge "rustc-1.75.0 Build 11471753" into main 2024-02-22 07:29:40 +00:00
Andrew Walbran
a5deb7307d Revert^4 "Integrate Rust-specific System Properties into rules generation."
This reverts commit 2766baa922.

Reason for revert: Relanding after fix in I3b190ebc1a1096972d0a1273e490972e04684dd2

Change-Id: Ie34301c506d3469ec3306f433631b0842b66d032
2024-02-21 11:53:18 +00:00
Stephen Hines
41f2ab846a rustc-1.75.0 Build 11471753
Bug: https://issuetracker.google.com/issues/321303117
Test: m rust
Change-Id: I90f0efb4eb3b6fcc41fbe256a9079e0e5647663c
2024-02-20 14:59:31 -08:00
Joonhun Shin
af9fc549ca Merge "Revert "Make building Rust targets faster in eng builds"" into main 2024-02-16 07:56:01 +00:00
Joonhun Shin
fad3e69d7f Revert "Make building Rust targets faster in eng builds"
This reverts commit 6146cf4b98.

Reason for revert: <b/325547632>

Change-Id: Ifd3619c5db5b989edb4aa2c37f85e5cd88d0c633
2024-02-16 07:26:14 +00:00
Chris Wailes
3fae67a32d Merge "Make building Rust targets faster in eng builds" into main 2024-02-15 23:12:27 +00:00
Paul Duffin
a0f0bdbced Merge "Revert^3 "Integrate Rust-specific System Properties into rules generation."" into main 2024-02-15 12:45:47 +00:00
Paul Duffin
2766baa922 Revert^3 "Integrate Rust-specific System Properties into rules generation."
This reverts commit ac0c87311d.

Reason for revert: breaking the same bug, b/323833345 as before

Change-Id: I474c032148f22c4b98f7adf23be61807fa0500a0
2024-02-15 11:54:17 +00:00
Andrew Walbran
e38e2c0071 Merge "Revert^2 "Integrate Rust-specific System Properties into rules generation."" into main 2024-02-15 10:31:49 +00:00
Andrew Walbran
ac0c87311d Revert^2 "Integrate Rust-specific System Properties into rules generation."
This reverts commit be3ea4f149.

Reason for revert: Reland

Change-Id: Ic003c52a1477da9a6a70b82e4d4ae4a55edc584f
2024-02-14 10:25:55 +00:00
Ivan Lozano
c2d4959bb4 Merge "rust: Re-enable host address sanitizer." into main 2024-02-13 16:34:42 +00:00
Colin Cross
a82de712b3 Merge changes from topic "revert-2952265-revert-2925209-KVPWEBRQHT-BBCOVJBOVF" into main
* changes:
  Remove fdoProfileMutator
  Convert AFDO mutators to TransitionMutator
2024-02-12 19:31:00 +00:00
Ivan Lozano
357433ae73 rust: Re-enable host address sanitizer.
Our toolchain supports a flag "-Z external-clangrt=true" which prevents
rustc from emitting a missing dependency to librust-dev_rt. Instead, we
link in libclang_rt.

Bug: 304507701
Bug: 324826914
Test: SANITIZE_HOST=address m aconfig
Change-Id: I8020c550b7a922c80620f61c22e01848a4f4a349
2024-02-12 14:16:26 -05:00
Stephen Hines
f8ffb6d4c2 Allow clippy::unnecessary_fallible_conversions
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
2024-02-09 15:36:35 -08:00
Colin Cross
d38feb0d4a Convert AFDO mutators to TransitionMutator
Convert afdoDepsMutator and afdoMutator to a TransitionMutator as a
step towards variants-on-demand.

This relands Ib05845455ccf43a07b3915a0d7b0a95896062f13 with a fix
to maintain the current behavior of not using AFDO variants for
dependencies of the linker static binary.

Bug: 319288033
Bug: 324141705
Test: afdo_test.go
Change-Id: I76e30021173fc5b7e9e1fa826039776eb3dc7b6e
2024-02-07 15:51:40 -08:00
Ke-Yu Lu
196d9493c4 Merge changes from topic "revert-2925209-KVPWEBRQHT" into main
* changes:
  Revert "Convert AFDO mutators to TransitionMutator"
  Revert "Remove fdoProfileMutator"
2024-02-06 05:46:07 +00:00
Ke-Yu Lu
0be9d6034e Revert "Convert AFDO mutators to TransitionMutator"
Revert submission 2925209

Reason for revert: b/323975183

Reverted changes: /q/submissionid:2925209

Change-Id: Ie907d23081817d601a1a2083347b5f683829a36c
2024-02-06 02:15:03 +00:00
Kiyoung Kim
e5b8b97322 Merge "Reapply "Rename LOCAL_USE_VNDK"" into main 2024-02-06 00:57:21 +00:00
Colin Cross
6c392749d5 Merge changes Ied8fd7b5,Ib0584545 into main
* changes:
  Remove fdoProfileMutator
  Convert AFDO mutators to TransitionMutator
2024-02-05 23:03:49 +00:00
Rico Wind
444d6b68ae Merge "Revert "Integrate Rust-specific System Properties into rules generation."" into main 2024-02-05 14:41:56 +00:00
Rico Wind
be3ea4f149 Revert "Integrate Rust-specific System Properties into rules generation."
This reverts commit 65374edd0e.

Reason for revert: b/323833345

Change-Id: Ia722b68923617b4abfe3fd96b54b3fe108e9de74
2024-02-05 14:02:56 +00:00
Andrew Walbran
4b8e361b4c Merge "Integrate Rust-specific System Properties into rules generation." into main 2024-02-05 10:50:59 +00:00
Kiyoung Kim
84b6508604 Reapply "Rename LOCAL_USE_VNDK"
Similar with aosp/2897612, rename LOCAL_USE_VNDK into
LOCAL_IN_VENDOR or LOCAL_IN_PRODUCT to make variable useful from
VNDK deprecation.

Bug: 316829758
Test: AOSP CF build succeeded
Change-Id: If7bead24add014ed9e0e9e1d265b0199b911be89
2024-02-05 10:31:23 +09:00
Aditya Kumar
b2a56627a2 Merge "Revert^2 "Update clang version to clang-r510928"" into main 2024-02-03 12:54:13 +00:00
Aditya Kumar
ef7c121a6b Revert^2 "Update clang version to clang-r510928"
22686bab04

Change-Id: I1117546bb71548e1146c6ae43419b6aef772f812
2024-02-02 14:32:47 -08:00
Treehugger Robot
0e5f6e4e9f Merge "Revert "Rename LOCAL_USE_VNDK"" into main 2024-02-02 10:38:49 +00:00
Kiyoung Kim
ed63c02e9b Revert "Rename LOCAL_USE_VNDK"
Revert submission 2931430-local_use_vndk

Reason for revert: build fails with barbet targets

Reverted changes: /q/submissionid:2931430-local_use_vndk

Change-Id: Ic5b850e2905d1b93e8b4d08921106940991587b8
2024-02-02 08:06:52 +00:00
Treehugger Robot
838b29ebc7 Merge "Rename LOCAL_USE_VNDK" into main 2024-02-02 02:48:35 +00:00
Kalesh Singh
f4ffe0a026 soong: Add crt_pad_segment to .so's
crt_pad_segment adds a NOTE to the ELF which is used by the binoic
loader to determine whether it should pad segments when mapping them
into the virtual address space, such that there are no gaps between
mappings of consecutive segments. This avoids an increase in
unreclaimable kernel slab memory usage for VMAs on devices where the
runtime-page-size > elf-segment-p_align.

Since -fandroid-pad-segment [1] respects -nostdlib used in android
platform builds, soong must link in crt_pad_segment to platform shared
libraries.

For simplicity, link crt_pad_segment everywhere that crtend_so is
applicable, ignoring nocrt property, as there is no other reason
to track these separately.

Example:

❯ readelf -WS /system/lib64/libc++.so [Output simplified]

...
Section Headers:
  [Nr] Name              Type            Address          Off    Size   ES Flg Lk Inf Al
...
  [ 2] .note.android.pad_segment NOTE            0000000000000288 000288 000018 00   A  0   0  4
...

[1] https://github.com/llvm/llvm-project/pull/77244

Bug: 316403210
Test: readelf -WS <lib>.so
Change-Id: Icc06611376cfd5ee4de7281b4134f9f8ffe7ca60
Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
2024-01-31 19:42:31 -08:00
Pirama Arumuga Nainar
22686bab04 Revert "Update clang version to clang-r510928"
Revert submission 2804373-clang_r510928

Bug: http://b/301328082

Reason for revert: Broke aosp-main/aosp_x86-next-userdebug

Reverted changes: /q/submissionid:2804373-clang_r510928

Change-Id: I6802b329e8dbd9dce5a75aab76c43960765a8594
2024-01-31 06:51:49 +00:00