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
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
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
This reverts commit 8a038ed871.
Reason for revert: investigate breaking test suits Avatar and BumbleBluetoothTests
Change-Id: I8e4498fb5854bf62df6d161ac0c6cce49d471afe
This reverts commit eaa475107d.
Reason for revert: This cl broke AOSP build, read more b/333846153
Change-Id: I5538a3c78617d7c2db98a11b60cb61269dcec8d3
Use the `WriteFileRule` to write the permissions file for shared
libraries instead of generating a custom bash rule.
Test: TH
Change-Id: I904cf0742bfec46ed45ec7801bb9bd3dc3047185
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
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
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
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
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
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
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
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
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
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
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
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