Commit Graph

34025 Commits

Author SHA1 Message Date
Treehugger Robot 3310e2d9ea Merge "APEX uses the latest version of the stub" am: ce80f18749
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I294103da51c7a9ad11a81e3eadb1a0e2e98920e8
2021-03-02 02:03:34 +00:00
Treehugger Robot ce80f18749 Merge "APEX uses the latest version of the stub" 2021-03-02 01:02:18 +00:00
Paul Duffin 551d57c064 Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar" am: c572b5bf62
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609479

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I09d8327960fa22bf6b61b59f790dc0fd50154a17
2021-03-01 19:31:32 +00:00
Paul Duffin 764a15f4e5 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" am: 69804ac388
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609478

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9c06fde9d8d3f34ec60bea58bfa39f5dc98a66bd
2021-03-01 19:31:06 +00:00
Paul Duffin b1426419ec Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" am: 0a8d5248ef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1609477

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia9e4f4591c7fc3ee8ab303635a71ac84b1a99327
2021-03-01 19:30:32 +00:00
Paul Duffin c572b5bf62 Merge "Avoid hiddenapi ignoring prebuilt with missing dex implementation jar" 2021-03-01 17:04:53 +00:00
Paul Duffin 69804ac388 Merge "Allow java_sdk_library_import to contribute to hiddenapi processing" 2021-03-01 17:04:39 +00:00
Paul Duffin 0a8d5248ef Merge "Retrieve dex implementation jars from apex for java_sdk_library_import" 2021-03-01 17:04:27 +00:00
Jingwen Chen 1c65191027 Merge "bp2build: add configurable attribute (select) support." am: 37bd24a1db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603778

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib6ebd3defe385a6b8f3bfcc9eda56b3bd7deb03e
2021-03-01 14:16:57 +00:00
Jingwen Chen 37bd24a1db Merge "bp2build: add configurable attribute (select) support." 2021-03-01 13:43:55 +00:00
Paul Duffin ec0fe1775b Avoid hiddenapi ignoring prebuilt with missing dex implementation jar
Previously, when a prebuilt was preferred but did not provide a
suitable boot dex jar both the source and the prebuilt were silently
ignored which meant that the "hiddenapi list" command was not given a
complete set of boot dex jars. That could either lead to incorrect
hiddenapi flags being set or the "hiddenapi list" command failing if it
could not find a class. Debugging the cause of either of those cases
can be very time consuming so this change fails early and makes the
cause very explicit.

Bug: 181267622
Test: m nothing
Change-Id: I6763ddb9ba90ed2e501d0cf7984f6655237e905d
2021-03-01 12:58:28 +00:00
Paul Duffin 3785673f9b Allow java_sdk_library_import to contribute to hiddenapi processing
Invokes hiddenAPIExtractInformation() on the java_sdk_library_import's
dex implementation jar provided by the deapexer (on behalf of
prebuilt_apex) so that hiddenAPI can extract the information it needs,
if anything, from the dex file.

The dex file provided by deapexer has already had the hiddenapi
information encoded into it so it does not need to do that again.

Usually, it would require a classes implementation jar as well in
order to extract information from UnsupportedAppUsage annotations but
that is not available for a java_sdk_library_import. Fortunately, the
modules that are currently affected by this do not contain any such
annotations. This just uses a public api stubs jar instead.

Bug: 181267622
Test: m nothing
Change-Id: I96275e46f8b7fecba88075319e9f2da5ae315c03
2021-03-01 12:58:28 +00:00
Paul Duffin 3985351df6 Retrieve dex implementation jars from apex for java_sdk_library_import
Bug: 181267622
Test: m nothing
Change-Id: Idd6af2482f48bd3a05db88b8a06dbbbdee01ef78
2021-03-01 12:58:28 +00:00
Jiyong Park 55549df051 APEX uses the latest version of the stub
Previously when an APEX whose min_sdk_version is set is linked to an
external library providing multiple versions of stubs, the
maximum version that is less than or equal to the min_sdk_version was
chosen. For example, if the versions of a library stubs are 28, 29, 30,
and 31, then APEX with min_sdk_version: 29 linked to the version 29 of
the stub.

This was to ensure that the APEX doesn't use any new APIs whose
existence can't be guaranteed.

This however imposes a severe restriction that the APEX can never use
new APIs even when the APIs are actually available: i.e. when the
APEX is running on a newer platform.

With the recent work about unguarded availability, using the future APIs
became much safer. When you use an API that is newer than your
min_sdk_version, the API is automatically declared as a weak symbol
(thus no link error at runtime), while the call to API is guaranteed to
be guarded with the `__builtin_available(...)` macro.

So, there really is no reason to use the old version of the stub. We can
always use the latest version of stub safely.

Bug: N/A
Test: m
Change-Id: Iaac0d8761d8929154527dc2e861a51ae31e23d49
2021-03-01 09:12:32 +00:00
Treehugger Robot 184957859b Merge "Remove global state from sysprop libraries" am: 5e510d6271
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1611293

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1fca3c2ce55e93086372c6c69b0704fa253175a1
2021-03-01 08:45:05 +00:00
Treehugger Robot 5e510d6271 Merge "Remove global state from sysprop libraries" 2021-03-01 08:03:41 +00:00
Treehugger Robot f6316c4b1c Merge "Propagate java resources in apps with no code" am: 2ee47272f5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1610973

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9a2dc3f9b861898eb7ed91d13c1443af2a0d2569
2021-02-28 01:20:09 +00:00
Treehugger Robot 2ee47272f5 Merge "Propagate java resources in apps with no code" 2021-02-28 00:31:28 +00:00
Paul Duffin dbad3660c2 Merge "Add test fixture support" am: e8d9a33769
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1605035

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8b6df4095c1683238c002838203e85605e1a692d
2021-02-27 11:00:05 +00:00
Paul Duffin e8d9a33769 Merge "Add test fixture support" 2021-02-27 10:33:24 +00:00
Chih-hung Hsieh 7b68407ec9 Merge "Forbit extra quotes in tidy flag lists" am: 7e52be849e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1600697

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I85f11d48b9c6a026d4c767923516d74493a241d0
2021-02-27 09:11:57 +00:00
Chih-hung Hsieh 7e52be849e Merge "Forbit extra quotes in tidy flag lists" 2021-02-27 08:45:47 +00:00
Colin Cross 75ce9eccf3 Remove global state from sysprop libraries
Sysprop libraries use a global list to rewrite dependencies from
implementation libraries to public stub libraries when appropriate.
Remove the global list, and instead add a dependency from the
implementation to the public stub that forwards the JavaInfo.

Bug: 181367697
Test: sysprop_test.go
Change-Id: Ia7995feb3c079ca9bb6a403daaae3e3329fd7f6a
2021-02-26 16:28:12 -08:00
Colin Cross b014f0787e Propagate java resources in apps with no code
Use the java resources jar as the dex jar when building apps that
have no code.

Also remove maybeStrippedDexJar, the dex jar is never stripped now.

Fixes: 176305357
Test: TestAppJavaResources
Change-Id: Ic8b1165bd35d71237d307e7f5f895764e203a10d
2021-02-26 16:28:12 -08:00
Paul Duffin 358161232c Add test fixture support
Adds the test fixture support and converts a few tests to exercise the
code and show how it works.

Bug: 181070625
Test: m nothing
Change-Id: I0a2b40fff93b6041f9aa8c4ef0aba91da1bc8bf3
2021-02-26 23:01:50 +00:00
Treehugger Robot 200338e19c Merge "Make runtime_resource_overlay product specific." am: 5aa1debe6d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1608116

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I069f0301b507e82316401ff32c79db2477d81c5f
2021-02-26 18:51:59 +00:00
Treehugger Robot 5aa1debe6d Merge "Make runtime_resource_overlay product specific." 2021-02-26 17:31:27 +00:00
Jingwen Chen 5d8644990b bp2build: add configurable attribute (select) support.
This CL adds a basic framework to support configurable string_list
attributes, selecting on the Arch variant (x86, x86_64, arm, arm64).

It offers fine-grained controls to map individual configurable
properties (arch_variant) to configurable Bazel attributes, starting
with the string_list type for the copts property for cc_object.

This design is primarily motivated to have minimal boilerplate in
bp2build mutators, allowing anyone to opt-in configurable attributes,
and modify intermediate states before passing them on into the
CreateBazelTargetModule instantiator.

Fixes: 178130668

Test: go tests
Test: build/bazel/scripts/milestone-2/demo.sh

Change-Id: Id6f04d7c560312a93e193d7ca4e1b7ceb6062260
2021-02-26 05:17:54 -05:00
Thiébaud Weksteen 1ca121b029 Merge "Enable bloaty artifact for checkbuild" am: 30e3e9d21d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1605533

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bf2c94ca5c210c90a1c4e701df855213f5d2817
2021-02-26 09:30:19 +00:00
Justin Yun 1ddff5f76f Define getSnapshotNameSuffix() am: 07b9f86f0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607900

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I22c746f17079e5e8659cdcb2b447116fb354ca37
2021-02-26 09:27:45 +00:00
Thiébaud Weksteen 30e3e9d21d Merge "Enable bloaty artifact for checkbuild" 2021-02-26 07:44:59 +00:00
Justin Yun 07b9f86f0c Define getSnapshotNameSuffix()
By sharing a single function for generating snapshot name suffix,
make sure both the DepsMutator and the snapshot modules use the same
names.

Bug: 179666286
Test: m nothing
Change-Id: I9efa94f2981a6bd1b4128bf0e84ca44873ebf3b7
2021-02-26 14:00:03 +09:00
Chih-Hung Hsieh 217e09a784 Forbit extra quotes in tidy flag lists
* Start with clang-tidy flags;
  maybe other flags should be checked too.

Bug: 180862582
Test: make
Change-Id: I82f86a911733693a14fe56a35e28590b065e3ae7
2021-02-25 20:46:15 -08:00
Treehugger Robot 4f8fa43b99 Merge "Remove dependency from vendor_snapshot to each module" am: a777d960ab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607913

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I15a5244d60d1397fcaf471cabc1176eb122c7e47
2021-02-26 04:33:11 +00:00
Treehugger Robot a777d960ab Merge "Remove dependency from vendor_snapshot to each module" 2021-02-26 03:57:42 +00:00
Jaewoong Jung 3ef77e89f0 Make runtime_resource_overlay product specific.
When mk2bp'ing a runtime_resource_overlay module, make it product
specific by default so that it reflects how the current make
configuration works.

Bug: 155783598
Test: bpfix_test.go
Change-Id: Icafa8228fe65ecc5b33ad80ad721e7997fbff383
2021-02-25 18:58:16 -08:00
Treehugger Robot b6507b6ee7 Merge "rust: Disable Byte Grouping Linter" am: 8e79268947
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1608353

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4b09eb7c7a3db7b3f15cb7a8f6f07f8c785c19e1
2021-02-25 23:30:54 +00:00
Treehugger Robot 8e79268947 Merge "rust: Disable Byte Grouping Linter" 2021-02-25 22:46:02 +00:00
Jaewoong Jung cfeffdc6ec Merge "Fix the releax_check flag format verb." am: fc3bfe54c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607177

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If62452c3652dcd84713b2e34258067852b4a063a
2021-02-25 16:33:55 +00:00
Jaewoong Jung c520303826 Merge "Remove ModuleBase.prefer32." am: daffef2400
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1606486

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibbc275d061ac6385322dae7062d0847a57f3bb38
2021-02-25 16:32:03 +00:00
Ivan Lozano b6d0d9cec4 rust: Disable Byte Grouping Linter
Disable the byte grouping clippy lint by default. In some cases it makes
sense to group bytes in a protocol-specific fashion, so let's not error
on this lint.

Bug: 181171365
Test: Clippy allows this lint.
Change-Id: I2705dc7fa901b997bcb01f1256d48e85ce35065c
2021-02-25 11:24:35 -05:00
Jaewoong Jung fc3bfe54c3 Merge "Fix the releax_check flag format verb." 2021-02-25 16:00:12 +00:00
Jaewoong Jung daffef2400 Merge "Remove ModuleBase.prefer32." 2021-02-25 15:39:52 +00:00
Jingwen Chen c1858d0f50 Merge "bp2build: add support for cc_object's objs and exclude_srcs properties." am: 1251bb5775
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1600655

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia52b0cbf118d1e51c5496b7d816df13c53602129
2021-02-25 14:46:51 +00:00
Jingwen Chen 1251bb5775 Merge "bp2build: add support for cc_object's objs and exclude_srcs properties." 2021-02-25 14:09:08 +00:00
Justin Yun 4813867ec3 Remove dependency from vendor_snapshot to each module
The 'vendor_snapshot' module is required to every cc_library to check
if the dependencies need to be rewritten to the snapshot modules or
not. However, as the 'vendor_snapshot' module has dependencies to the
snapshot modules, the dependency to the 'vendor_snapshot' module
creates circular dependencies.
The dependency from the 'vendor_snapshot' to the snapshot modules is
required only to read the module names of the snapshot modules. We
may remove the dependency by setting the name of the snapshot modules
directly.

Bug: 179666286
Test: m nothing
Change-Id: I14abcb06c5c81ef7f8535103578747385c89ae0f
2021-02-25 09:31:12 +00:00
Thiébaud Weksteen 5db3d98c3e Enable bloaty artifact for checkbuild
Test: m checkbuild dist; verify DIST_DIR/binary_sizes.pb
Bug: 172339742
Change-Id: If6f3b33a5d6efade98a15ddf5827ef010d1535dd
2021-02-25 10:02:49 +01:00
Stephen Hines 4ad07ba7a3 Merge "reverses common and external Clang flags" am: f3e0d22234
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1606997

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ice6aaad9c334a5ddff365e3a2181748347ab364b
2021-02-25 07:23:18 +00:00
Stephen Hines f3e0d22234 Merge "reverses common and external Clang flags" 2021-02-25 06:31:22 +00:00
Jingwen Chen 115ba56709 Merge "queryview: add "size" to ignored prop." am: 805c74ca09
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607273

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id0354d9fe93725e35dd91ed45ff89642e2a20fe5
2021-02-25 05:31:57 +00:00