Commit graph

81501 commits

Author SHA1 Message Date
Juan Yescas
fc5cdcbdf5 Include __BIONIC_NO_PAGE_SIZE_MACRO flag to avoid breaking libraries
The __BIONIC_NO_PAGE_SIZE_MACRO flag has to be passed to
the build system because there are C/C++ libraries using
__BIONIC_NO_PAGE_SIZE_MACRO to decide whether to use getpagesize()
or PAGE_SIZE macro.

Bug: 333973679
Test: Build manually
Change-Id: Ie5d71f4b2b256ab8f429ed4724b8d249b364d5da
2024-04-12 07:06:12 +00:00
Ronald Braunstein
a115e2615b Add "test-only" flag for cc modules
As part of aosp/3022586 where we added the idea of "test-only" modules
and top_level_test_targets, this CL implements that for cc_ modules.

We let users set "test-only" on cc_library, but not on other modules
where the module kind is implicitly test-only, like cc_test.
Here the implementation, not the user decides it is test-only.

% gqui from  "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.top_level_target = true group by teams.kind'                    aosp_shiba[6:15:47]/0
+--------------+----------+
|  teams.kind  | count(*) |
+--------------+----------+
| art_cc_test  |       56 |
| cc_benchmark |       68 |
| cc_fuzz      |      515 |
| cc_test      |     3518 |
| cc_test_host |        6 |
+--------------+----------+

 % gqui from  "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.test_only = true group by teams.kind'                           aosp_shiba[6:16:26]/0
+--------------------------+----------+
|        teams.kind        | count(*) |
+--------------------------+----------+
| art_cc_test              |       56 |
| art_cc_test_library      |       13 |
| cc_benchmark             |       68 |
| cc_fuzz                  |      515 |
| cc_test                  |     3518 |
| cc_test_host             |        6 |
| cc_test_library          |      484 |
+--------------------------+----------+

Bug: b/327280661

Test: m nothing --no-skip-soong-tests
Test: go test ./cc
Test: m all_teams
Change-Id: I344436c424a9dfbdcf27e10f42f5cebc3d2b1261
2024-04-12 02:15:05 +00:00
Treehugger Robot
80214e550e Merge "Strip relative paths from java_import output files" into main 2024-04-12 01:22:10 +00:00
Colin Cross
5e87f349b8 Strip relative paths from java_import output files
androidx.annotation_annotation is used as a test data file, and
converting it from a java_library to a java_library_import causes
the relative path used in the test data path to change. Clear the
relative path in java_import the same way that other java based
modules do.

Bug: 288358614
Test: TestJavaLibraryOutputFileRel
Change-Id: I1f494110da32e916043ca94ac6ebeeafccc06f9a
2024-04-11 16:51:21 -07:00
Treehugger Robot
0565fdc3cb Merge "Make app.go not executable" into main 2024-04-11 22:26:09 +00:00
Cole Faust
7a51454f5b Make app.go not executable
Test: Presubmits
Change-Id: I983e58980cab2aa58797714c216851a1a7eb7f73
2024-04-11 14:13:20 -07:00
Treehugger Robot
1065ed8fbd Merge "java_sdk_library: Use WriteFileRule for writing permissions.xml" into main 2024-04-11 20:55:30 +00:00
Treehugger Robot
7965e1c9a8 Merge "Remove unused writeFile var" into main 2024-04-11 20:54:49 +00:00
Jihoon Kang
033ffb9533 Merge "Collect aconfig_declarations of the dependent java_aconfig_library modules" into main 2024-04-11 17:37:58 +00:00
Charlie Boutier
291a4912d1 Merge "Revert "Make embedded_launcher true by default"" into main 2024-04-11 17:21:35 +00:00
Spandan Das
d5b05655bb Merge "Revert "Add the implicit deps of javacRE"" into main 2024-04-11 16:53:12 +00:00
Charlie Boutier
578066be90 Revert "Make embedded_launcher true by default"
This reverts commit 8a038ed871.

Reason for revert: investigate breaking test suits Avatar and BumbleBluetoothTests

Change-Id: I8e4498fb5854bf62df6d161ac0c6cce49d471afe
2024-04-11 16:10:00 +00:00
Ivan Lozano
2aee601e95 Merge "rust: Fix handling of bindgen header libs" into main 2024-04-11 13:20:46 +00:00
Anna Bauza
d0476e4652 Revert "Add the implicit deps of javacRE"
This reverts commit eaa475107d.

Reason for revert: This cl broke AOSP build, read more b/333846153

Change-Id: I5538a3c78617d7c2db98a11b60cb61269dcec8d3
2024-04-11 09:58:46 +00:00
Treehugger Robot
d344c35e94 Merge "rustc-1.77.1 Build 11685613" into main 2024-04-11 00:06:30 +00:00
Cole Faust
e35973bcef Merge "Make embedded_launcher true by default" into main 2024-04-10 22:56:19 +00:00
Steven Moreland
8d1b2db53f Merge "Use __BIONIC_DEPRECATED_PAGE_SIZE_MACRO." into main 2024-04-10 20:57:45 +00:00
Spandan Das
fc4d366e38 Merge "Add the implicit deps of javacRE" into main 2024-04-10 20:20:43 +00:00
Treehugger Robot
48d11dde95 Merge "release_config: Initial implementation" into main 2024-04-10 17:48:21 +00:00
LaMont Jones
1eccbf24c5 release_config: Initial implementation
Bug: 328495189
Test: manual
Change-Id: I25a2a197f0227bfa7c63e0dfb7cab09e7d756d90
2024-04-10 09:34:26 -07:00
Paul Duffin
1816cde8ce java_sdk_library: Use WriteFileRule for writing permissions.xml
Use the `WriteFileRule` to write the permissions file for shared
libraries instead of generating a custom bash rule.

Test: TH
Change-Id: I904cf0742bfec46ed45ec7801bb9bd3dc3047185
2024-04-10 13:21:28 +01:00
Paul Duffin
7f5073a94a Remove unused writeFile var
Test: TH
Change-Id: I09922d8f837f41dad01bc64192fa174d988eb39a
2024-04-10 13:21:28 +01:00
Hsin-Yi Chen
1edffe1dc4 Merge "Filter ABI dumps by LLNDK headers and version scripts" into main 2024-04-10 08:36:07 +00:00
Ronald Braunstein
98d46751ef Merge "Add test-only and test-target fields to all_teams proto." into main 2024-04-10 00:50:34 +00:00
Spandan Das
eaa475107d Add the implicit deps of javacRE
This includes
1. the prebuilt javac binary
2. the input .java files
3. the jars that are placed on the classpath during javac

(2) is passed via ${out}.rsp. This rsp file gets populated with the
input java files

For (3), this CL creates a new intermediate file whose content is
comma separated jars available on the classpath (this is the format
expected by rewrapper). This file is then registered in RSPFiles of
javacRE command, so that it gets passed to the rewrapper cmd as
`--input_list_paths`

(rspfiles are necesary for modules like framework-minus-apex to avoid
exceeding cmd line limits)

Bug: 308687455
Test: m framework-minus-apex; # verified that the relevant files are
added as `--inputs` of javac

Change-Id: I2ab9277fc394eb00454ef503c78a9f3451e596ac
2024-04-10 00:37:31 +00:00
Aditya Kumar
c63c4306c0 Merge "Add deps to blocklist path" into main 2024-04-09 23:49:13 +00:00
Ronald Braunstein
c560309e30 Add test-only and test-target fields to all_teams proto.
The `test-only` flag designates the module contains test-only, not
production code.  In order to generate code-coverage reports, we wanted
a way to filter out code (like java_library) that is test-only and
doesn't need to be in the report.
   The XXX_test modules will have test-only set automatically.
   For modules like `java_library`, users will be a able to set this in
   the Android.bp file.
   As a follow-up, I'll run some queries to find modules that are only
   reachable from top level test targets and mark them test-only as
   appropriate.

`test-only` is being added to the team.proto and will be written via the
`all_teams` target.

Currently, it is challenging to find "all top level test targets".
I'm adding another field to mark the target as a "top level test
target" if it is a XXX_test or XXX_test_host module.  The goal is to
mark all modules the user intended to run as a test, either with
tradefed or directly as a native test.

I added 'module-type/kind' to the proto so I can do some queries:

 gqui from  "flatten(out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind, count(*) where teams.top_level_target = true group by teams.kind'
+--------------+----------+
|  teams.kind  | count(*) |
+--------------+----------+
| android_test |     1379 |
| art_cc_test  |       56 |
| cc_benchmark |       68 |
| cc_fuzz      |      515 |
| cc_test      |     3519 |
| cc_test_host |        6 |
| java_fuzz    |        5 |
| java_test    |      773 |
+--------------+----------+

% gqui from  "flatten(~/aosp-main-with-phones/out/soong/ownership/all_teams.pb, teams)" proto team.proto:AllTeams 'select teams.kind ,count(*) where teams.test_only = true group by teams.kind'
+--------------------------+----------+
|        teams.kind        | count(*) |
+--------------------------+----------+
| android_test             |     1379 |
| android_test_helper_app  |     1678 |
| art_cc_test              |       56 |
| art_cc_test_library      |       13 |
| cc_benchmark             |       68 |
| cc_fuzz                  |      515 |
| cc_test                  |     3519 |
| cc_test_host             |        6 |
| cc_test_library          |      484 |
| java_library             |        2 |
| java_test                |      773 |
| java_test_helper_library |       29 |
+--------------------------+----------+

All modules can be seen here: https://docs.google.com/spreadsheets/d/1Zqbh7lDDdlI1xVmrN9fZ8bm8XD7EoORjjiPqbMvAKgQ/edit#gid=396553017

FOLLOW UP cls:
  *) Add more top level tests, like sh_test and python_test
  *) Add validation so that only modules currently marked test-only
     can depend on modules marked test-only
  *) Remove test_spec, code_metadata, TestModuleProviderKey: aosp/2928500

Test: go test ./java ./cc ./android
Test: m blueprint_tests
Test: m nothing --no-skip-soong-tests
    !!  android already failing on selects_test
Test: m all_teams  && gqui from  "flatten(out/soong/ownership/all_teams.pb, teams)"

Change-Id: Ib97dca60989aa9d7f000727c92af2e354926f072
2024-04-09 16:36:29 -07:00
Jiyong Park
52a08486f3 Merge "android_filesystem_defaults and visibility rule" into main 2024-04-09 23:06:43 +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
Hsin-Yi Chen
64b2d0389c Filter ABI dumps by LLNDK headers and version scripts
This commit changes the parameters to create LLNDK ABI dumps for 202404
and later versions. Soong invokes header-abi-linker with LLNDK headers
and version script rather than the implementation library's parameters.
The output dump contains more precise ABI information.

When soong compares the ABI with the prebuilt dumps in old versions,
it creates the source ABI dumps with the old parameters.

Test: make findlsdumps
Bug: 314010764
Change-Id: I228736188d07029ee1588b3502fd7c0061c104b9
2024-04-09 18:45:03 +08:00
Treehugger Robot
ccd5b5545b Merge "fix: required property doesn't track deps to java, apex, ..." into main 2024-04-09 03:12:39 +00:00
Jiyong Park
f46b1af969 android_filesystem_defaults and visibility rule
android_systemimage_defaults is deleted and android_filesystem_defaults
is created so that we can have defaults not only for
android_system_image, but also all android_filesystem modules and its
derivatives.

Also, change adds a check which ensures that the partition_type of the
filesystem and its defaults are the same.

Bug: 330665150
Test: m
Change-Id: If635c794534ed89d264eaf7dfc406a8245b8e9f0
2024-04-09 11:26:15 +09:00
Nikolay Elenkov
f28b5697b8 Merge "Add secretkeeper-v1-java to platform APIs" into main 2024-04-09 01:59:35 +00:00
Jiyong Park
39011ef40c Merge "APEX can depend on non-APEX module and vice versa" into main 2024-04-08 22:28:26 +00:00
Cole Faust
42a8b256af Merge changes from topics "replace_instead_of_append", "selects_get_and_get_default" into main
* changes:
  Rename Evaluate() to Get() and add GetDefault()
  Add tests for android:replace_instead_of_append
2024-04-08 20:45:55 +00:00
Treehugger Robot
ed2adb879f Merge "Remove Device VNDK version usage from Soong" into main 2024-04-08 19:24:36 +00:00
Steven Moreland
2a481368b8 Use __BIONIC_DEPRECATED_PAGE_SIZE_MACRO.
The default compilation behavior is set to be the future direction,
and a flag is set for backwards compatibility.

Bug: 312546062
Test: build/boot
Change-Id: Ibf87cbb2ab5da8640bcf7eb5f8cd643bf500e2e5
2024-04-08 18:59:10 +00:00
Nikita Ioffe
97d771adf4 Merge "Add support for rollback_index to android_filesystem module" into main 2024-04-08 11:20:39 +00:00
Hsin-Yi Chen
d22fcc425e Merge "Let LLNDK implementation libraries depend on LLNDK headers" into main 2024-04-08 02:06:13 +00:00
Jihoon Kang
afacc090e8 Merge "Revert^2 "Include all_aconfig_declarations in docs dist"" into main 2024-04-05 17:53:22 +00:00
Jiyong Park
73e5babafe fix: required property doesn't track deps to java, apex, ...
This change fixes a bug that the required property doesn't track
dependencies to modules whose arch is common.

Bug: 321000103
Bug: 321626681
Test: go test ./...
Change-Id: I3d2b3ad8cb2a9f1c5c3d5345bf05402a787f011a
2024-04-05 15:12:16 +09:00
Jiyong Park
fc095e6796 APEX can depend on non-APEX module and vice versa
Previously, an APEX module (also called apexBundle inside of Soong) had
only one "apex" variant which has the same name as the module. This
prevented an APEX from depending on another module which is outside of
the APEX (ex: another APEX). Similarily, a module outside of an APEX
(ex: a shared lib or a test) couldn't depend on an APEX.

This CL fixes the issue by creating the "" variant as the alias of the
"<apex_name>" variant, and also by setting the "" variant as the default
dependency variant.

Bug: 321626681
Test: m
Change-Id: Ie3e57a96530c25e966cfd551676d819c442bb0d5
2024-04-05 14:39:23 +09:00
Treehugger Robot
fe66e13714 Merge "Deprecate Snapshot build" into main 2024-04-05 04:59:43 +00:00
Treehugger Robot
133a6d9e6f Merge "Return the header jar of the implementation library in SdkHeaderJars()" into main 2024-04-05 03:23:34 +00: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
Spandan Das
29cd82b714 Merge "Reland "Use cp instead of install for ndk_headers"" into main 2024-04-05 01:25:05 +00:00
Jihoon Kang
8479dea802 Return the header jar of the implementation library in SdkHeaderJars()
As part of the process to remove the compilation action in the top level
java sdk library, this change modifies SdkHeaderJars(...) (i.e. the
"magic") to return the header jar of the implementation library instead
of the header jar of the top level java sdk library when the
implementation jar is returned from the "magic".

This change also removes `SdkImplementationJars()` from the
SdkLibraryDependency interface, as it is not currently used anywhere
else.

Test: m nothing --no-skip-soong-tests
Bug: 332785297
Change-Id: Icc00af4b1485dc2b1b0981a3e56758d0306dea69
2024-04-05 00:37:37 +00:00
Spandan Das
f280b23fe5 Reland "Use cp instead of install for ndk_headers"
This relands aosp/3026027 with fixes for ndk_library. ndk_library
uses ctx.InstallFile to copy the stubs from an intermediate dir to
out/soong/ndk/sysroot/. The copy rule was created in
out/soong/installs-<product>.mk. This would cause issues when soong_ui
is run in `--soong-only` mode

To fix this, the cp rule is created entirely in soong. The stub library
is marked uninstallable to prevent creation of duplicate rules when
`--soong-only` mode is not used

Test: presubmits
Test: lunch ndk-trunk_staging-userdebug &&
ALLOW_MISSING_DEPENDENCIES=true build/soong/soong_ui.bash --soong-only
out/soong/ndk.timestamp

Change-Id: I6f8b87d88d8ca5ec9a3327e1f11e9aa654f8cdce
2024-04-04 22:39:45 +00:00