Commit graph

66872 commits

Author SHA1 Message Date
Spandan Das
e1cb14b240 Add target_compatible_with for compile_multilib
For explicit values of compile_multilib (e.g. 32 or 64), add an
incompatibilty constraint for the arches that do not have the correct
bitness.

Test: go test ./bp2build
Bug: 299135307
Change-Id: I4cd997de6804a5c6d89086d740f773936db1cab9
2023-09-06 00:31:00 +00:00
Cole Faust
88e9731502 Merge "Add install_symlink soong module type" into main 2023-09-06 00:15:09 +00:00
Chris Parsons
73f411b72c Delete ApiBp2build soong_build mode
This feature is obsolete.

This makes a large number of codepaths "dead code" (such as
module-specific implementations of ApiBp2build functionality). These
will be deleted in a followup CL.

Bug: 284029211
Test: Presubmits
Change-Id: Ib53b99f1fe8c24380d219caf44e9bb3b96724fa0
2023-09-05 17:09:51 -07:00
Treehugger Robot
922e6adfd2 Merge "print module name on allowlist errors" into main 2023-09-05 23:26:31 +00:00
Cole Faust
48ce137e11 Set device_platform build setting
Fixes: 290716626
Test: b test //platform_testing/tests/example/native:hello_world_test
Change-Id: If397710e986ac1fa8b49aeb25b7342acd1eef482
2023-09-05 16:07:49 -07:00
Treehugger Robot
eb02c5cb7c Merge "Disable rust sanitizers for linux_musl_x86" into main 2023-09-05 22:56:17 +00:00
Sam Delmerico
ff19da2435 partial systemserverclasspath snapshot test
Add a test for that checks the SDK snapshot contains sdk library
definitions for modules with alowed minSdkVersion, but that doesn't
contain definitions for modules with disallowed minSdkVersions.

Bug: 289183551
Test: go test ./sdk
Change-Id: I194526f8eba4dacb52a345fa67cf7371e722c237
2023-09-05 22:06:22 +00:00
Treehugger Robot
93873cd713 Merge "Stop NinjaReader from sending new status messages after Close" into main 2023-09-05 22:00:29 +00:00
Sam Delmerico
0e0d96efa7 android_app APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE
Currently the product variable that is controlled by
APEX_GLOBAL_MIN_SDK_VERSION_OVERRIDE only overrides apexes, but it
doesn't apply to android_apps. This commit allows android_apps which set
updatable: true in their Android.bp to have their min_sdk_version be
overriden by this product variable.

Bug: 295311875
Test: go test
Change-Id: If3cb82a17cae4553b577dd1a4637ee13c3c95302
2023-09-05 21:38:16 +00:00
Treehugger Robot
ca22dfb5d1 Merge "Enable -Wmultichar." into main 2023-09-05 21:17:21 +00:00
Sam Delmerico
e42edc369c print module name on allowlist errors
Change-Id: I34db128d96f8121fed56588a5d6ba7de6e848c9a
2023-09-05 19:19:19 +00:00
Colin Cross
3ef9285ed2 Disable rust sanitizers for linux_musl_x86
rustc 1.71.0 doesn't support any sanitizers for linux_musl_x86, disable
sanitizing for now.

Bug: 257334542
Test: m USE_HOST_MUSL=true host-native
Change-Id: I70819d2175c59bca1ff385d4aee48518d6b702e7
2023-09-05 12:10:54 -07:00
Colin Cross
b0b369c4fa Stop NinjaReader from sending new status messages after Close
If NinjsReader keeps sending tool status messages after Close has been
called it can cause a concurrent map access when
CriticalPath.WriteToMetrics is called concurrently with
CriticalPath.FinishAction.  Try harder to stop the NinjaReader goroutine
when NinjaReader.Close is called, even if the external ninja process has
not closed its FIFO or NinjaReader has not finished processing all the
messages after 5 seconds.

Bug: 286382228
Test: m nothing
Change-Id: I3e3dce601510e2dfb5ed82ca55bd11723fac7e70
2023-09-05 11:11:29 -07:00
Yu Liu
267dd3bea7 Merge "Support include/exclude paths for memtag_heap." into main 2023-09-05 17:42:15 +00:00
Liz Kammer
3ec36ada2c Merge "Add rust bp2build tests to soong tests" into main 2023-09-05 17:29:16 +00:00
Treehugger Robot
ec6f10f648 Merge "Update OWNERS file for actual Android LLVM members." into main 2023-09-05 17:14:07 +00:00
Spandan Das
67dc28a93d Merge "Fix target_compatible_with non-determinism for proto.include_dirs" into main 2023-09-05 16:38:42 +00:00
Jiakai Zhang
9c60c17fb3 Support adding a library as both a JNI library and a regular library.
Bug: 299087066
Test: m nothing
Change-Id: I6cafe23395b7306727a071ccefe3b189c56e928b
2023-09-05 15:20:53 +01:00
Yi Kong
798f5d2e7e Merge "Enable MLGO for register allocation" into main 2023-09-03 05:38:34 +00:00
Yi Kong
67a2dee8c5 Enable MLGO for register allocation
This enables Machine Learning Guided Optimizations (MLGO) for register
allocation. App launch performance on oriole-userdebug is improved by
0.53%, and binary size is very slightly reduced (e.g. 64 bytes for
libart.so).

https://dashboards.corp.google.com/_0e1b06dd_a79e_4433_b625_b62e5cac004b?p=BootImageProfileId:36265

Test: presubmit
Bug: 229056536
Change-Id: I0e5d40bb90a1555a1343f114ebffffca281f20b2
2023-09-03 05:38:14 +00:00
Treehugger Robot
e56803d74d Merge "Skip device test only configs for auto gen test config" into main 2023-09-02 08:46:56 +00:00
Krzysztof Kosiński
769f5030d4 Enable -Wmultichar.
-Wmultichar is enabled by default, so we don't need to explicitly
enable it.

Bug: 298703966
Test: presubmit
Change-Id: Iae820145e6412365024a97ab3a34d760563785fa
2023-09-02 03:33:00 +00:00
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
Sam Delmerico
553edff9dd add crate_root property to rust modules
The crate_root property will be used to specify the entry point for a
rustc compilation. This will allow the srcs property to be used to
collect all src inputs to rustc rather than just the entry point.

Bug: 286077158
Test: m libnum_traits
Change-Id: I1a167182305dcc11cc927d562ceed622153111d3
2023-08-31 18:03:33 +00:00
Sam Delmerico
b45c844ce7 add rust_toolchain_rustc_prebuilt module type
Sandboxing the rust rules requires having explicit inputs for the rust
toolchain. This module type makes the rustc prebuilt and its
dependencies explicit as a module that can be depended on by all rust
rules.

Bug: 286077158
Test: rust sandboxing topic + go test
Change-Id: If2b80b32e329e6a6ee11ba824de868cf04714553
2023-08-31 18:03:33 +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