Commit Graph

8725 Commits

Author SHA1 Message Date
Inseob Kim
b33154033a Merge "Make init_rc property configurable" into main 2024-09-20 08:01:57 +00:00
Inseob Kim
713b87da61 Make init_rc property configurable
Bug: 331320802
Test: build
Change-Id: Id9c85f2f80381febf360fe320ee43017ec9948b1
2024-09-19 10:13:21 +09: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
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
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
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
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
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
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
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
Colin Cross
1531a12d2d Merge "Convert arch and os mutators to TransitionMutators" into main 2024-09-17 17:06:14 +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
Cole Faust
d706709bf0 Prevent evaluating configurable properties before the defaults mutator
So that we can change the configuration after the defaults mutator
has run.

Bug: 361816274
Test: Presubmits
Change-Id: I550088b2555d275a86b5dd4d57e85a9ece859233
2024-09-13 13:37:59 -07:00
Rico Wind
a7b38592f8 Launch flag guarded always on optimized resource shrinking
This will use the RELEASE_USE_OPTIMIZED_RESOURCE_SHRINKING_BY_DEFAULT flag - default enabling in trunk staging will be done in a follow up cl

To disable optimized resource shrinking on an app basis one can opt out with
  optimized_shrink_resources: false
bug please file a bug for us to find out why (so that we can remove legacy mode)

Bug: 325905703
Test: Existing
Change-Id: Idb57b8e6bba26f06c044657492ff4ae89ec81254
2024-09-13 09:12:56 +00:00
Yu Liu
4faab81e8e Add a system test to check the mk and ninja files generated by incremental build.
Bug: 358428180
Test: Run the test locally.
Change-Id: If1862ee44976216f3c5a5c62d50c6d688d38023b
2024-09-12 23:56:31 +00:00
Dennis Shen
01efb83420 Treat system_ext as system container
Bug: b/365135457
Test: m
Change-Id: Ic8fd60c0e1045f190b6608931ca1d65a784026f0
2024-09-12 23:31:49 +00:00
Cole Faust
8eeae4bbbe Don't evaluate the enabled property in a defaultable hook
So that we can decide the configuration after defaults are evaluated.
Instead, pass the enabled property on to submodules.

Bug: 361816274
Test: m nothing --no-skip-soong-tests
Change-Id: I853d557ed022f7434287cea0a2a19e684b59e145
2024-09-12 11:51:04 -07:00
Treehugger Robot
167230037c Merge "Introduce a util method PrettyConcat" into main 2024-09-12 17:10:11 +00:00
Colin Cross
1496fb1675 Wrap blueprint_go_binary and bootstrap_go_package into android.Modules
Depending on a blueprint_go_binary from a Soong module requires hacks
that allow Soong to support both blueprint.Module and android.Module.
Wrap the blueprint Go module types with ones that implement
android.Module, and delete all the related hacks.

Bug: 319288033
Test: m checkbuild
Flag: EXEMPT refactor
Change-Id: I9b62b450de09bd10288333fbc66aa71c867ae0b3
2024-09-11 21:16:25 -07:00
Treehugger Robot
6fab06d56b Merge "Soong system image may update the $PRODUCT_OUT" into main 2024-09-12 00:25:21 +00:00
Jihoon Kang
6e0280d795 Introduce a util method PrettyConcat
The method can be used when printing string list in a well-formated way
in user-facing messages.
This will be used in a follow up change.

Test: m nothing --no-skip-soong-tests
Change-Id: I77e3445a5333f82067dd8f1bb6ad892c69754ece
2024-09-12 00:11:34 +00:00
Cole Faust
7351875acb Merge "Add HasMutatorFinished" into main 2024-09-12 00:02:10 +00:00
Zi Wang
6ad2e30de3 Merge "Add framework for using provider on AndroidMKEntries" into main 2024-09-11 23:02:33 +00:00
Cole Faust
4e2bf9fb2d Add HasMutatorFinished
To enforce that selects are only evaluated after a certain point
in a followup cl.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Ib215fedb904aa2e5f4d65cfd26a23f527eb4983e
2024-09-11 14:48:50 -07:00
Cole Faust
e8a8783154 Rename ConfigAndErrorContext to ConfigurableEvaluatorContext
I'm going to be adding some methods to this interface, give it
a name based on how it's going to be used, not based on what methods
it contains.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I9bba04ba756c4dbe00625e2d04af81e78a11cae9
2024-09-11 11:35:46 -07:00
mrziwang
1842097928 Add framework for using provider on AndroidMKEntries
In the context of incremental soong, the inter-module communication
through AndroidMkEntries and AndroidMkData should be changed to
through the real provider.

This change adds the framework for the provider(AndroidMkInfoProvider).
A module will set its AndroidMkInfoProvider, which includes what's
in its AndroidMkEntries method, to be used in translateAndroidMkModule.

This change also changes module type vbmeta to use
AndroidMKInfoProvider.

The next step is to replace the AndroidMkEntries methods of all the
other module types to set the AndroidMkInfoProvider.

Test: m with tests and CI
Bug: 357907638
Change-Id: Icfd1363f97d31548bb78c6615e0f7076b22dcbe4
2024-09-11 10:38:41 -07:00
Krzysztof Kosiński
28b806c9eb Merge "Add missing pieces of ARMv9.2-A support." into main 2024-09-11 16:04:44 +00:00
Neill Kapron
f1d63b8b6d Merge "SOONG: BPF: add libbpf_prog soong module" into main 2024-09-11 15:41:14 +00:00
Justin Yun
2cc42505d9 Soong system image may update the $PRODUCT_OUT
A target must define "USE_SOONG_DEFINED_SYSTEM_IMAGE := true" and
"PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE := <name of soong system image>"
to use the soong defined system image.
The system image must install the files to $PRODUCT_OUT for adb sync
and build verification. Instead of using 'update_product_out'
property in Android.bp, copy the files only if the name of the image
matches with PRODUCT_SOONG_DEFINED_SYSTEM_IMAGE.

Bug: 350599535
Bug: 365700376
Test: lunch aosp_x86_64-trunk_staging-userdebug && m &&
      m aosp_cf_system_x86_64
Test: lunch aosp_cf_x86_64_phone_soong_system-trunk_staging-userdebug
      && m
      and adb sync on the cf device
Change-Id: If8673ba2855a753a5559a588bd83068d950fd7e4
2024-09-11 14:34:44 +09:00
Jim Tang
01c3234190 Merge "Support apk for product_variables.debuggable" into main 2024-09-11 02:56:11 +00:00
Cole Faust
dd46300414 Merge "Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES" into main 2024-09-10 19:33:04 +00:00
Jim Tang
914832444e Support apk for product_variables.debuggable
Bug: 365707065
Test: m FactoryOtaPrebuilt
Change-Id: I880b9d48b52d49cbf8c1eca6a67d3ffadc8ea0fc
2024-09-10 18:06:22 +08:00
Cole Faust
4ce4f8893e Remove BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES
It's been available for over a year, lets progress the python3 migration
by removing it.

Bug: 203436762
Test: Presubmits
Change-Id: I46a6477ec65e98b7e6df5cc1359f676dcbd0f08e
2024-09-09 18:08:49 -07:00
Spandan Das
ca9ccec822 Remove extra space in error message
Change-Id: I45420afc37736ec8fecd0c489c35c14b377a71a5
Test: N/A
2024-09-09 22:58:11 +00:00
Krzysztof Kosiński
b8c5e95e26 Add missing pieces of ARMv9.2-A support.
aosp/3255916 didn't add all of the required infrastructure.
Refactor it to be more like x86_64 so it requires less
boilerplate code.

Bug: 364383722
Test: presubmit
Change-Id: Idc5279ffc5fe964bea9f98873c01468944d90091
2024-09-07 03:11:25 +00:00
Xin Li
aa8ceca851 Merge "Merge 24Q3 to AOSP main" into main 2024-09-07 01:12:30 +00:00
Treehugger Robot
f2c204c655 Merge "Remove asset dir glob files" into main 2024-09-06 16:22:06 +00:00
Colin Cross
399ff4019d Merge "Use transitive header jars in classpaths" into main 2024-09-06 16:19:41 +00:00
Treehugger Robot
fae5ec8bbc Merge changes I505a7ad8,I92d88199 into main
* changes:
  Disable source apex variant using apex_available_name
  Skip `contents` validation of source bootclasspath fragments
2024-09-06 06:07:42 +00:00
Spandan Das
003452ff9c Disable source apex variant using apex_available_name
There are two versions of aosp extservices - one for Tplus and one for
Sminus. When prebuilts are active, the `contents` validation of both
variants of extservices bootclasspath fragments should be disabled to
account for BCP jar skew.

This CL adds ApexAvailableName to ApexInfo to achive that. If an
api_domain matching the ApexAvailableName has been selected in
`all_apex_contributions`, the source apex variants will be disabled.

Bug: 361771739

Test: lunch cf_x86_64_phone-next-userdebug
Test: m nothing with ag/28851886
Change-Id: I505a7ad8295c258e2eeef7f183669f7a75a1c88e
2024-09-06 05:10:41 +00:00
Treehugger Robot
4301e29a02 Merge "Revert "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for..."" into main 2024-09-06 00:48:26 +00:00
Cole Faust
6265120cd2 Remove asset dir glob files
I'm rewriting how globs work in soong to make them compatible with
hash-based ninja implementations. As part of this, I'm removing this
unnecessary usage of globs to make them simpler.

In this case, since we're already globbing the directory at analysis
time and causing soong to rerun, we can ensure the aapt2 action also
reruns by putting a hash of the glob results onto the command line.

Bug: 364749114
Test: m framework-res, touch frameworks/base/core/res/assets/test1.txt, m framework-res rebuilt framework-res.apk, rm frameworks/base/core/res/assets/test1.txt, m framework-res rebuilt framework-res.apk again
Change-Id: I4f666367a9a0fd0dfa42dc51ef3a788a02b41747
2024-09-05 16:36:32 -07:00
Neill Kapron
41efab77d0 SOONG: BPF: add libbpf_prog soong module
This commit adds the libbpf_prog soong module which is heavily based on
the bpf soong module. Due to issues encountered and concerns around
compatibility and testability of mainlined bpf modules, support for
libbpf is added as a separate module.

Specifically, when changing the bpf module from
InitAndroidArchModule(... android.MultilibCommon) to MultilibFirst, the
soong apex bpfs functionality breaks. We have not identified a good
mechanism to fix this, and as we would then be creating architecture
specific bpf program binarys, additional testing and infrastructure
would be required.

It should be noted that libbpf_prog should not be used for features
which target 32bit kernel architectures at this point, as we do not
have a mechanism to identify the kernel arch at build time. I.E. 32bit
userspace could be on either 32bit or 64bit kernel arch, and we require
arch specific includes (vmlinux.h). Therefore, we default to 32bit
userspace on 64bit kernel to match the precedence set with the legacy
bpf programs.

Example use:
libbpf_prog {
    name: "xyz.o",
    srcs: ["xyz.c"],
    arch: {
        arm: {
            local_include_dirs: ["vmlinux/arm64"],
        },
        arm64: {
            local_include_dirs: ["vmlinux/arm64"],
        },
        x86: {
            local_include_dirs: ["vmlinux/x86_64"],
        },
        x86_64: {
            local_include_dirs: ["vmlinux/x86_64"],
        },
    },
}

Bug: 359646531
Test: manual
Change-Id: Ie58515d70abee061470cf4bb803228e00d496ac3
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-09-05 22:37:19 +00:00
Krzysztof Kosiński
6126b6792f Merge "Add ARMv9.2-a arch option." into main am: b379955f0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3255916

Change-Id: I38a8a9a214f4e3f22a9665591eb4f723f72889b3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-05 14:48:09 +00:00
Krzysztof Kosiński
b379955f0e Merge "Add ARMv9.2-a arch option." into main 2024-09-05 14:45:17 +00:00