Commit Graph

83929 Commits

Author SHA1 Message Date
Spandan Das
600afbe381 Add kotlin kzips to build_kzip.bash
Test: Built the phony xref_kotlin target locally
Bug: 265428637
Change-Id: Ib5d6679f17ea45beea8302bc2257e1e4bd0ed7eb
2024-09-11 21:16:24 +00:00
Spandan Das
1028d5a53f Create .kzip files for kotlin translation units
This CL creates the build rules to invoke the standalone kotlin
extractor and create .kzip files for each kotlin translation unit. These
will be indexed by the internal g3 kotlin indexers

Implementation details
- Create a `kotlinKytheExtract` static rule. Its inputs will be source
  .kt/.srcjar files and other verbatim args passed to kotlinc. The
extrator will serialize this information into a .kzip file. The .kzip
file should contain the necessary information to "replay" the
compilation
- Create a xref_kotlin phony rule to build all .kzip files corresponding
  to kotlin translation units.

This implementation has one limitation. Since the kotlin indexers
"replay" the compilation using its own version of kotlinc-jvm, there
might be indexing issues caused by kotlinc version skew between android
builds and indexing builds. `-kotlin-home` can likely solve that, but
this CL defers that for now.

Bug: 265428637
Test: Built the phony `xref_kotlin`, and ran the indexer locally using go/kythe-git-local-run#indexing-to-local-xrefs-server

Change-Id: Ifb370f2df8aa46f71df3fe1ae7d7aa5da773cc8b
2024-09-11 21:16:24 +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
Spandan Das
1679192d7d Skip contents validation of source bootclasspath fragments
... if prebuilts are selected.

This is a special case of b/361771739 where a apex starts contributing a
jar to the BCP. `disableSourceApexVariant` uses
`PrebuiltSelectionInfoProvider` and this gets populated via the
following dep chain
```
source --> prebuilt --> all_apex_contributions
```

This runs into issues if a prebuilt bootclasspath_fragment does not
exist.

This CL creates a dependency edge between the source module and
all_apex_contributions singleton module so that
`PrebuiltSelectionInfoProvider` is available for
`disableSourceApexVariant`

Bug: 361771739
Test: lunch cf_x86_64-next-userdebug
Test: m nothing with ag/28851886
Change-Id: I92d88199a27579d3c9879d40fd354653370efcce
2024-09-06 05:10:29 +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
Treehugger Robot
b32516985d Merge "Remove Android.bp file input to primaryBuilders" into main 2024-09-05 23:26:59 +00:00
Cole Faust
eda96ba50f Remove Android.bp file input to primaryBuilders
The soong primary builder action lists all the Android.bp files
as dependencies via a depfile. The top-level one doesn't need to be
listed as an input explicitly. I think it was there from the early
days of soong when soong started at the top-level Android.bp file and
traversed downwards through references via the subdirs or
optional_subdirs variables.

Bug: 364749114
Test: Presubmits
Change-Id: I72eabe4d4179696bfa258c8c4c56351a132e0870
2024-09-05 15:26:32 -07:00
Colin Cross
151446cb41 Merge "Remove obsolete robolectric test runner integration" into main 2024-09-05 21:03:26 +00:00
Taylor Santiago
4e1af6942d Merge "Undo filtering of HOME environment variable." into main 2024-09-05 21:02:16 +00:00
Treehugger Robot
d18adf146f Merge "Remove versioned_ndk_headers module type." into main 2024-09-05 20:24:56 +00:00
Taylor Santiago
c162dfac78 Undo filtering of HOME environment variable.
It an cause 'nonexistent' user errors in the sandbox.

Bug: 363037195
Change-Id: I5e17fa62029ba9bcd2422fa9aebef95223c68c0d
2024-09-05 19:43:27 +00:00
Priyanka Advani (xWF)
a46053f612 Merge "Revert "Enable -Wfortify-source"" into main 2024-09-05 18:29:06 +00:00
Priyanka Advani (xWF)
435c4ed4a9 Revert "Enable -Wfortify-source"
This reverts commit 492e81bd0e.

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

Change-Id: Ic487ca2f4b5e650b70cfb87889d8bd112bec32c6
2024-09-05 18:24:53 +00:00
Aditya Kumar
d33323c9ed Merge "Enable -Wfortify-source" into main 2024-09-05 17:37:12 +00:00
Spandan Das
3bdb2b5274 Merge "Change visibility of module sdk prebuilts to //visibility:public" into main 2024-09-05 16:41:24 +00:00
Krzysztof Kosiński
b379955f0e Merge "Add ARMv9.2-a arch option." into main 2024-09-05 14:45:17 +00:00
Bill Yang
3b3aac0088 Revert "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for..."
Revert submission 3235656-revert-3195743-compatibility_matrix-KLJOLWYIMW

Reason for revert: The root cause of the break is already be merged. Related changes: ag/29139095, ag/29139608

Reverted changes: /q/submissionid:3235656-revert-3195743-compatibility_matrix-KLJOLWYIMW

Change-Id: Ie23bdd343bebbd077553dc25f0bfd13539daf57a
2024-09-05 09:22:10 +00:00
Yi Kong
acde746439 Merge "Remove workaround for coverage boot failure" into main 2024-09-05 07:01:45 +00:00
Treehugger Robot
a136147c9c Merge "Add VINTF fragment modules into required libs of modules-info" into main 2024-09-05 01:46:19 +00:00
Colin Cross
c9b4f6b502 Use transitive header jars in classpaths
Skip combining jars into turbine-combined, combined, and withres jars
and instead collect transitive jars to use in the classpath and to
produce the final dexed jar.

This reduces the size of a `m checkbuild` in git_main by 11%, from
1300 KiB to 1154 KiB.  It may also improve caching and reduce uplink
network bandwidth when building with RBE, as now the classpath inputs
to rules are themselves outputs of previous rules and so already in
the RBE CAS.

The downside is that the classpath inputs to each rule are now much
longer, increasing the Soong ninja file size 11%, from 4.6 GiB to
5.1 GiB.  This could be mitigated in the future by supporting something
like depsets in the generated ninja file to reduce duplication.

Bug: 308016794
Test: TestSimple, TestKotlin, TestClasspath
Flag: build.RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH
Change-Id: I2b7b4261375494370da70f98597c8719f1d561cf
2024-09-04 16:13:46 -07:00
Taylor Santiago
c61d0a412e Merge "Reapply "Clean environment variables to account for sandbox work directory." with minor edits." into main 2024-09-04 22:56:50 +00:00
Taylor Santiago
8b0bed7187 Reapply "Clean environment variables to account for sandbox work directory."
with minor edits.

This reverts commit 9543d19b4b.

Bug: 363037195
Change-Id: I4cb10b312b7f468185bfad12a16f9b4b64e7a58a
2024-09-04 22:55:02 +00:00
Colin Cross
fdaa672ad1 Remove obsolete robolectric test runner integration
The `m Run*RoboTests` test runner is no longer supported, remove the
code to generate the Make rules for it.

Also reduce the number of combining steps by passing the extra jars
that need to be combined into the compile step.

This relands Icf05079bf570bed7a10962cbf03459bd53c51f99 with a fix to
reorder the instrumented app classes after dependency classes.

Test: atest --host SystemUiRoboTests
Flag: EXEMPT refactor
Change-Id: I174ceb95af5557e1859eeb12a2f5fac2332975a8
2024-09-04 15:47:11 -07:00
Yu Liu
c55b25f125 Merge "Move the caching/restoring code from soong to blueprint to fully skip build actions." into main 2024-09-04 22:01:33 +00:00
Treehugger Robot
b94fef7278 Merge "Revert "Remove obsolete robolectric test runner integration"" into main 2024-09-04 21:36:08 +00:00
Krzysztof Kosiński
918d265a06 Add ARMv9.2-a arch option.
Bug: 364383722
Test: presubmit
Change-Id: Ica7266f6dbac490836f94f7e19685383aba2749f
2024-09-04 21:25:05 +00:00
Aditya Kumar
492e81bd0e Enable -Wfortify-source
Bug: 315245071
Change-Id: I06ced7e599dea83a6dbd68b89c996a3127c318ae
2024-09-04 21:24:12 +00:00
Priyanka Advani (xWF)
72853677e8 Revert "Remove obsolete robolectric test runner integration"
This reverts commit ef5739ed64.

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

Change-Id: Ia18f642492eafdbe2e78d9f753d87f243d529037
2024-09-04 20:15:58 +00:00
Yu Liu
26a716d5e5 Move the caching/restoring code from soong to blueprint to fully skip build actions.
Bug: 358425833
Test: Manually verified the generated ninja and mk files and CI.
Change-Id: Ieebb822c46f37c0ff55fad08531e9870a76cbd7b
2024-09-04 19:59:55 +00:00
Steven Moreland
56aed2b0e8 Merge changes from topic "libbinder_ndk-remove-cpp-headers" into main
* changes:
  ndk_library: limit exports
  Reland "Truely re-export export_header_libs from ndk_library"
  ndk_library depends on the correct arch variant of cc_library_headers
2024-09-04 18:23:19 +00:00
Colin Cross
13d8e82c5e Merge "Rename collectTransitiveHeaderJars and friends to mention R8" into main 2024-09-04 17:34:03 +00:00
Colin Cross
b09e8ec23c Merge "Remove obsolete robolectric test runner integration" into main 2024-09-04 17:21:47 +00:00
Colin Cross
ca3bf2be39 Merge "Move checkbuild targets of Soong modules into Soong" into main 2024-09-04 17:12:03 +00:00
Treehugger Robot
19b81d777d Merge "apex: run host_apex_verifier" into main 2024-09-04 17:07:45 +00:00
Cole Faust
b9e7915f6f Merge "Add tests for configurable PostProcessors" into main 2024-09-04 16:49:32 +00:00
Treehugger Robot
2b5dd203d4 Merge "Revert^2 "Add an explanation to ndk_library."" into main 2024-09-04 16:31:05 +00:00
Colin Cross
a158a71d25 Revert^2 "Add an explanation to ndk_library."
This reverts commit a27204273d.

Reason for revert: unrelated to breakage

Change-Id: Ic7cb64acd72ee8502e608609c0e197fba6a27bf2
2024-09-04 15:33:04 +00:00
Pechetty Sravani (xWF)
53aaadff61 Merge "Revert "Add an explanation to ndk_library."" into main 2024-09-04 06:30:57 +00:00
Pechetty Sravani (xWF)
a27204273d Revert "Add an explanation to ndk_library."
This reverts commit ba9f9262a3.

Reason for revert: DroidMonitor created revert due to b/364440900.

Change-Id: I8661cdce1a1187459b6a0acde4c64a5aa70dcc87
2024-09-04 04:47:25 +00:00
Treehugger Robot
2f33c04a97 Merge "Sandbox environment variables" into main 2024-09-04 02:26:58 +00:00
Spandan Das
2c20726d44 Change visibility of module sdk prebuilts to //visibility:public
To reduce pains introduced by visiblity skew between source
and prebuilts, mark them with //visibility:public

Bug: 239189932
Test: go test ./sdk
Change-Id: I47dd63bd03337bc9ec6fa364bbdcdfdfcd70b0d9
2024-09-04 01:55:22 +00:00
Jooyung Han
0a9eb7f657 Merge changes Ia9f2186e,Ibe567d3b into main
* changes:
  Refactor around apex aconfig files (#2)
  Refactor around apex aconfig files
2024-09-04 01:23:31 +00:00
Treehugger Robot
28b190bc83 Merge "Add an explanation to ndk_library." into main 2024-09-04 01:14:59 +00:00
Yihan Dong
a596b12878 Merge "Apply apimapper instrument tool on android tests" into main 2024-09-04 00:52:09 +00:00
Jiyong Park
b11c99d084 Merge "Make overrides work in Soong" into main 2024-09-04 00:03:20 +00:00
Cole Faust
63ea1f966e Sandbox environment variables
So that the build can't access extra information unintentionally.
Particuarly ANDROID_BUILD_TOP is dangerous.

In the future PATH should be locked down as well.

Bug: 307824623
Test: Added a all_genrules target and built that
Change-Id: I88bb0efb0a82529a1c85875a53cf20c8384d07fe
2024-09-03 16:38:28 -07:00