Commit Graph

85290 Commits

Author SHA1 Message Date
Spandan Das
52c01a1897 Remove internal deapexer module
The build ations will be created by the top-level apex.

Details
1. In GenerateAndroidBuildActions, do a graph walk to determine if the
   apex has exported deps.
2. If there are exported deps, call the newly introduced `deapex`
   function. This registers the build rules and returns a DeapexerInfo
object. This was previously provided by the internal deapexer
dependency.
3. Update `dexpreoptSystemServerJars and `provideApexExportsInfo` to use
   the DeapexerInfo object from (2).

A lot of unit tests that relied on the legacy mechanism of deapexing
have been updated.

Test: go test ./apex
Test: lunch cf_x86_64_phone-next-userdebug (uses mainline prebuilts)
Test: verified no diff in file_list.txt
Bug: 368337090
Change-Id: I0edb681beccac4d2a9ceb73f9a506c081a8a96e0
2024-09-20 23:47:36 +00:00
Spandan Das
a326b320ab Remove deapex support from java_*_import
prebuilt_apex/apex_set currently supports its deapexed contents to be
returned via a sibling java_import/java_sdk_import module. This is
necesssary for
1. dexpreopt/hiddenapi processing
2. usage as shared library

(1) is no longer necessary. this information is provided by the
top-level prebuilt apexes now

(2) is no longer possible since `exported_java_libs` has been removed in
https://r.android.com/3272110

This CL uses a hack for java_sdk_library_improt. Even though (1) is
provided by the top-level apex, there are still some places where
dexpreopt/hiddenapi processing visits the import modules. This CL uses
a bogus path to make analysis work. If this bogus path gets used, there
will be an error during ninja execution

Test: go test ./apex
Test: in internal lunch cf_x86_64_phone-next-userdebug (uses mainline
prebuilts)
Test: verified that file_list.txt is same
Bug: 368337090

Change-Id: I0ea2327f648f0fc60e337b232f7265e140772ffd
2024-09-20 23:33:09 +00:00
Treehugger Robot
f771470d8c Merge "Fixes host_required_modules for test_module_config" into main 2024-09-20 02:29:51 +00:00
Ronald Braunstein
5c647d8d97 Fixes host_required_modules for test_module_config
We weren't emitting the needed .mk variable for host_required modules.

Test: atest -c CtsLibcoreTestCases_dalvik_system
Test: CtsBackupTestCases_cts_permissiontest
Bug: b/368357047
Change-Id: I6ed7bd6d64dba0ed93f3eead74752911f63276b2
2024-09-19 23:20:23 +00:00
Yu Liu
d37ccb7765 Add some log to the build action caching test.
Bug: 358428180
Test: Run the test locally.
Change-Id: I74c941381956b149a9595c69cbfe2ba7ec402cca
2024-09-19 22:16:27 +00:00
Florian Mayer
d72360f84b Merge "Use -target-feature for MTE" into main 2024-09-19 20:39:55 +00:00
Treehugger Robot
37842ac3b1 Merge "Make dexpreopt properties configurable" into main 2024-09-19 19:06:37 +00:00
Cole Faust
eb03246f6f Make dexpreopt properties configurable
Spurred by ag/27778860

Test: m nothing --no-skip-soong-tests
Change-Id: I0e48144172eee1c589f46875cd94e3aa19d43873
2024-09-19 11:12:54 -07:00
Priyanka Advani (xWF)
21ebba6196 Merge "Revert "Add new module type notice_xml which is used to define m..."" into main 2024-09-19 17:53:20 +00:00
Priyanka Advani (xWF)
8a696acfa7 Revert "Add new module type notice_xml which is used to define m..."
Revert submission 3273112-soong-notice-xml

Reason for revert: Droidmonitor created revert due to b/368348129.

Reverted changes: /q/submissionid:3273112-soong-notice-xml

Change-Id: I832601982bc314365ee0aaf0ff9ffc4ad99f9cf3
2024-09-19 17:43:38 +00:00
Wei Li
2a9d408e9a Merge "Add new module type notice_xml which is used to define modules that generate NOTICE.xml.gz for partitions." into main 2024-09-19 17:37:06 +00:00
Treehugger Robot
fc79aabd84 Merge "Add default_visibility for soong modules" into main 2024-09-19 02:14:55 +00:00
Cole Faust
16d227a725 Add default_visibility for soong modules
So that we don't get surprise usages.

Bug: 348717861
Test: m nothing
Change-Id: I47319a727092c1bd936cca88f5713ee977a48b48
2024-09-18 17:41:30 -07:00
Treehugger Robot
e2aeb50e49 Merge "Add a unit test for class loader context with java_sdk_library impl lib" into main 2024-09-18 23:51:25 +00:00
Wei Li
68c165c145 Add new module type notice_xml which is used to define modules that generate NOTICE.xml.gz for partitions.
Bug: 330949782
Bug: 338342381
Test: lunch aosp_cf_x86_64_phone-trunk_staging-eng && m, and check that system/etc/NOTICE.xml.gz have all the XML elements.
Test: lunch aosp_cf_x86_64_phone_soong_system-trunk_staging-eng && m, and check that system/etc/NOTICE.xml.gz has root element only.
Change-Id: I82e90bd9aa3dabc605acfe8da697ab1f7e7ecf9b
2024-09-18 23:44:52 +00:00
Treehugger Robot
c5459aa57f Merge "Remove exported_java_libs from prebuilt_apex/apex_set module types" into main 2024-09-18 22:59:25 +00:00
Jihoon Kang
e246bb7eca Add a unit test for class loader context with java_sdk_library impl lib
This test case tests the behavior added with aosp/3267383

Test: m nothing --no-skip-soong-tests
Bug: 366572133
Change-Id: Id7df3b76e6ef4880ac14e55bf8e0d81597d10055
2024-09-18 22:26:22 +00:00
Spandan Das
1896fd6006 Remove exported_java_libs from prebuilt_apex/apex_set module types
`exported_java_libs` provide information to soong about which .jars in a
prebuilt .apex need to be deapexed. This property is not used today,
since the only use case for deapexing is for dexpreopt, and dexpreopt is
done using bootjars (encapsulated using
`exported_bootclasspath_fragments`) and systemserver jars (encapsulated
using `exported_systemserverclasspath_fragments`)

Test: go test ./apex
Change-Id: I4ceec74aa11d8e32ccfb0bab29a4489cf8b3fc3d
2024-09-18 21:49:14 +00:00
Florian Mayer
94d296d3d7 Use -target-feature for MTE
This combines with other features.

Bug: 366222162
Change-Id: Ia560e34ec8b83e075cef863d2a7f84fb01882049
2024-09-18 21:18:15 +00:00
Yu Liu
3249ac6d3f Merge "Add a system test to check the mk and ninja files generated by incremental build." into main 2024-09-18 20:43:01 +00:00
Treehugger Robot
7a1386e65e Merge "Stop tracking the ABI of "current"." into main 2024-09-18 20:32:31 +00:00
Treehugger Robot
dbb3ef9ac2 Merge "Convert trivial TopDown mutators to BottomUp" into main 2024-09-18 20:05:09 +00:00
Treehugger Robot
411346c919 Merge "Enable object-size sanitizer for C++" into main 2024-09-18 19:44:30 +00:00
Dan Albert
2d0dce1fad Stop tracking the ABI of "current".
Bug: None
Test: deleted "current" ABI dumps, ran updater, they didn't come back
Change-Id: I50463c3016864fccc7713c141e6465c8ed0d7184
2024-09-18 19:34:32 +00:00
Makoto Onuki
1fa2cf0f88 Merge "Fix resource-apk inclusion" into main 2024-09-18 19:12:56 +00:00
Yi Kong
76e99ad68e Enable object-size sanitizer for C++
This was previously disabled due to a bug in libc++'s __tree implementation. That bug has been fixed, so we can now enable this sanitizer.

Change-Id: Ibbdfbe843aa02ef31d2a10b0c6a87500b7f60b42
Test: presubmit
2024-09-18 18:43:26 +00:00
Treehugger Robot
feeb6d1e7b Merge "Align CLC add context behavior between java_sdk_library and its impl lib" into main 2024-09-18 17:34:00 +00:00
Colin Cross
da279cfba4 Convert trivial TopDown mutators to BottomUp
Many TopDown mutators can be easily converted to BottomUp mutators,
which are easier to handle for incremental and partial analysis.

Bug: 367784740
Test: all soong tests pass
Test: no change to build.ninja
Flag: EXEMPT refactor
Change-Id: I82955e844ed0eb6680854678c0744ac5398eb7ba
2024-09-18 10:14:19 -07:00
Jihoon Kang
ddda6ea7d3 Align CLC add context behavior between java_sdk_library and its impl lib
This change allows the impl lib of java_sdk_library to call AddContext(...) instead of AddContextMap(...) and ensure that the behavior between the top level java_sdk_library and the impl lib is identical when creating the class loader context.

Test: CI && ABTD
Bug: 366572133
Change-Id: Ia0bc7558ca737fcd3ad4ed62b3190aa567aa103f
2024-09-18 16:46:38 +00:00
Rico Wind
15c5e54de7 Merge "Launch flag guarded always on optimized resource shrinking" into main 2024-09-18 07:31:54 +00:00
Zi Wang
26cd6dd780 Merge "Create a singleton that generates an empty bp file" into main 2024-09-18 00:05:37 +00:00
Neill Kapron
d47cfab05b Merge changes from topic "libbpf_defaults" into main
* changes:
  Soong: libbpf_prog: add support for header_libs
  Soong: libbpf_prog: Add defaults support
2024-09-17 23:03:33 +00:00
mrziwang
2aafdc5f9c Create a singleton that generates an empty bp file
This singleton will be used to generate a bp file based on
make-based product config later.

Test: m and CI
Bug: 367418637
Change-Id: I98caea5419f1facd3fa9ca5c6389d16a7aa2ce5d
2024-09-17 14:56:43 -07:00
Florian Mayer
5c441cea7a Run bionic tests for cc toolchain changes
Change-Id: Id26e2f6ff360abe35ead3a47055ba69e10ace033
2024-09-17 21:25:14 +00:00
Treehugger Robot
809aaeb90b Merge changes I41978037,I19e8a9e8 into main
* changes:
  Properly initialize android_system_image modules
  Add otherModuleProvider to ConfigurableEvaluatorContext
2024-09-17 20:07:08 +00:00
Colin Cross
e95232426d Merge "Convert test mutators to TransitionMutators" into main 2024-09-17 19:05:06 +00:00
Neill Kapron
3cc44de313 Soong: libbpf_prog: add support for header_libs
Add header_libs support for libbpf_prog modules.

Test: TH / manual
Bug: 359646531
Change-Id: I9e705645582ec12bfa0a2e388d0049bb472456e3
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-09-17 18:33:46 +00:00
Cole Faust
2cfe696f4c Properly initialize android_system_image modules
android_system_image just passed its embedded filesystem module to
InitAndroidModule (transitively via initFilesystemModule). This meant
that ModuleBase.module was pointing to the filesystem module, not
the system image module. This was a problem for the new "changeable
configuration" feature I'm working on, but you can also more readily
see the issue if you add a GenerateAndroidBuildActions function to
android_system_image: it won't be called.

Bug: 361816274
Test: Presubmits
Change-Id: I41978037b81910309a000dc1bba327e513ba5dce
2024-09-17 11:31:14 -07:00
Makoto Onuki
a191ef3c54 Merge "Make compat-config to generate output files too" into main 2024-09-17 18:29:23 +00:00
Treehugger Robot
2ad497a39d Merge "Soong: BPF: add defaults support and local include" into main 2024-09-17 18:25:12 +00:00
Treehugger Robot
1c8c5698ec Merge "Pass the common sources rsp file as --common_srcs to extractor" into main 2024-09-17 17:49:54 +00:00
Colin Cross
1531a12d2d Merge "Convert arch and os mutators to TransitionMutators" into main 2024-09-17 17:06:14 +00:00
Makoto Onuki
ed392f7097 Fix resource-apk inclusion
- We used to include the "install" files, but we really should be using
"output" files instead.

- Also supports a new "inst_resource_apk" property, which is another APK
that's loaded as resources of the instrumentation app itself.

Flag: EXEMPT host test change only
Bug: 292141694
Test: m nothing --no-skip-soong-tests
Test: manual test with a local test module change and make sure
    the second apk exists

Change-Id: Ibd3f9d4a1cbc0f805b2294605ae8bc06fdf53b75
2024-09-17 10:03:24 -07:00
Makoto Onuki
ca678c4a36 Make compat-config to generate output files too
Flag: EXEMPT host test change only
Bug: 367706429
Test: m nothing --no-skip-soong-tests
Test: `m ravenwood-runtime` and make sure out/host/linux-x86/testcases/ravenwood-runtime/ravenwood-data/
    has framework-platform-compat-config.xml and services-platform-compat-config.xml
Change-Id: I92b545c480890815cd886b8ecf50ed99ffe7eea1
2024-09-17 09:53:33 -07:00
Ulya Trofimovich
9d96d1f186 Merge "Revert^12 "Enable dex container (DEX v41) for the whole system"" into main 2024-09-17 14:01:55 +00:00
Colin Cross
d27205e8da Convert test mutators to TransitionMutators
Convert various mutators in tests to TransitionMutators.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Change-Id: I1da55889c391582a7c825c118c5988ec27820237
2024-09-16 17:00:39 -07:00
Colin Cross
8bbc3d5a30 Convert arch and os mutators to TransitionMutators
Replace archMutator and osMutator with TransitionMutators.

Bug: 319288033
Flag: EXEMPT refactor
Test: all soong tests pass
Test: no change to out/soong/*.ninja
Change-Id: I92a4d7c895dd79f1dd8064d0ca90e7010b563525
2024-09-16 17:00:39 -07:00
Cole Faust
55b56feb86 Add otherModuleProvider to ConfigurableEvaluatorContext
So that it can make decisisons based on a provider set by the
base config mutator.

Bug: 361816274
Test: m nothing
Change-Id: I19e8a9e800dfabcd05740f9c0ed5db833c5b2377
2024-09-16 15:10:05 -07:00
Neill Kapron
4f1f049f5c Soong: libbpf_prog: Add defaults support
Add defaults support for libbpf_prog module type.

Test: TH / manual
Bug: 359646531
Change-Id: Idc2977d3cf6efe62968e0eac9fc592d0cf0b3beb
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-09-16 20:12:14 +00:00
Ulya Trofimovich
5bb46810a5 Revert^12 "Enable dex container (DEX v41) for the whole system"
This reverts commit 78fccd9380.

Reason for revert: test failure in can no longer be reproduced.

Bug: 353452237
Change-Id: I7cf926342efc612b4026d89df12078c018ede7b9
2024-09-16 18:58:53 +00:00