Commit Graph

50296 Commits

Author SHA1 Message Date
Paul Duffin
a87d148823 Add analyze_bcpf.py script to help manage bootclasspath_fragments am: 4dcf65951b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2020741

Change-Id: I92c0a9d5b9d63abf04af465840ff6f0d13ef03e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 15:20:18 +00:00
Paul Duffin
4dcf65951b Add analyze_bcpf.py script to help manage bootclasspath_fragments
The analyze_bcpf.py script can be used by bootclasspath_fragment owners
to help setup their fragment and also to debug issues that arise during
use.

It is run by specifying the name of the bootclasspath_fragment module
in the --bcpf option. If specified the --apex and --sdk options will
allow the tool to produce more helpful messages.

The script currently:
* Builds out/soong/hiddenapi/hiddenapi-stub-flags.txt and checks any
  inconsistencies between those flags and the flags generated for the
  bootclasspath_fragment.

* Builds out/soong/hiddenapi/hiddenapi-flags.csv and checks any
  inconsistencies between those flags and the flags generated for the
  bootclasspath_fragment. It will describe the changes that need to
  be made in order to fix any inconsistencies in the flags.

Bug: 202154151
Test: m analyze_bcpf && analyze_bcpf --bcpf art-bootclasspath-fragment
      atest --host analyze_bcpf_test
Change-Id: I824fd9d527d246dfe56725c073d89a0b0e72d25a
2022-03-30 12:18:56 +01:00
Colin Cross
e3f28d26a6 Merge changes from topic "musl_clang_runtimes" am: 0f2a718ce4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980450

Change-Id: I89cabdde43dea0e5b2505f09d80d67356484433e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 04:11:59 +00:00
Colin Cross
b7ea2f5c7e Switch to libunwind to remove dependency on libgcc for musl am: 441898c285
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983628

Change-Id: I1520b92b0fa7a3266915cd20dd45019df761a849
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 04:11:55 +00:00
Colin Cross
0f2a718ce4 Merge changes from topic "musl_clang_runtimes"
* changes:
  Enable sanitizers for musl
  Switch to libunwind to remove dependency on libgcc for musl
2022-03-30 03:54:38 +00:00
Treehugger Robot
578ea8d076 Merge "android_system_image only packages "system" items" am: 0cfe1f43f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2030223

Change-Id: Icd1602f08035e2c6eea39eacc0cf448a6b04fe31
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 03:18:17 +00:00
Treehugger Robot
0cfe1f43f7 Merge "android_system_image only packages "system" items" 2022-03-30 02:58:58 +00:00
Rob Seymour
d7e3a12438 Add pre-built attribute to host module definition for fake snapshot. am: 9e5cc8a674
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2044967

Change-Id: Iadd0cc05e885f2b39156aa1446bd55e2d1cea555
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 01:06:53 +00:00
Colin Cross
441898c285 Switch to libunwind to remove dependency on libgcc for musl
The libgcc dependency is only used for _Unwind* symbols, remove
it now that libc_musl.so embeds libunwind.a.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: I1ad4c1435fc0090c6df2d50d542d2203dfb94d7b
2022-03-29 13:35:17 -07:00
Colin Cross
ed12a04a3e Enable sanitizers for musl
Now that we provide runtimes built for musl, enable the sanitizers
when targeting musl.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: Id17513ee305274874c31e9c99ce4faeff4a1c057
2022-03-29 13:35:17 -07:00
Rob Seymour
9e5cc8a674 Add pre-built attribute to host module definition for fake snapshot.
The host-snapshot provides host tools via prebuilt modules.
Having 2 prebuilts of the same module in a source tree leads to a build
time error.   Add new attribute when building the fake snapshot to
indicate that the host tool contains a prebuilt version.

When installing the host snapshot the user can opt not to include
modules that have a prebuilt version.

Bug: 225890931
Test: m HOST_FAKE_SNAPSHOT_ENABLE=true host-fake-snapshot dist
Change-Id: I044a92a280536f9c5ec93dcb277a5e5568cc4e42
2022-03-29 16:08:43 +00:00
Ram Muthiah
ad2c724bb7 Merge changes from topic "refactor-packagingbase" am: ac38c0bb93
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2033505

Change-Id: Id522cf99f18a14acb16227188ef027e2b504c5c1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 14:08:52 +00:00
Ivan Lozano
77218bb2ae Merge "rust: rust_proc_macro host snapshot support." am: 72cbf5888b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2042225

Change-Id: I2c408bde100546292c09e661ec076d739661e30e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-29 14:08:27 +00:00
Ram Muthiah
ac38c0bb93 Merge changes from topic "refactor-packagingbase"
* changes:
  Move GatherPackagingSpecs out of CopyDepsToZip
  Keep 'partition' in PackagingSpec
2022-03-29 13:45:22 +00:00
Ivan Lozano
72cbf5888b Merge "rust: rust_proc_macro host snapshot support." 2022-03-29 13:29:24 +00:00
Jooyung Han
0fbbc2b0d4 android_system_image only packages "system" items
android_system_image filers packaging items installed outside "system"
partition.

Some packaging items install related items to different partitions but
putting them altogether to android_system_image doesn't make sense.
(android_system_image is suppposed to be "system" partition)

To be specific, this filters out "apex" partition items.  "apex"
partition is used by APEX installation to install APEX contents to paths
similar to activated paths on device so that symbol lookup works well
with APEX contents.

Bug: 225121718
Test: atest MicrodroidHostTestCases
Test: debugfs <intermediate>/microdroid.img -R 'ls system'
  shows no "com.android.runtime"
Change-Id: Ibc3d85ead2fda99e231132ce8ab9ccf1cc9317b7
2022-03-29 07:56:02 +09:00
Treehugger Robot
9fadff9a6b Merge "Add values to json module graph" am: 4242115d59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2036896

Change-Id: Ie014ca08c6d124185fbb4a7ff1a8ee65bb46de25
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 20:47:51 +00:00
Treehugger Robot
4242115d59 Merge "Add values to json module graph" 2022-03-28 20:25:43 +00:00
Colin Cross
9ad80f6486 Merge "Use turbine instead of kapt for kotlin annotation processors" am: edd46702e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2030724

Change-Id: I6063a9ba1100ae82bdddb8a49d3860d2ed196c8e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 18:28:20 +00:00
Colin Cross
79e93d626a Merge "Don't use ziptime or --temp_dir for turbine" am: e311abcd44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2030723

Change-Id: I88dfba08c5e64a7da4673dc8674e8ea579cc85b9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 18:27:18 +00:00
Colin Cross
edd46702e1 Merge "Use turbine instead of kapt for kotlin annotation processors" 2022-03-28 18:07:14 +00:00
Colin Cross
e311abcd44 Merge "Don't use ziptime or --temp_dir for turbine" 2022-03-28 18:00:49 +00:00
Jooyung Han
42f6e1f4f0 Merge "Revert "Add a tool to list contents of .img file"" am: 76c255f45a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2045010

Change-Id: Ib2b1bc21f45982e2a2fbc93a71bccb05724c00fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 10:08:28 +00:00
Jooyung Han
76c255f45a Merge "Revert "Add a tool to list contents of .img file"" 2022-03-28 09:48:10 +00:00
Jooyung Han
1df464a90b Revert "Add a tool to list contents of .img file"
Revert submission 2041990-microdroid-contents

Reason for revert: b/227144320 (broken build)
Reverted Changes:
Ie2f471d39:Add the golden list of microdroid contents
I7c4fca184:Add a tool to list contents of .img file

Change-Id: If2b5d6cb1325cb17ef2bdc4f13ded003ab2dd6d7
2022-03-28 09:44:33 +00:00
Jooyung Han
a883428293 Move GatherPackagingSpecs out of CopyDepsToZip
This gives a PackageModule a chance to filter/customize the contents of
resulting package.

Bug: 225121718
Test: m (no changes)
Change-Id: I45505e8234dff42201dc40d4f038e7b08eea89f0
2022-03-28 14:29:14 +09:00
Jooyung Han
99c5fe6a38 Keep 'partition' in PackagingSpec
Add a property 'partition' to PackagingSpec and fill it when
PackagingSpec is created.

This will enable PackageModule to filter PackgingSpec based on
partition. (Will be used in a follow-up change)

Bug: 225121718
Test: m (nothing changes)
Change-Id: I7657edd380e215df66bae57d8b07dd4181841fdf
2022-03-28 14:29:14 +09:00
Treehugger Robot
44e7cb664a Merge "Add a tool to list contents of .img file" am: 23ce5b4ca2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2041990

Change-Id: Ie1811ccc3aaa56456f94c57e7dc4efcd6f817780
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-28 05:24:07 +00:00
Treehugger Robot
23ce5b4ca2 Merge "Add a tool to list contents of .img file" 2022-03-28 05:06:55 +00:00
Treehugger Robot
0c576c591f Merge "Dedupe libraries in both static and whole static" am: 6876d5aa5f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2032378

Change-Id: Ife1337bd64542061d26929be94db7ba24d5a8d38
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-26 00:38:09 +00:00
Treehugger Robot
8ef2e1c7fe Merge "Add metrics collection to soong_build" am: 1c2d87ba83
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2044963

Change-Id: I6e0a7d386a212ae8abb50c5b86dccdb6812279f8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-26 00:37:56 +00:00
Treehugger Robot
6876d5aa5f Merge "Dedupe libraries in both static and whole static" 2022-03-26 00:32:01 +00:00
Treehugger Robot
1c2d87ba83 Merge "Add metrics collection to soong_build" 2022-03-26 00:21:21 +00:00
Liz Kammer
898e076d6f Add values to json module graph
Increases size of json module graph but it still remains smaller than
action information.

Test: m json-module-graph
Change-Id: I215e92afb0f5d3d688e5e590517392d0cc534455
2022-03-25 18:30:49 -04:00
Chris Parsons
715b08fd82 Add metrics collection to soong_build
Metrics are added to a materialized protobuf soong_build_metrics.pb

Recorded events have scoped names and recorded runtimes.
For example, mixedbuilds includes the following events:

mixedbuilds.prepare
mixedbuilds.analyze.write_files
mixedbuild     (this is a total of all mixedbuild events)

Test: Manually verified materialized protos for mixedbuild, bp2build,
and legacy build.

Change-Id: I2e72d4502c0373bee0279bb1320b2e4dd586129c
2022-03-25 17:19:44 -04:00
Mitch Phillips
ab50a4f910 Merge "[HWASan] Enable zero-initialization." am: c6ea944e18
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2037383

Change-Id: Iecb84d51be0c5ebfc9bca66f2f17a1a6c28e16a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 21:08:24 +00:00
Mitch Phillips
c6ea944e18 Merge "[HWASan] Enable zero-initialization." 2022-03-25 20:53:02 +00:00
Colin Cross
f61766e987 Use turbine instead of kapt for kotlin annotation processors
Follow Bazel by using turbine instead of kapt to run annotation
processors.  This still requires using kapt to generate java stubs
of kotlin soruces, then uses turbine to run annotation processors
on the java stubs and any java sources to generate sources and
resources, and passes the annotation processor generated sources
to kotlinc and javac.

Bug: 225013372
Test: m checkbuild
Test: TestKapt
Change-Id: I9c6fc496a9fba64658bb062538bc5f7b9478b07a
2022-03-25 10:28:50 -07:00
Colin Cross
411647e8f4 Don't use ziptime or --temp_dir for turbine
Turbine sets dates to 2010 and doesn't need ziptime any more, and
ignores the --temp_dir flag.

Bug: 225013372
Test: m checkbuild
Change-Id: I6122f27d873ca671050e4dc0d65641bb52e90e99
2022-03-25 10:26:47 -07:00
Spandan Das
d2f5f1c690 Merge "Do not propagate strict_updatability linting to conscrypt and framework-media java_sdk_libraries" am: 183ed1044c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2043123

Change-Id: Ice945ab22199b5b552a9a68f31b8eea9c4d879d4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 17:02:53 +00:00
Trevor Radcliffe
2705a090ca Merge "Allow appending artifact in dist with product name" am: dadc037ef3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2034743

Change-Id: I0b6fbfbbc340b2d278057a1d8b030a9cdb51fe39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 16:59:04 +00:00
Spandan Das
183ed1044c Merge "Do not propagate strict_updatability linting to conscrypt and framework-media java_sdk_libraries" 2022-03-25 15:05:06 +00:00
Trevor Radcliffe
dadc037ef3 Merge "Allow appending artifact in dist with product name" 2022-03-25 14:34:23 +00:00
Ivan Lozano
872d579a22 rust: rust_proc_macro host snapshot support.
Adds support for capturing rust_proc_macros as part of the host
snapshot. Proc macros target the host and can be thought of as compiler
plugins. Because of this, they don't have vendor image variants and
can't be easily captured as part of the vendor snapshot. Instead we
capture them as part of the host snapshot.

This adds a rust_prebuilt_proc_macro module type.

Bug: 204304380
Test: m HOST_FAKE_SNAPSHOT_ENABLE=true host-fake-snapshot dist
Test: python3 development/vendor_snapshot/update.py --image=host
  --install-dir=vendor/vendor_name/ 31 --local out/dist
Test: Checked Android.bp for rust_prebuilt_proc_macro modules.
Change-Id: I4a8c4d9c41b7ca361b5b97d3f74973918c2a5fe3
2022-03-25 09:25:07 -04:00
Yi Kong
5c1c1cc020 Merge "Update to clang-r450784" am: 846a25912d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2027885

Change-Id: I91d23b723f4d1fd4871a88e44d36cc966b086050
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 06:07:49 +00:00
Yi Kong
846a25912d Merge "Update to clang-r450784" 2022-03-25 05:49:48 +00:00
Yi Kong
75ce5d3320 Update to clang-r450784
Test: presubmit
Bug: 219872355
Change-Id: I3cd5f42d887b07929906e08d7d9f1a677b8a4403
2022-03-25 04:30:53 +00:00
Spandan Das
2cf278e75b Do not propagate strict_updatability linting to conscrypt
and framework-media java_sdk_libraries

Tmp fix for
https://android-build.googleplex.com/builds/quarterdeck?branch=aosp-master&target=errorprone&lkgb=8352129&lkbb=8353967&fkbb=8352538

Test: m
out/soong/.intermediates/external/conscrypt/conscrypt.module.public.api.stubs.system/android_common/lint/lint-baseline.xml
Test: (internal CI target) https://android-build.googleplex.com/builds/abtd/run/L67700000953708519
Bug: 182349282
Bug: 226637002
Bug: 226608044

Change-Id: I17e540877200f59bfd51e69e57d8bcca6cf3850f
2022-03-25 02:31:20 +00:00
Jooyung Han
b3a3a2893b Add a tool to list contents of .img file
list_image <img> lists the contents of the file.

For example:
  $ m microdroid
  $ list_image <path to microdroid.img>
  ./
  ./apex/
  ./bin
  ..

Bug: 195425111
Bug: 225121718
Test: list_image .img
Change-Id: I7c4fca184751ba20066fd25fa4c366a955dbabf6
2022-03-25 02:44:36 +09:00
Spandan Das
3dd2985871 Merge changes I4c373b29,I9ccda6fc,I1b390b0e,I30151217 am: ad40fffa64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1977412

Change-Id: I94b4d8667a3fb5fcb4e7212250b34452cf42634d
2022-03-24 17:04:15 +00:00