Commit graph

81668 commits

Author SHA1 Message Date
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
Cole Faust
b78ce43ae3 Rename Evaluate() to Get() and add GetDefault()
Part of the design of property structs is that they were easy to access.
In keeping with that spirit, use a shorter and easier to spell name
for the getter, and add GetDefault() so that you don't need to pass
the result of Get() to one of the
proptools.StringDefault/BoolDefault/etc functions.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I0b8df151de59f2cd9463425c6666cbfda6bf47f2
2024-04-04 15:09:18 -07:00
Cole Faust
02dd6e5640 Add tests for android:replace_instead_of_append
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Ideb739b3f1a6a5854453db7d51bdee73a3979fd4
2024-04-04 15:09:04 -07:00
Cole Faust
683316a2b0 Rename default select branch to 'default' keyword
Previously I was using an underscore to denote the default branch
because I was thinking that I would allow variable bindings in the
select branches, and 'default' could be mistaken for the name of a
variable. But I think it's better to just introduce alternate syntax,
like `default @ my_var: "foo" + my_var,` to do the variable bindings,
so that we can have a clearer name for the default case.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I8cbded97a029c06782fb5313d8c0e67f22951482
2024-04-04 11:24:24 -07:00
Cole Faust
767a1fe663 Merge "Add tests for "unset" select statements" into main 2024-04-04 18:21:55 +00:00
Victor Chang
b6107abe0d Merge "Add SPDX-license-identifier-Unicode-3.0" into main 2024-04-04 18:08:29 +00:00
Spandan Das
b00d52d523 Merge "Convert BuildIgnoreApexContritbutions variable to a boolean" into main 2024-04-04 17:50:48 +00:00
Spandan Das
6f591bf8fb Merge "Revert "Use cp instead of install for ndk_headers"" into main 2024-04-04 17:49:05 +00:00
Cole Faust
12c8ed4601 Add tests for "unset" select statements
See the blueprint cl for more information.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I3a0302f370e8e498556b219cbda70bdb0255f6ef
2024-04-04 10:41:43 -07:00
Jihoon Kang
b9ca4d3ffe Revert^2 "Include all_aconfig_declarations in docs dist"
This reverts commit 60d4307605.

Reason for revert: The build target is discussed as safe to be copied to the dist directory

Change-Id: I0e59a826991631ffcd77af97c8f51c8b9002c14e
2024-04-04 17:26:36 +00:00
Spandan Das
c299c3f913 Revert "Use cp instead of install for ndk_headers"
This reverts commit 1202729cb2.

Reason for revert: Breaks aosp-main/ndk builds

Change-Id: I453792f7f974dc336d5f6775adfc5899b8d34d7b
2024-04-04 17:11:43 +00:00
Spandan Das
e5e0fb0fe5 Merge "Use cp instead of install for ndk_headers" into main 2024-04-04 16:39:58 +00:00
Nikita Ioffe
2c8cdc6166 Add support for rollback_index to android_filesystem module
Bug: 287593065
Test: m
Change-Id: I01e986b2d8e3d992533dc7e2c07e4cdbeaca2c00
2024-04-04 13:03:37 +00:00
Hsin-Yi Chen
576b4f1a77 Merge "Refactor header ABI checker code" into main 2024-04-04 03:27:36 +00:00
Spandan Das
1202729cb2 Use cp instead of install for ndk_headers
ndk_headers currently use ctx.Install to install headers in
out/soong/ndk/sysroot. The files are subsequently used to compile ndk
variants of cc libraries on host.

Since these headers are not actually installed on device, use android.Cp
to assemble the NDK sysroot. By itself, it should be a no-op, but
androd.Cp is more friendly with restricting the installation rules to
PRODUCT_PACKAGES.

To make it explicit that the sysroot is not a typical installation path,
this CL also modifies the type to OutputPath

Test: m
Bug: 332778109
Change-Id: I1131c3c764443cbaac525c6022cd09c47695d275
2024-04-04 01:58:21 +00:00
Inseob Kim
4caca1d797 Merge "Add libs for BuildManifest.apk generation" into main 2024-04-04 00:43:31 +00:00
AdityaK
6e6f52281e Add deps to blocklist path
Change-Id: Ib4e17c497035b071f7c61d9158c58b5c03d919ae
2024-04-03 14:54:24 -07:00
Treehugger Robot
0c8ed5e58a Merge "Drop host variant of lidbexfile in >=V snapshots" into main 2024-04-03 20:31:23 +00:00
Spandan Das
cfff924ef9 Drop host variant of lidbexfile in >=V snapshots
The host variant of libdexfile and its deps were added to module sdk to
support the use case of building platform tests without art's source
code. This use case is not very relevant today, so we can drop the host
variant of these modules from the module sdk.

We still need to keep them in <= U snapshots, so this CL uses a hack to
drop these libraries only if `SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE`
is greater than UDC

Test: SOONG_SDK_SNAPSHOT_TARGET_BUILD_RELEASE=UpsideDownCake m
out/soong/mainline-sdks/art-module-host-exports-current.zip # verified
that libartbase is in the generated Android.bp

Test: m out/soong/mainline-sdks/art-module-host-exports-current.zip #
verified that libartbase is not in the generated Android.bp

Test: In `main`, deleted the host variants from prebuilts/module_sdk locally; enabled art prebuilts;
Test: atest --host --no-bazel-mode libunwindstack_unit_test

Bug: 329830257

Change-Id: Iab23853ef5e96661a5f5c2989add1be32fb07fbc
2024-04-03 17:19:39 +00:00
Treehugger Robot
7805edb940 Merge "Update Android.mk denylist to block frameworks/" into main 2024-04-03 17:07:43 +00:00
Jihoon Kang
32e1b930e9 Merge "Add API compatilibility flags to the exportable stubs" into main 2024-04-03 15:34:43 +00:00
Nelson Li
ad3dae8780 Update Android.mk denylist to block frameworks/
All Android.mk files under `frameworks/` have been converted to
Android.bp. Add it to the block list to avoid using any newly added
Android.mk.

Bug: 322732227
Test: CIs
Change-Id: I1980b2f94704c15d60579b21915e51e0f4a35c1e
2024-04-03 15:17:49 +00:00
Inseob Kim
1e6afedb96 Add libs for BuildManifest.apk generation
Bug: 330282551
Test: m aosp_cf_system_x86_64
Change-Id: I4f99b5638490dae4f1da22287647ef4dfd47dcaa
2024-04-03 17:24:54 +09:00
Hsin-Yi Chen
715142a20b Let LLNDK implementation libraries depend on LLNDK headers
The ABI checker dumps the ABI from the source code of LLNDK
implementation libraries. It needs to filter the ABI by the LLNDK
headers.

This commit adds dependencies from LLNDK implementation libraries to
their export_llndk_headers. The LLNDK header directories are added to
PathDeps. A followup change will pass the directories to the ABI
checker.

Bug: 314010764
Test: make
Change-Id: Ibc2d5eac3d70d9e038e0fd255cd1ebc1044fabbe
2024-04-03 09:12:30 +08:00
Hsin-Yi Chen
af369886e5 Refactor header ABI checker code
- Extract duplicate code into exportedIncludeDirsForAbiCheck.
- Convert libraryDecorator.sAbiOutputFile to a local variable.

Test: make
Bug: 314010764
Change-Id: I99a0352b11347ad363df5645ba8e0faf9bc9a0aa
2024-04-03 09:09:18 +08:00
Spandan Das
0d24adea73 Convert BuildIgnoreApexContritbutions variable to a boolean
(This relands aosp/3007754. The previous sdk build failures have been
resolved now)

The ignore list is burdensome to maintain once we start adding the
module sdk contents to apex_contributions. Convert the variable to a
boolean. When set to true, all contents in `apex_contributions` will be
ignored

Bug: 308187268
Test: m nothing on aosp,google and google_fullmte devices
Merged-In: Ibdd1e0d0d4f08f4f5251b9c4baa1aaf42e7df34f
(cherry picked from commit f3df7305d653471c70d131177e773b4723247e3a)
Change-Id: I9d57d899c6a9a321e2eb3579c954641f2cb04709
2024-04-03 01:02:00 +00:00
Kiyoung Kim
6954bd2337 Merge "Remove PlatformVndkVersion property" into main 2024-04-03 00:48:04 +00:00
Luis Useche
ff54ac08b2 Merge "Add global C flags to compile_commands" into main 2024-04-02 23:00:37 +00:00
Treehugger Robot
eabd1ef484 Merge "Strip relative paths from android_library_import output files" into main 2024-04-02 21:01:45 +00:00
Luis Useche
342fa6b927 Add global C flags to compile_commands
This solves linter warnings in editor by adding flags to ignore errors
we don't care about. This also means that compile_commands.json is
closer to the flags we actually use for compilation.

Test: Checked generated compile_commands for new flags.

Change-Id: Id583da6eb5151a9baa9a47771f5f937c88bc43f7
2024-04-02 13:58:13 -07:00
Colin Cross
28ac2ffc80 Strip relative paths from android_library_import output files
androidx.annotation_annotation is used as a test data file, and
converting it from an android_library to an android_library_import
causes the relative path used in the test data path to change.
Clear the relative path in android_library_import the same way that
android_library and other java based modules do.

Also change the name of classes-combined.jar to the name of the
module so that the output file has the right name if there are no
static dependences that require running the merge_zips step.

Bug: 288358614
Test: TestAndroidLibraryOutputFileRel
Change-Id: I28210aa370a742d789102ff71db3685ca744878f
2024-04-02 12:21:34 -07:00
Zi Wang
ddb2ee512c Move jarjar repackage action before combine action
With this change, the jarjar repackage actions are only on
the local classes of each module instead of the combined jar
that contains the static libs. The static libs don't need
jarjar repackage action on this module level because it has
been repackaged when building itself.

This change also removes the skip_jarjar_repackage property
since it's incompatible with this change. Actually skipping
jarjar repackage on a dep may result in incomplete repackage
on the module output.

Test: CI and observing the build time of SystemUIGoogle
Bug: 328067025
Ignore-AOSP-First: Will cp to aosp
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:78ffdd47a658dec4bf79e63d11a5f0f3b94876a4)
Merged-In: I476d959af025c46d2ba6d3f48ea378a086666a33
Change-Id: I476d959af025c46d2ba6d3f48ea378a086666a33
2024-04-02 16:44:02 +00:00
Inseob Kim
f16c5a0a7d Merge "Add support to generate fsverity metadata" into main 2024-04-02 07:19:32 +00:00
Treehugger Robot
0553cf8441 Merge "Support pyhon_rule_defaults in Soong" into main 2024-04-02 02:15:57 +00:00
Kiyoung Kim
683d7316cd Merge "Remove VNDK information from Rust, etc, and sysprop tests" into main 2024-04-02 01:14:40 +00:00