Commit Graph

35279 Commits

Author SHA1 Message Date
Paul Duffin cc3132e496 Clarify behavior around handling of sdk members
Renames some types and adds some documentation to try and clarify how
the sdk handles the members.

Bug: 186290299
Test: m nothing
Change-Id: I4038276f5f4c473a96fe06aedc43050c90416877
2021-04-24 16:49:26 +01:00
Paul Duffin 2182726990 Rename sdkMemberRef to sdkMemberVariantDep
Previously, there were two types sdkMemberRef and sdkMember that seemed
as though the former was referring to the latter but that was not the
case. The former was actually information about the dependency the sdk
had on a specific member variant. The latter is all the information
about a specific member, including all its variants.

This change attempts to clarify that relationship, both through a
better type name and through some improved documentation.

Bug: 186290299
Test: m nothing
Change-Id: I1dcc0ddf3333da9e797bb23ae945d04729839014
2021-04-24 16:48:16 +01:00
Paul Duffin 26197a65da Extract addSnapshotModule from buildSnapshot
Bug: 186290299
Test: m nothing
Change-Id: I297d63366d71f692572e8e40f1e510b6e41859e6
2021-04-24 16:48:16 +01:00
Paul Duffin 3b0c95b0e2 Merge "Check consistency of the BootJars/UpdatableBootJars config" 2021-04-24 08:54:27 +00:00
Paul Duffin 95661aab07 Merge "Remove unused boot_image module type, prebuilt and sdk member type" 2021-04-23 22:20:10 +00:00
Ivan Lozano e934263d18 Merge "rust: Pass additional Clang C flags from toolchain" 2021-04-23 18:13:10 +00:00
Paul Duffin df160eb463 Remove unused boot_image module type, prebuilt and sdk member type
Bug: 177892522
Test: m nothing
Change-Id: I5763b55992e4113506ae5ccdaf9865ee27d8b041
2021-04-23 17:00:26 +01:00
Paul Duffin 7771eba88e Rename BootImageModule to BootclasspathFragmentModule
Also renames files, tests, module types in a similar fashion.

There are still some references to image and boot image. They are kept
for the following reasons:
* image_name - this is the name of an ART boot image, i.e. the
  collection of .art/.oat/.vdex files.
* BootImageInfo - again this is related to the ART boot image.
* .../art_boot_images/... paths - ditto.

Bug: 177892522
Test: m nothing
Change-Id: Ie1f4738061d131fee75de48bc26a7601481bad4d
2021-04-23 16:59:26 +01:00
Paul Duffin d5f8421afd Merge changes Ic32f02a6,Ibe358542
* changes:
  Export classesJars initialized in hiddenAPIExtractInformation
  Generalize the platformBootclasspathDepsMutator
2021-04-23 15:57:46 +00:00
Jaewoong Jung 8811dcbb22 Merge "Fix minor issues in updatability lint CLs." 2021-04-23 15:31:41 +00:00
Treehugger Robot 459c532e44 Merge "Incorporate cc_library_headers into mixed builds" 2021-04-23 15:14:55 +00:00
Paul Duffin fbe3a73d48 Merge "Extract general bootclasspath related code into java/bootclasspath.go" 2021-04-23 15:04:10 +00:00
Treehugger Robot 784ad87dd6 Merge "Don't plumb PRODUCT_*_CLASSPATH vars to make." 2021-04-23 14:32:33 +00:00
Ivan Lozano 871e34290e rust: Pass additional Clang C flags from toolchain
The set of Clang flags passed to bindgen from the toolchain was
incomplete. In addition to ToolchainClangCflags(), we also need to call
ClangCflags().

Bug: 184081465
Test: m libgrpc_bindgen
Change-Id: I0b62345fee2f55ba18b4a0c4d825f0447c99db06
2021-04-23 10:25:35 -04:00
Liz Kammer b6a55bf065 Incorporate cc_library_headers into mixed builds
Test: go soong tests
Test: bp2build generate & sync; mixed build libc; mixed build su (su is
      an Android.mk target that relies on converted a cc_library_headers)
Bug: 181552740
Change-Id: I9efd587970551fd41f642a208f0aa0a80e8694e0
2021-04-23 09:37:33 -04:00
Treehugger Robot 39e03144a0 Merge "Revert^3 "Add debug ramdisk variant"" 2021-04-23 13:09:24 +00:00
Paul Duffin ed0b64f65b Merge "Add exported_bootclasspath_fragments to prebuilt_apex/apex_set" 2021-04-23 13:01:48 +00:00
Liz Kammer dbe1ef2149 Merge "Add bp2build arch-specific paths mutator" 2021-04-23 12:50:05 +00:00
Paul Duffin 7d1d083ec1 Check consistency of the BootJars/UpdatableBootJars config
Both out/soong/dexpreopt.config and out/soong/soong.variables contain
configuration for the BootJars and UpdatableBootJars that MUST be
identical. If they are not then it can lead to broken builds.

This change adds a consistency check for them that will make the issue
more obvious.

Bug: 186195980
Test: DIST_DIR=out/bionic-dist ./art/tools/dist_linux_bionic.sh -j80 com.android.art.host com.android.support.apexer --skip-soong-tests
      Ran the previous command with and without the fix in
      https://r.android.com/1684877. Without the fix the build reported
      an inconsistency in the configuration, with that fix the build
      passed.
Change-Id: I10fbe328ba4f1fbd9db4708409979e9824c196ef
2021-04-23 12:23:01 +01:00
Paul Duffin 023dba0a3f Add exported_bootclasspath_fragments to prebuilt_apex/apex_set
This is needed to allow a prebuilt_bootclasspath_fragment to be used
interchangeably with a bootclasspath_fragment in the
platform_bootclasspath module.

The platform_bootclasspath module depends on APEX specific variants of
bootclasspath_fragment modules. That works because the
bootclasspath_fragment modules are part of an apex and so have an APEX
specific variant which the platform_bootclasspath can specify.

Using a prebuilt_bootclasspath_fragment in place of a
bootclasspath_fragment requires that the prebuilt also has an APEX
specific variant.

Specifying exported_bootclasspath_fragments on a prebuilt_apex/apex_set
will cause it to create an APEX variant for the named module whcih will
allow it to be selected by the platform_bootclasspath module.

Bug: 186034565
Bug: 177892522
Test: m nothing
Change-Id: I7ddacc6498ec3a4a9f26c5f78b7f9a033e494d78
2021-04-23 12:12:37 +01:00
Paul Duffin 36187b2cf3 Export classesJars initialized in hiddenAPIExtractInformation
This exports classesJars constructed in hiddenAPIExtractInformation
through the hiddenAPIIntf interface for use by the
bootclasspath_fragment module type.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: Ic32f02a69229d9518772fe6b2a329501dd8cd849
2021-04-23 09:32:14 +01:00
Paul Duffin b67d878b80 Extract general bootclasspath related code into java/bootclasspath.go
The platform_bootclasspath and bootclasspath_fragment modules provide
different capabilities but are related and so have some common
functionality. This change moves some platform_bootclasspath code that
will be of use for bootclasspath_fragment in future into a separate
file.

Bug: 177892522
Test: m nothing
Change-Id: I827b85e33d16155fcc920d553100c9e99267dc4e
2021-04-23 09:32:14 +01:00
Paul Duffin 4994d26bfa Generalize the platformBootclasspathDepsMutator
Adds a BootclasspathDepsMutator that is currently only implemented by
the platform_bootclasspath but which can be implemented by
bootclasspath_fragment too.

Bug: 177892522
Test: m nothing
Change-Id: Ibe35854281004d6e40bf1f797144fb582e8c08b9
2021-04-23 09:32:14 +01:00
Lukacs T. Berki f8645b93b4 Update error messages.
For libm and libseccomp_policy in particular.

Test: Presubmits.
Change-Id: I778a466b7736e25aa4486335976847e8c5cf645f
2021-04-23 09:07:28 +02:00
Treehugger Robot a3693772a6 Merge "Expose "full" dexpreopt.config" 2021-04-23 06:47:57 +00:00
Treehugger Robot 1f4aeefe12 Merge "Fix toJsonClassLoaderContextRec size bug" 2021-04-23 00:01:10 +00:00
Colin Cross 7c6a485f64 Merge changes from topic "remove_llndk_library1"
* changes:
  Support cc_library as LLNDK without llndk_library
  Dedup include dir paths
2021-04-22 23:33:29 +00:00
Inseob Kim aeb6bad073 Revert^3 "Add debug ramdisk variant"
836a8f3d61

Change-Id: If59529238e26a197bc33b10245b88f538f280ed0
2021-04-22 23:14:58 +00:00
Jaewoong Jung 3c87b1df11 Fix minor issues in updatability lint CLs.
Test: TreeHugger
Bug: 182349282
Change-Id: Ifae282d51b088d0562605b41a09696d75c5138f1
2021-04-22 13:40:41 -07:00
Treehugger Robot d67a057017 Merge "Write all BUILD files for queryview" 2021-04-22 20:15:23 +00:00
Liz Kammer 78c68655e1 Write all BUILD files for queryview
Some BUILD files cannot be written to support bp2build as they already
exist in the tree; however, all BUILD files should be written for
queryview as they are not intended to coexist with handwritten BUILD
files.

Test: $ bazel query --config=queryview
  "somepath(//system/linkerconfig:linkerconfig--android_arm64_armv8-a ,
  //bionic/libc:libc_openbsd--android_arm64_armv8-a_static)"
Test: build/bazel/ci/bp2build.sh
Fixes: 186132826
Change-Id: I2cb26b7482e7eb5523cee33452be3753ad37e1b0
2021-04-22 14:40:17 -04:00
Rupert Shuttleworth be1c47b216 Merge "Add libc_openbsd to mixed builds deny list." 2021-04-22 17:46:33 +00:00
Rupert Shuttleworth 5baca302df Add libc_openbsd to mixed builds deny list.
Test: USE_BAZEL_ANALYSIS=1 m linkerconfig
Change-Id: I59386d7d70a9a3c0cabe1b641284dfbd131d532d
2021-04-22 13:41:37 -04:00
Treehugger Robot 1552c7b178 Merge "Support paths for vintf_fragments from Soong." 2021-04-22 17:03:31 +00:00
Paul Duffin 0f28a51669 Merge "bootclasspath_fragment: Add hidden API flag files to snapshot" 2021-04-22 17:02:58 +00:00
Paul Duffin 6e0a62b773 Merge "bootclasspath_fragment: Add contents to snapshot" 2021-04-22 17:01:24 +00:00
Paul Duffin c69bfdd53b Merge "Workaround build failure in coverage build" 2021-04-22 16:54:12 +00:00
Florian Mayer 4d48aa5255 Merge "Revert^2 "Add debug ramdisk variant"" 2021-04-22 16:40:24 +00:00
Florian Mayer 836a8f3d61 Revert^2 "Add debug ramdisk variant"
78ea2f5eac

Change-Id: I6a6a2ee82e2807045364bab105ec03a1934b411f
2021-04-22 16:38:47 +00:00
Paul Duffin a9dd6faae5 Workaround build failure in coverage build
The jacocoagent is special as while it is depended on by prebuilts it
is not actually a prebuilt.

Bug: 177892522
Bug: 186118711
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true nothing
      Previous command fails without this change and works with it.
Change-Id: I8fba922fc40919936d74a6f95af745e37f1ca61f
2021-04-22 17:31:50 +01:00
Rupert Shuttleworth 80c2377089 Merge "Allow more cc_library_static targets to build." 2021-04-22 16:07:20 +00:00
Jaewoong Jung d6599f5573 Merge changes Ia74a2b83,I30a46c8f,Iac7c0149
* changes:
  Add lint.strict_updatability_linting
  Move Java lint tests to lint_test.go
  Forbid bypassing updatability lint checks.
2021-04-22 15:39:41 +00:00
Jaewoong Jung 6a328ff8ac Merge "Make apex.key and certificate overridable." 2021-04-22 15:37:22 +00:00
Treehugger Robot f9c6744e28 Merge "Revert "Add debug ramdisk variant"" 2021-04-22 15:28:06 +00:00
Paul Duffin 57d13c6892 Merge "Move monolithic stub flags generation to platform_bootclasspath" 2021-04-22 15:06:16 +00:00
Paul Duffin d631512659 Merge "Extract common stub flags code" 2021-04-22 15:05:54 +00:00
Paul Duffin eee990820b Merge "Allow generate_hiddenapi_lists.py to work with no custom flag files" 2021-04-22 14:05:22 +00:00
Paul Duffin 7cbdf81e95 Merge changes I67589bcc,Ibcfae390
* changes:
  Replace boot image with bootclasspath fragment in sdk package
  bootclasspath_fragment must only depend on source contents
2021-04-22 14:02:43 +00:00
Paul Duffin 74431d57c6 Move monolithic stub flags generation to platform_bootclasspath
As part of that this change:
* Moves code that will be common to platform_bootclasspath and
  bootclasspath_fragment from hiddenapi_singleton.go into
  hiddenapi_modular.go.
* Fixes the tests in hiddenapi_singleton_test.go but intentionally
  does not rename them or move them into a more appropriate place so
  as to make it easier to see the differences. A TODO has been added
  and these will be cleaned up in a follow up change.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I680e4dab2e6bdf4a655fa9f255c195175904667e
2021-04-22 14:23:28 +01:00
Paul Duffin 3e7fcc3fe7 Extract common stub flags code
The stubFlagsRule does three separate tasks:
1. It computes the set of modules that provide the stubs.
2. It scans all the modules to find the stub modules and retrieves the
   paths to their dex files.
3. It constructs the ninja rule.

Of those three tasks, 1 and 3 will be same for the
platform_bootclasspath. Instead of searching all the modules for the
ones that provide the stubs it will simply add dependencies onto the
stub modules and retrieve the dex file paths from them.

This change extracts tasks 1 and 3 into separate methods for reuse. It
also parameterizes the generation of the ninja rule.

Bug: 179354495
Test: verified that the monolithic out/soong/hiddenapi/... files are
      unchanged by this change
Change-Id: I893845dbddc4b001dfd44d0e0b1c8a31b7f3f89f
2021-04-22 14:23:08 +01:00