Commit graph

34152 commits

Author SHA1 Message Date
Ulya Trafimovich
861a896c96 Add provides_uses_library example to TestUsesLibrary check.
Current test behaviour is incorrect, because libraries added via
`uses_libs`/`optional_uses_libs` ignore `provides_uses_lib` property.
The added TODO entries point at the incorrect behaviour, to be fixed in
the follow-up CLs.

Bug: 132357300
Test: m nothing

Change-Id: I35bfe227797aa37aa539e872052335677c798ee5
2021-02-26 15:19:39 +00:00
Ulya Trafimovich
2eaf5c5256 Stricten TestUsesLibrary check.
- Verify argument order for manifest_fixer args verify_uses_libraries.
- Rewrite manifest_fixer test so that it reveals arguments that should
  not be there, add a TODO to remove them.

Bug: 132357300
Test: m nothing
Change-Id: I910e13b84f0464fc06b5b98395ddb45bf4120223
2021-02-26 14:53:06 +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
Julien Desprez
069b75077a Attempt to run all java_test_host that look unit tests
Currently includes some heuristic for the first round of
onboarding.

Test: presubmit
Bug: 180736967
Change-Id: I220551549ed3c1468390655cb911f3b8c0f8880d
2021-02-25 10:12:49 -08: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
Jaewoong Jung
8431282af4 Fix the releax_check flag format verb.
%b prints base 2 numbers. %t is the right one to use for booleans.

Test: TreeHugger
Change-Id: Ifbae0170ba03583182ae848bcfc6bb104f1be7e0
2021-02-24 21:09:10 -08:00
Jingwen Chen
805c74ca09 Merge "queryview: add "size" to ignored prop." 2021-02-25 05:08:56 +00:00
Jaewoong Jung
003d808a41 Remove ModuleBase.prefer32.
It became obsolte by If96cccbd82ba1311165d61c947c928c6e7cd5593 and
Iaaac16ae171c06d90d04d7cac11789d3f39b8d99

Test: TreeHugger
Change-Id: Ifc8f28663b480ef5aff93a54040339ef080072c9
2021-02-24 20:29:25 -08:00
Christopher Di Bella
c28f5d97a6 reverses common and external Clang flags
Flags for external projects are specialisations of the common flags, and
need to follow the common flags, not precede them.

Bug: 181177782
Test: None

Change-Id: I19c8c2a3539573e9b2f2d9e3e1c898fa09570663
2021-02-25 01:34:08 +00:00
Jingwen Chen
88ae408a0f queryview: add "size" to ignored prop.
Test: m queryview && bazel query //... --config=queryview
Change-Id: Ia84be6e2fc5b302b4a147f94bfa219a729b67be1
2021-02-24 19:55:50 -05:00
Paul Duffin
de8121e465 Merge "Allow pre-singleton types to be registered in RegistrationContext" am: ebbf33c42b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1605033

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib5b8d31cdbabca14ba65f4eae1d97d9e2aa4186b
2021-02-24 19:30:05 +00:00
Paul Duffin
ebbf33c42b Merge "Allow pre-singleton types to be registered in RegistrationContext" 2021-02-24 18:38:27 +00:00
Lorenzo Colitti
1fd8f115b2 Merge "Add the new NetworkStack shim libraries to APEX allowed deps." am: 9023138b5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597976

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Icaefda26de292dc9b3bd011cc13c36d0f8893e10
2021-02-24 16:39:00 +00:00
Lorenzo Colitti
9023138b5e Merge "Add the new NetworkStack shim libraries to APEX allowed deps." 2021-02-24 16:01:08 +00:00
Paul Duffin
94dad2bdb4 Merge "Generated headers may not be arch specific" am: b2773e116f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1599159

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I23f8f7102fb8bf84fceced1da26efa25c3c4e8e8
2021-02-24 10:43:09 +00:00
Paul Duffin
7c7d2fc156 Merge "Fix the snapshot handling of generated headers" am: efa0f00706
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1599158

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie5c7abea0070d3770b7d6b1a8fb24090d453f690
2021-02-24 10:41:59 +00:00
Paul Duffin
eafc16bf14 Allow pre-singleton types to be registered in RegistrationContext
Bug: 181070625
Test: m droid
Change-Id: I708b78ed0b42ec55b0442307f40531cfe1233c2b
2021-02-24 10:17:19 +00:00
Paul Duffin
b2773e116f Merge "Generated headers may not be arch specific" 2021-02-24 10:10:23 +00:00
Paul Duffin
efa0f00706 Merge "Fix the snapshot handling of generated headers" 2021-02-24 10:08:34 +00:00
Jiyong Park
1d878cac19 Merge "Add logical_partition module type" am: c1e48ac7d8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1602154

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I53eb2a49dfa54021642518e39b5c263fbf9aba75
2021-02-24 09:44:50 +00:00
Jiyong Park
c1e48ac7d8 Merge "Add logical_partition module type" 2021-02-24 09:17:28 +00:00
Christoffer Quist Adamsen
c3ae5578c9 Merge "Allow missing classes in R8 builds" am: a72571f0d1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597934

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4ef29a4dab89a95ff1c98cf784044fd3b387a20b
2021-02-24 08:14:57 +00:00
Christoffer Quist Adamsen
a72571f0d1 Merge "Allow missing classes in R8 builds" 2021-02-24 07:25:18 +00:00
Treehugger Robot
035b6e6882 Merge "Move bazel.Properties to a BazelModuleBase" am: bbfd5ab606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1591532

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I94324e03163cc36f31c6dc3d3c0d789f6b0b1fa1
2021-02-24 06:58:29 +00:00
Jingwen Chen
db12024524 bp2build: add support for cc_object's objs and exclude_srcs properties.
objs contains module references to other cc_objects that will be used
for linking later. This maps to cc_library deps.

Also support exclude_srcs, and added tests.

Test: bp2build generate, sync, bazel build //bionic/...

Change-Id: I21200ff73f24bcf5357d9df8dcb5519cde532a77
2021-02-24 01:08:57 -05:00
Treehugger Robot
bbfd5ab606 Merge "Move bazel.Properties to a BazelModuleBase" 2021-02-24 05:53:25 +00:00
Jiyong Park
b89e5e71b7 Add logical_partition module type
logical_partition builds a partition image (which is usually called
'super.img') out of one or more filesystem images.

Bug: 180921702
Test: m microdroid_super
Change-Id: I659607647e3a5bc82c82b576a049e6c6f91cbddb
2021-02-24 12:53:39 +09:00
Treehugger Robot
defa29df15 Merge "Build statsd-module-sdk-for-art" am: 7ebe464748
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1597253

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0cf61d86e010e2aba450b16abbd1abbc123f628d
2021-02-24 01:43:34 +00:00
Treehugger Robot
7e3b7a1244 Merge "android:path attribute is respected for fields in a slice of struct" am: 4dc0702ce2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1602153

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic710c3ee404b9c96e2cfe4c4bfe9b3e9b0159672
2021-02-24 01:34:38 +00:00