Commit graph

66797 commits

Author SHA1 Message Date
Cole Faust
dff9c14148 Add install_symlink soong module type
This can be used to install symlinks to arbitrary locations/targets
on the device. Used to replace a make-built symlink.

Bug: 205632228
Test: built and ran the emulator observed the /system/bin/hwservicemanager symlink is still there
Change-Id: I6df922c8d919e6d56fa79702815a89c98f4d65ed
2023-09-01 17:18:48 -07:00
Yabin Cui
74a06516ca Merge "Revert "Disable Global ThinLTO by default"" into main 2023-09-01 22:18:16 +00:00
Stephen Hines
796fcd4174 Update OWNERS file for actual Android LLVM members.
Test: N/A
Change-Id: Ifd24b1a6161ef6bf4e85ab3d1113106f456f1fa4
2023-09-01 14:48:34 -07:00
Spandan Das
ab29f57ce6 Fix target_compatible_with non-determinism for proto.include_dirs
A single proto providing directory can be used by multiple soong modules. Some of these
can be
1. Host specific
2. Device specific
3. Both host and device

Since the generated proto_library can have 1:many mapping, it should
have an empty target_compatible_with. Compatiblity will be enforced at
the top-level {cc|java|python}_proto_library.

(This is a followup to aosp/2727054 which did not handle this correctly)

Test: Added a unit test

Change-Id: I09b3def70e3d043fd8ba0d1eb4ffff1910f097d1
2023-09-01 21:30:29 +00:00
Wei Li
fa8e38a598 Merge "Remove all ignored files in SBOM diffs, which have been fixed in the following CLs:" into main 2023-09-01 20:59:44 +00:00
Treehugger Robot
08e1792144 Merge "Enable -Wsizeof-array-div for 3P code." into main 2023-09-01 17:35:53 +00:00
Wei Li
6c550d45d2 Remove all ignored files in SBOM diffs, which have been fixed in the following CLs:
aosp/2721721
aosp/2715849
aosp/2721815
aosp/2726742

Bug: 272358980
Test: build/soong/tests/sbom_test.sh
Change-Id: I17d5be4dc59c08be43a59c6bc0ea212dac6cd13c
2023-09-01 17:26:22 +00:00
Yabin Cui
1aa29e6ca9 Revert "Disable Global ThinLTO by default"
This reverts commit 9c81c0cfd9.

Reason for revert: The ThinLTO problem has been fixed in https://android-review.git.corp.google.com/c/platform/bionic/+/2725997. So we can Re-enable Global ThinLTO.

Change-Id: I25dde4910692fd71124b48f45911da5b7b92a089
2023-09-01 17:22:58 +00:00
Yu Liu
056d05b690 Merge "Allowlist aapt." into main 2023-09-01 17:22:28 +00:00
Liz Kammer
267f1f71b5 Add rust bp2build tests to soong tests
Test: m nothing
Change-Id: I19a11cc2055725bfa5dfea5dd5215c18ffec3a21
2023-09-01 12:08:19 -04:00
Treehugger Robot
079efbda94 Merge "Update clang version to clang-r498229b" into main 2023-09-01 08:49:09 +00:00
Treehugger Robot
10be2d7059 Merge "Ignore the newly added symllink /system/bin/hwservicemanager so it doesn't cause CI failure in sbom_integration." into main 2023-09-01 01:55:19 +00:00
Inseob Kim
9c14e725e7 Merge "Remove code about mixed sepolicy build" into main 2023-09-01 01:06:29 +00:00
Yu Liu
a06f869dd2 Allowlist aapt.
Bug: 297409580
Test: CI
Change-Id: Ia1b0c65146109d8fca76e47221960f98307a52ec
2023-08-31 16:30:07 -07:00
Wei Li
313c8166e1 Ignore the newly added symllink /system/bin/hwservicemanager so it doesn't cause CI failure in sbom_integration.
The symlink will be added to SBOM later.

Bug:
Test: build/soong/tests/sbom_test.sh
Change-Id: I170e554e8b805736c60b8d26533bd0ab41e7575a
2023-08-31 16:02:48 -07:00
Yu Liu
b6a15dacfc Support include/exclude paths for memtag_heap.
Bug: 295173102
Test: Unit tests and CI
Change-Id: I14faa645afc8e5b0454aafd4c259a2ea588e9ec9
2023-08-31 14:14:01 -07:00
Treehugger Robot
a4fc68a355 Merge "Use aquery results to determine if a file should be executable" into main 2023-08-31 20:51:42 +00:00
Romain Jobredeaux
765beb237a Merge "Bp2build support for app R8-related fields" into main 2023-08-31 18:54:49 +00:00
Cole Faust
20f2030e29 Use aquery results to determine if a file should be executable
Now that aquery includes this information.

Also added rm -f $out to some rules, because since they write files
by shell redirection, if the file existed before and was executable,
they wouldn't make the file non-executable and visa versa.

Fixes: 297366783
Test: m bazel_sandwich
Change-Id: Ie5b6c4275b162601f51deaec9912eea4be16988d
2023-08-31 11:00:25 -07:00
Spandan Das
854865736e Merge "Replace sync.Mutex with Sync.Map" into main 2023-08-31 16:48:14 +00:00
Dan Willemsen
1e218403e0 Merge "Revert "Temporarily disable python precompilation for py3.11"" into main 2023-08-31 15:38:39 +00:00
Treehugger Robot
c09e38de00 Merge "Remove unnecessary options when generating stubs from signatures" into main 2023-08-31 09:45:30 +00:00
Inseob Kim
6077b2342c Remove code about mixed sepolicy build
There is no one actively using mixed sepolicy build, and it made
sepolicy codes too complicated. As we are deprecating mixed build,
removing such code for cleanup.

Bug: 298305798
Test: boot cuttlefish
Change-Id: Icb5071eb1378f8ed83568e4445d7b4d33e29bc46
2023-08-31 16:49:59 +09:00
Paul Duffin
336b16a325 Remove unnecessary options when generating stubs from signatures
These options are unnecessary because:
* `--format` and `--api-overloaded-method-order` only affects the
  generation of signature files which this does not do.

Also changed the build rule description to differentiate from the
usual metalava command to make it easier to find in the ninja file.

Bug: 296115567
Test: m --build-from-text-stub
Change-Id: I7986cba00c364282ddc436d2e69bfb66eda46436
2023-08-31 08:07:26 +01:00
Romain Jobredeaux
9973ace1c7 Bp2build support for app R8-related fields
Bug: 293304784
Test: CI
Change-Id: I0aefa57f968cb41e50d7c1d29b2d8a1480655355
2023-08-31 01:35:44 -04:00
Krzysztof Kosiński
24686c5e22 Enable -Wsizeof-array-div for 3P code.
This warning usually indicates an incorrect size being computed,
which can cause severe bugs.

Bug: 296422292
Test: presubmit
Change-Id: I381dea70a6a408883ec772ccc006746ad66b835f
2023-08-31 01:29:59 +00:00
Spandan Das
43dfeb6d10 Replace sync.Mutex with Sync.Map
createProtoLibraryTargetsForIncludeDirs uses a lock-protected plain map
to see if a directory has been handled previously during concurrent visits
of modules in bp2build.

From golang's docs https://pkg.go.dev/sync#Map, replacing sync.Mutex
with sync.Map will be faster in this use case since the keys (directores
here) are written just once but read many times.

Test: m bp2build
Change-Id: Ia2a471b4db5d2890fa6048bc05a17cebc5f686af
2023-08-31 00:30:24 +00:00
Yu Liu
37aa33fcb1 Merge "Allowlist platform-test-annotations (new dependency of bouncycastle)" into main 2023-08-30 19:20:44 +00:00
Treehugger Robot
8d7f2e41d1 Merge "Fix false pos in bp2build-prog due to prebulits" into main 2023-08-30 18:27:32 +00:00
Yu Liu
698c8f63e0 Merge "Support memtag sanitizer." into main 2023-08-30 17:22:59 +00:00
Liz Kammer
f236cd9247 Merge "Add do not convert for sdk_version unset" into main 2023-08-30 16:59:50 +00:00
Romain Jobredeaux
520ab19c23 Allowlist platform-test-annotations (new dependency of bouncycastle)
Change-Id: I68ee46622d0b9048d8e53a8a74721aac139e9ddd
2023-08-30 12:19:54 -04:00
Jared Duke
2860cf1bc8 Merge "Reland "Enable R8 full mode by default for apps"" into main 2023-08-30 16:03:18 +00:00
Treehugger Robot
662b09e8c3 Merge "Prevent concurrent read/writes to a map" into main 2023-08-30 02:40:07 +00:00
Liz Kammer
02914408de Add do not convert for sdk_version unset
When sdk_version is unset, the build with fail with Bazel because
private APIs are do not build with Bazel at this time.

This instead prevents migrating the relevant target to Bazel in bp2build

Test: go tests
Change-Id: I31dabcf143de7933706d1b734ef21467a01b65e9
2023-08-29 20:06:48 -04:00
Spandan Das
fc6e645645 Prevent concurrent read/writes to a map
This should hopefully fix an intermittent flake in bp2build, which is
now run by default.

Test: go build ./android
Change-Id: Ic257a34448ab323df1680cf1990b087ed415a592
2023-08-29 23:59:20 +00:00
Treehugger Robot
8bbe26cad7 Merge "Allowlist more deps of adb" into main 2023-08-29 19:39:56 +00:00
Cole Faust
6158528e15 Only allow setting presigned without preprocessed on targetSdk < 30
When targetSdk is >= 30, the system verifies that you use a valid
signature V2+ certificate. Uncompressing ndk/dex files or aligning
the zip file will break a signature V2, so these apks should really
just set preprocessed: true.

Fixes: 185811447
Test: Presubmits
Change-Id: Id89c42bcd5b5daa6eda1716bff4023423298036b
2023-08-29 11:18:44 -07:00
Jared Duke
aa88b3d020 Reland "Enable R8 full mode by default for apps"
This is attempt 4 at landing this change. Prior attempts were
reverted due to downstream test breakages not in presubmit.
Those issues have been resolved, and additional manual heavy
presubmit tests were run to ensure stability.

Observed APK savings: ~24MB

This reverts commit 74a5c2ec76.

Reason for revert: Fixed ManagedProvisioningTests

Bug: 215530220
Change-Id: I223228a345fa1a3bad52fb3e91c744107e04fc07
2023-08-29 17:07:20 +00:00
Treehugger Robot
37a0e4a0bd Merge "Use board api level for seapp coredomain check" into main 2023-08-29 01:09:37 +00:00
Yu Liu
7ece4aae36 Support memtag sanitizer.
Bug: 295173102
Test: local unit tests
Change-Id: Ib8cd82cd3989d9c120255e149473d8ec00f100f5
2023-08-28 17:14:58 -07:00
Spandan Das
26e2967e54 Merge "Bugfixes for proto_library (proto.include_dirs)" into main 2023-08-28 21:41:00 +00:00
Todd Lee
5b6d1d87d6 Merge "Support for incremetal platform prebuilt APIs" into main 2023-08-28 18:42:58 +00:00
Spandan Das
f26ee15e01 Bugfixes for proto_library (proto.include_dirs)
The fixes are
- Dedupe the dir list. Since we partition the proto srcs per pacakge and
  then iterate the map, a single include directory was being listed
  multiple times
- Drop target_compatible_with from these proto_library targets. The
  compatibility will be enforced at the top-level <lang>_proto_library.

Test: Added a unit test

Change-Id: Ia18c0f8c495585010fd4e372092afe80c5d8290c
2023-08-28 18:39:59 +00:00
Ivan Lozano
791f60365e Merge "rust: Rust sanitized snapshots variations" into main 2023-08-28 18:01:22 +00:00
Treehugger Robot
7eb6ffc796 Merge changes from topic "java-proto-include-dir" into main
* changes:
  Handle proto.include_dirs for java
  Translate python_libray.pkg_path to proto.import_prefix
2023-08-28 17:18:29 +00:00
Alix Espino
5dbb696c53 Merge "support for multiple filegroups and resource_dirs" into main 2023-08-28 17:10:13 +00:00
Wei Li
d632171e93 Merge "Use ninja rspfile for list of provenance metadata file of modules, in case there are many provenance metadata files and the list might exceed the command line length limit." into main 2023-08-28 16:17:27 +00:00
Treehugger Robot
01f70e8d0e Merge "Add aconfig annotations for java_aconfig_library" into main 2023-08-28 13:03:56 +00:00
Ian Zerny
f94c8113a3 Merge "Translate SDK level 10000 to a valid compiler min-api" into main 2023-08-28 06:26:36 +00:00