Commit graph

80951 commits

Author SHA1 Message Date
Colin Cross
a6b407fbf5 Convert AFDO mutators to TransitionMutator
Convert afdoDepsMutator and afdoMutator to a TransitionMutator as a
step towards variants-on-demand.

Bug: 319288033
Test: afdo_test.go
Change-Id: Ib05845455ccf43a07b3915a0d7b0a95896062f13
2024-01-26 11:08:32 -08:00
Treehugger Robot
99ed03f4fe Merge "Add build flag to enable ResourceProcessorBusyBox by default" into main 2024-01-26 19:07:25 +00:00
Colin Cross
33e0c81093 Convert orderfile mutators to TransitionMutator
Convert orderfileDepsMutator and orderfileMutator to a TransitionMutator
as a step towards variants-on-demand.

Bug: 319288033
Test: orderfile_test.go

Change-Id: I27df65b7264a5b059a900e7ea04c18dfb2787a84
2024-01-26 11:06:45 -08:00
Colin Cross
6ac83a8f85 Convert LTO mutators to TransitionMutator
Convert ltoDepsMutator and ltoMutator to a TransitionMutator as a
step towards variants-on-demand.

Bug: 319288033
Test: lto_test.go
Change-Id: I2c9af73fd526adf58ff626831ababea466338205
2024-01-26 11:06:45 -08:00
Ronald Braunstein
92eb74475b Merge "Add rule for proto file so we can write python to use it." into main 2024-01-26 18:56:24 +00:00
Spandan Das
e21a8d4dc6 Fix the args used to dexpreopt system server jars in prebuilt apexes
For prebuilts, java.dexpreopt gets called twice
1. in the context of the top-level prebuilt apex
2. in the context of the java_library shim

Only the artifacts of (1) get installed. The artifacts generated by 2)
are unused. However the args used to generate the artifacts of (1) are
incorrect. It uses moduleName(ctx) to do special-handling of apex system
server jars. This special-handling does not happen in (1), so although
dexpreopt artficats get generated, they get generated with the wrong
args.

To fix this, add an additional parameter in java.dexpreopt to pass the
libraryName explicitly.

Details
- Delete moduleName function. This was used to determine the java
  library name, which is no longer safe
- Add a libraryName parameter to java.dexpreopt
- Most module types will use j.Name() as libraryName
- prebuilt_apex and apex_set will iterate over its `contents` and use
  each element as libraryName when invoking java.dexpreopt

With the correct args passed from (1), we can drop j.dexpreopt from (2)
completely. Dropping (2) also breaks profile guided dexpreopt tests.
These currently operate on (2). They will be moved to (1) in the next CL
of this stack.

Test: presubmits
Test: lunch cf_x86_64_auto-trunk_staging-userdebug && m nothing (this
was a postsubmit failure with aosp/2923733)
Test: art_standalone_dexpreopt_tests on next https://android-build.corp.google.com/builds/abtd/run/L86000030001579256
Test: art-gtest on git_master-art-host https://android-build.corp.google.com/builds/abtd/run/L07800030001550262

Bug: 308790457
Bug: 322255144

Change-Id: I8eb604c82f1fa5289d3cd1a20084d56e4d7485e3
2024-01-26 18:06:41 +00:00
Colin Cross
8f1b033cf7 Add build flag to enable ResourceProcessorBusyBox by default
Setting the RELEASE_USE_RESOURCE_PROCESSOR_BY_DEFAULT build flag will
change the default for use_resource_processor from false to true.

Bug: 294256649
Test: builds
Change-Id: If643bf8db9e2e039200f63f4aac226ed5b44d9e0
2024-01-26 09:09:42 -08:00
Sorin Basca
78885cae81 Use Java 1.8 when generating build files
Bug: 320294595
Test: m
Change-Id: I5d4405001e02f2baa56650203be23caceb1094c0
2024-01-26 16:47:40 +00:00
Ronald Braunstein
1228b0baef Add rule for proto file so we can write python to use it.
I wrote another tool filter and augment the proto files, but these proto
files need to have a python library for that tool.

Test: m filter_teams && out/host/linux-x86/bin/filter_teams  --filter_teams

Change-Id: I6b259ddda2b6c09d55a9c6d445b96e5b77741f09
2024-01-25 21:10:04 -08:00
Treehugger Robot
c8f2bfaca9 Merge "Remove depfile support from genrules" into main am: 091fbb1dad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2929650

Change-Id: I8b9905b32bbe98eabb294e8da4c581762d6cfa9d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-26 03:53:49 +00:00
Treehugger Robot
091fbb1dad Merge "Remove depfile support from genrules" into main 2024-01-26 03:16:23 +00:00
Cole Faust
5549257422 Remove depfile support from genrules
All usages of it have been removed.

Bug: 307824623
Test: Presubmits
Change-Id: I9502b328a5aaa6840653f46011ca6bd05f3cba99
2024-01-25 18:05:18 -08:00
Spandan Das
fb5d0ea59f Merge "Move ApexBundleInfoProvider from apex/ to android/" into main am: 8ed589800c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2929188

Change-Id: I41c25214f74c730a921d63c95fae84fc761cfd02
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-26 00:40:21 +00:00
Spandan Das
8ed589800c Merge "Move ApexBundleInfoProvider from apex/ to android/" into main 2024-01-25 23:59:47 +00:00
Colin Cross
b45435793a Merge "Convert coverageMutator to a TransitionMutator" into main am: e28cdf362e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2923152

Change-Id: I51172a1a61d542111158fcc3f74a8eab4b15e166
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 23:33:40 +00:00
Colin Cross
e28cdf362e Merge "Convert coverageMutator to a TransitionMutator" into main 2024-01-25 23:19:29 +00:00
Cole Faust
03e69e168c Merge "Make hiddenAPIFlagFileCategory an int" into main am: 1627236844
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2925155

Change-Id: Ie0d3b014803746ad9a99c312aefb58a840d77f37
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 23:12:20 +00:00
Cole Faust
1627236844 Merge "Make hiddenAPIFlagFileCategory an int" into main 2024-01-25 22:42:39 +00:00
Spandan Das
f5e03f1c1a Move ApexBundleInfoProvider from apex/ to android/
This provider contains information about the contents of an apex and is
set during the post deps phase of top-level source and prebuilt apexes.

java.dexpreoptDisabled needs to distinguish between platform and apex
variants of a library to prevent creating duplicate ninja rules. It does
so by looking at ApexInfoProvider. This provider gets set on the ctx of
the java_library being dexpreopted.

In case of prebuilts, these rules are being moved to the top-level
prebuilt apexes. Move ApexInfoBundleProvider from apex to android so
that java.dexpreoptDisabled can consume this provider without running
into a golang circular dependency. (java.dexpreoptDisabled will use this
provider in the next CL of this stack).

Test: go build ./android ./apex
Change-Id: I665abd9d0591eeb17b273cc822beb20690e6af09
2024-01-25 22:35:54 +00:00
Asmita Poddar
ef0e9c3cf4 Merge "Revert "Ensure sscp jars get copied to $OUT/soong/system_server_dexjars"" into main am: 1f4475cee1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2927392

Change-Id: I4dc9eca8826a9d9fb7a90e477860ecc5b18a72e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 10:53:58 +00:00
Asmita Poddar
1f4475cee1 Merge "Revert "Ensure sscp jars get copied to $OUT/soong/system_server_dexjars"" into main 2024-01-25 10:08:11 +00:00
Treehugger Robot
14eea647f9 Merge "Replace goldmont-without-xsaves build with goldmont-without-sha-xsaves" into main am: 471e181f92
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2926131

Change-Id: Id216ec35a89513512109c1ae187f361ffaf1e71a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 08:47:05 +00:00
Treehugger Robot
471e181f92 Merge "Replace goldmont-without-xsaves build with goldmont-without-sha-xsaves" into main 2024-01-25 08:11:40 +00:00
Treehugger Robot
b64d65ad85 Merge "Export clang coverage flags" into main am: 2a7e184383
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2852912

Change-Id: I9a479478fb86ad5e1d003a01a08a3a583c64f11b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 06:38:54 +00:00
Treehugger Robot
2a7e184383 Merge "Export clang coverage flags" into main 2024-01-25 06:18:23 +00:00
Spandan Das
b2fd4ff43f Revert "Ensure sscp jars get copied to $OUT/soong/system_server_dexjars"
This reverts commit 0b7089f134.

Reason for revert: Breaks auto builds https://groups.google.com/a/google.com/g/android-build-police/c/DfXeyxkyfYk/m/4SvZa-jkAAAJ

Change-Id: Ia6ebdf64d03284d2318978c35cb87fd4f0b79531
2024-01-25 04:25:38 +00:00
LaMont Jones
922fffb67a Merge "Propagate AconfigFiles in ModuleBase." into main am: d381b62ac4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2915905

Change-Id: I80435548e66d78503a5804c0b18ea5feaef10013
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 02:18:56 +00:00
Spandan Das
a3c8609972 Merge "Ensure sscp jars get copied to $OUT/soong/system_server_dexjars" into main am: 9d4ad66a93
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2923733

Change-Id: Ie566d78cd8a5f4d64c749c341e1e1d1a64e1fa60
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-25 02:18:25 +00:00
LaMont Jones
d381b62ac4 Merge "Propagate AconfigFiles in ModuleBase." into main 2024-01-25 01:31:12 +00:00
Spandan Das
9d4ad66a93 Merge "Ensure sscp jars get copied to $OUT/soong/system_server_dexjars" into main 2024-01-25 01:27:18 +00:00
LaMont Jones
b509938e4f Propagate AconfigFiles in ModuleBase.
Aconfig file dependencies are module-independent, and properly part of
ModuleBase.

Bug: b/308625757
Test: manual

Change-Id: I38c5907d1671cc69bb198345201316ae781fdc9f
2024-01-24 23:45:12 +00:00
Jihoon Kang
e3602321e4 Merge "Prepare to generate "runtime" stubs in droidstubs" into main am: dbc88dc4d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2921390

Change-Id: Ic15e891878fe70cd635f85e8939150ff39fec05c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-24 22:02:45 +00:00
Jihoon Kang
dbc88dc4d0 Merge "Prepare to generate "runtime" stubs in droidstubs" into main 2024-01-24 21:30:38 +00:00
Colin Cross
038f35114a Merge changes from topic "transition-mutator-config" into main am: c50999eb0a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2923151

Change-Id: I1246b7ef231ba6fa3b2fab5bf9dd95feb4967c4b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-24 20:36:25 +00:00
Colin Cross
c50999eb0a Merge changes from topic "transition-mutator-config" into main
* changes:
  Add ArchModuleContext to TransitionMutator contexts
  Split ArchMutatorContext out of BaseMutatorContext
2024-01-24 20:03:46 +00:00
Jihoon Kang
325278c925 Merge "Error when WITHOUT_CHECK_API=true in from-text stub build" into main am: 5373efc1c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2925990

Change-Id: Ibd54f2bc9b49c8ed69658cf627693cdaf834d749
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-24 19:22:36 +00:00
Colin Cross
f5f4ad3db6 Convert coverageMutator to a TransitionMutator
Convert coverageMutator to a TransitionMutator as a step towards
variants-on-demand.

Bug: 319288033
Test: coverage_test.go
Test: treehugger coverage builds
Change-Id: Ic50c0040dea8b42c36b5d784221daa00b7b0d379
2024-01-24 10:17:10 -08:00
Colin Cross
4aa3e0ab81 Add ArchModuleContext to TransitionMutator contexts
Converting coverageMutator to a TransitionMutator requires adding
the ctx.Device() and ctx.DeviceConfig() methods.

Bug: 319288033
Test: builds
Change-Id: I697b48eb89bc23800d2d3c62d68358769f0d1075
2024-01-24 10:17:10 -08:00
Colin Cross
1d3d9f13b8 Split ArchMutatorContext out of BaseMutatorContext
Split the context methods that are useful on anything visiting a
module that has arch variants into a separate ArchMutatorContext
for reuse by TranstitionMutators.

Bug: 319288033
Test: builds
Change-Id: Ifdc21983c6c79f22965a49f169812a8cc3ad975b
2024-01-24 10:17:10 -08:00
Jihoon Kang
5373efc1c7 Merge "Error when WITHOUT_CHECK_API=true in from-text stub build" into main 2024-01-24 18:06:53 +00:00
Satoshi Niwa
b6d818dbf0 Replace goldmont-without-xsaves build with goldmont-without-sha-xsaves
For chromebooks, we need a new build variant whose target arch is
goldmont, but without SHA and XSAVES support (b/314243939#comment21)

Bug: 314243939
Test: Build an image with TARGET_ARCH_VARIANT:=goldmont-without-sha-xsaves
Change-Id: If73660b515b443d5c138ca367fa3d1c6f18485b5
2024-01-24 16:27:56 +09:00
Spandan Das
0b7089f134 Ensure sscp jars get copied to $OUT/soong/system_server_dexjars
(This was missed in aosp/2876756, which copied only the bcp jars)

This hardcoded location is used by dex2oat to compile the dexpreopt
artifacts. The copy rules are currently generated by java_(sdk)_library
for source builds, and their prebuilt counterparts in prebuilt builds.

After this change, the copy rule will be bifurcated between source and
prebuilt builds
1. For source builds, it will come from java_(sdk)_library
2. For prebuilt builds, it will come from the top-level prebuilt apex.
   Since there can be multiple prebuilt apexes in trunk stable,
   HideFromMake will be used to determine which deapexed jar to copy.

The bifurfaction is expected to be temporary. It is needed for now since
the `apex_contributions` which will be used for source vs prebuilt
selection have not been populated completely.

Test: Added a unit test
Test: Presubmits
Test: git_master-art-host:
art-gtest (https://android-build.corp.google.com/builds/abtd/run/L40800030001459791)
Test: git_main:art_standalone_tests
(https://android-build.corp.google.com/builds/abtd/run/L09000030001463855)

Bug: 308790457

Change-Id: I3105d3b3a7e5c41cb601d07806f4ea483a61b50a
2024-01-24 05:14:40 +00:00
Cole Faust
22e8abcaa6 Make hiddenAPIFlagFileCategory an int
hiddenAPIFlagFileCategory used to contain function pointers, and is
used in a provider. Providers must be serializable for incremental
soong support, so the function pointers must be removed.

Refactor hiddenAPIFlagFileCategory into a simple int.

Bug: 322069292
Test: m nothing --no-skip-soong-tests
Change-Id: I2bd50fa1b59979f30869b405314cbef16ee345f1
2024-01-23 18:01:47 -08:00
Jihoon Kang
91bf3dd4ac Error when WITHOUT_CHECK_API=true in from-text stub build
Given that WITHOUT_CHECK_API=true is incompatible with from-text stub
build, this change makes the module raise an error when the two
conflicting configurations are set.

This change also modifies the checkapi error message, that
DISABLE_STUB_VALIDATION does not bypass checkapi.

Test: m nothing --no-skip-soong-tests && WITHOUT_CHECK_API=true m nothing
Bug: 322060779
Change-Id: I597309baa8fcfbefa05863c7b392bfb8b6774cea
2024-01-24 01:21:47 +00:00
Treehugger Robot
7a6afde325 Merge "Really disable auto-vectorization." into main am: 1e33a311c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2922685

Change-Id: I192096adfe4a5accaf156bae869e2900a3d5c78b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23 19:09:18 +00:00
Treehugger Robot
1e33a311c6 Merge "Really disable auto-vectorization." into main 2024-01-23 17:46:58 +00:00
Ronald Braunstein
9a412422cc Merge "Add team property to all modules." into main am: 43f3b601e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2883106

Change-Id: I4ec4d527ab773373b4b3640e7a03df5f8ca854f9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23 16:30:03 +00:00
Elliott Hughes
ffbaa4063c Merge "Greatly reduce build warning spam." into main am: 45fd5175ff
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2923136

Change-Id: Ie2681ff051168cc48248c72c5be9937ac84ab18b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-01-23 16:29:50 +00:00
Ronald Braunstein
43f3b601e2 Merge "Add team property to all modules." into main 2024-01-23 16:00:58 +00:00
Elliott Hughes
45fd5175ff Merge "Greatly reduce build warning spam." into main 2024-01-23 15:43:10 +00:00