Commit graph

81515 commits

Author SHA1 Message Date
Colin Cross
935b4db4cb Merge "rust: Remove unnecessary escaping in grep call" into main 2024-04-15 17:35:10 +00:00
Hsin-Yi Chen
c0df1afc07 Merge "Pass system include dirs to header ABI checker" into main 2024-04-15 05:34:44 +00:00
Treehugger Robot
06485000db Merge "Let deps property be conditional on debuggability" into main 2024-04-13 00:43:04 +00:00
Treehugger Robot
9a7898d800 Merge "Allow override of -Wno-error=format" into main 2024-04-12 23:43:06 +00:00
Treehugger Robot
ef0cbf11a6 Merge "Remove duplicates in PathsAndMissingDepsRelativeToModuleSourceDir" into main 2024-04-12 23:39:04 +00:00
Ronald Braunstein
720146b2f2 Merge "Add "test-only" flag for java modules" into main 2024-04-12 23:13:51 +00:00
Treehugger Robot
c5c54803e6 Merge "Add support for transitive resources to android_library_import" into main 2024-04-12 22:04:27 +00:00
Jihoon Kang
0e3a5352e1 Remove duplicates in PathsAndMissingDepsRelativeToModuleSourceDir
This change prevents duplicate paths from being returned when resolving
filepath, glob and ":name{.tag}" syntax to android.Paths. Once all
existing modules are cleaned up to remove duplicates in the source
files, the duplicates removal can be converted into an error so that
passing duplicate source files in the module definition is restricted.

Test: patch to git_main, inspect ninja commands
Bug: 326674683
Change-Id: I38a4ce9238da25cd67968f6bc8058bc9facc4551
2024-04-12 21:57:05 +00:00
Colin Cross
607bbd64dd Add support for transitive resources to android_library_import
Collect and propagate resource jars from static dependencies of
android_library_import modules.

Bug: 288358614
Test: TestAndroidLibraryOutputFilesRel
Change-Id: I076f3c8e4ce42f71a52b612b77eb0265fa1e974c
2024-04-12 13:45:35 -07:00
Ronald Braunstein
cdc66f4268 Add "test-only" flag for java 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 java modules.

We let users set "test-only" on java_library, but not on other modules
where the module kind is implicitly test-only, like java_test.
The implementation, not the user decides it is test-only.
We also exclude it from java_defaults.

	% 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 and teams.kind not like "%cc_%" group by teams.kind'
	+--------------------------+----------+
	|        teams.kind        | count(*) |
	+--------------------------+----------+
	| android_test             |     1382 |
	| android_test_helper_app  |     1680 |
	| java_fuzz                |        5 |
	| java_test                |      774 |
	| java_test_helper_library |       29 |
	+--------------------------+----------+

	 % 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 and teams.kind not like "%cc_%" group by teams.kind'
	+--------------+----------+
	|  teams.kind  | count(*) |
	+--------------+----------+
	| android_test |     1382 |
	| java_fuzz    |        5 |
	| java_test    |      774 |
	+--------------+----------+

Test: m nothing --no-skip-soong-tests
Test: go test ./java
Test: m all_teams

Bug: b/327280661
Change-Id: I9c3ad947dc3d68d6427abada27449526d69daa6b
2024-04-12 11:42:10 -07:00
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
Jiyong Park
62532d7d62 Let deps property be conditional on debuggability
This allows us to add dependencies only for debuggable builds.

Bug: N/A
Test: add product_variables.debuggable.deps to the android_system_image
module.

Change-Id: Id90646fff8a8a91c5e768418b9881e93228ec2a5
2024-04-12 16:16:28 +09:00
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
David Duarte
eefabc8a67 Allow override of -Wno-error=format
Move -Wno-error=format from noOverrideGlobalCflags to
commonGlobalCflags so that projects can re-enable it with
"-Werror=format"

Bug: 315250603
Test: Add -Werror=format to bluetooth_cflags
Change-Id: I677cee5373c670c1a3b0eceeea1b7c35d28a17c2
2024-04-10 23:15:08 +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
5f228b0c13 Pass system include dirs to header ABI checker
This commit fixes the incomplete ABI dumps for libc. The ABI checker
counts export_system_include_dir in the exported headers. It writes the
functions and types defined in the system headers to the dump files.

Test: make
Bug: 314010764
Change-Id: Ieae48d13b4fc4381c87a017213019e940d498967
2024-04-10 18:15:50 +08: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