Commit Graph

46175 Commits

Author SHA1 Message Date
Anton Hansson
6fcddda43c Merge "Update reference to merged services txt" 2021-10-11 15:57:02 +00:00
Jiakai Zhang
22450f25da Extract the logic of setting Uncompress_dex to a common place.
Bug: 194150908
Test: m nothing
Change-Id: Ia33965067586cfd48183e6d17f5d17626eef3c5a
2021-10-11 03:05:20 +00:00
Colin Cross
99c3ed94b8 Allow defaults in java_genrule modules
Call InitDefaultableModule in java_genrule factories to allow
the defaults property to be used.

Bug: 202547639
Test: m checkbuild
Change-Id: I3a5960304af3e9babb30d036d63016087000d773
2021-10-08 17:52:32 -07:00
Liz Kammer
bb88d20495 Merge "bp2build; Update handling of linker flags" am: 2649c7913a am: e6450855c6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1846573

Change-Id: I1d11569fd28ad931cca400051d21a2f4fd825c0e
2021-10-08 20:39:32 +00:00
Liz Kammer
e6450855c6 Merge "bp2build; Update handling of linker flags" am: 2649c7913a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1846573

Change-Id: I9b462049bd56772ef83c9e2561f3ca8f3193baef
2021-10-08 20:26:13 +00:00
Liz Kammer
2649c7913a Merge "bp2build; Update handling of linker flags" 2021-10-08 20:09:32 +00:00
Trevor Radcliffe
180beb174a Merge "Add support for USES_LIBRARIES to androidmk" am: c170e39a6b am: e0b5c20025
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1846993

Change-Id: I43c3036f6c24f220267d699d381b7633a5478e4a
2021-10-08 19:49:12 +00:00
Trevor Radcliffe
e0b5c20025 Merge "Add support for USES_LIBRARIES to androidmk" am: c170e39a6b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1846993

Change-Id: I1d8ca98660e397b4ca26082a9835e1bf5ad3fcee
2021-10-08 19:29:10 +00:00
Trevor Radcliffe
c170e39a6b Merge "Add support for USES_LIBRARIES to androidmk" 2021-10-08 19:12:21 +00:00
Liz Kammer
fc1726a6f4 Merge "Restrict mixed build cquery to deps of depth 2." am: 8cdd6f007d am: 1f93d920c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1849693

Change-Id: I3c1bdc442c69f6cf70949fcfc709d0c63ef0a788
2021-10-08 17:41:05 +00:00
Liz Kammer
1f93d920c2 Merge "Restrict mixed build cquery to deps of depth 2." am: 8cdd6f007d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1849693

Change-Id: I55f2bd60b00ec40d9bb4564c20de147b44466a21
2021-10-08 17:23:50 +00:00
Liz Kammer
8cdd6f007d Merge "Restrict mixed build cquery to deps of depth 2." 2021-10-08 17:04:02 +00:00
Jingwen Chen
ffa51d929e Add bp2build support for cpp_std. am: 97b8531492 am: aff7f12f5a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1850354

Change-Id: I958618bd81eeae0fae40999ad9fa60bab429e431
2021-10-08 16:44:46 +00:00
Jingwen Chen
aff7f12f5a Add bp2build support for cpp_std. am: 97b8531492
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1850354

Change-Id: I159b9e957075b595318d22423f2d6f6e520a3d03
2021-10-08 16:27:20 +00:00
Anton Hansson
f2dffd9c04 Update reference to merged services txt
The module is changing name. Update the reference.

Bug: 169103987
Test: m
Change-Id: I1e3f05b6d9c0262adcde6881ea79df9338bb363a
2021-10-08 16:15:10 +01:00
Jingwen Chen
97b8531492 Add bp2build support for cpp_std.
This converts cpp_std and gnu_extensions into a -std copt, if cpp_std is
specified or gnu_extensions is false if cpp_std is not specified.

I chose to go with this copts approach because the tradeoff is a much
simpler setting than adding a new attr(s) everywhere that uses features
to set the flag.

This approach limits the number of user-configurable knobs (since users
would then be able to set std in _both_ copts and the new attr). But it
does rely on the user copt overriding the toolchain's default gnu++17
version, which can mean a `-std` flag showing up twice in the action.

Fixes: b/202462232
Test: b build //system/libziparchive:libziparchive
Change-Id: I81dad029059461739b91f318d662e089edb46b84
2021-10-08 11:16:20 +00:00
Xin Li
1ba563eb3c [automerger skipped] Merge "Merge Android 12" am: 800112b97f -s ours am: 8e22b59b21 -s ours
am skip reason: Merged-In Ia86b363c2556ad4999f124cbb9bec21cf0ad58ff with SHA-1 b5baa65c8e is already in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1847393

Change-Id: I42a4a5f0c452d9e1490a7ee68663daa9b5774cec
2021-10-08 01:39:06 +00:00
Xin Li
8e22b59b21 [automerger skipped] Merge "Merge Android 12" am: 800112b97f -s ours
am skip reason: Merged-In Ia86b363c2556ad4999f124cbb9bec21cf0ad58ff with SHA-1 b5baa65c8e is already in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1847393

Change-Id: I70e5da09f84bee2af473a72e316f8be037f1f3e8
2021-10-08 01:19:41 +00:00
Xin Li
800112b97f Merge "Merge Android 12" 2021-10-07 23:50:21 +00:00
Jingwen Chen
d68ad80f07 Add support for nocrt by translating it to link_crt in bp2build. am: 6ada589f6e am: 6de8f75712
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830053

Change-Id: I4f73adf4c9077f936c519d30c0a960935e200b45
2021-10-07 20:11:00 +00:00
Jingwen Chen
ab55d27fc9 Stop relying on target.kind in mixed builds. am: 8f22274297 am: ad5acd94de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1849359

Change-Id: Ieaa9dee926d27e1133c725dabc6fdc451b389cc9
2021-10-07 20:10:57 +00:00
Liz Kammer
0eae52e0de bp2build; Update handling of linker flags
Test: build/bazel/ci/bp2build.sh
Bug: 197920036
Change-Id: I6e3100574fa0e40bcd8cf0e6af0efd3310aa41bf
2021-10-07 16:07:40 -04:00
Jingwen Chen
6de8f75712 Add support for nocrt by translating it to link_crt in bp2build. am: 6ada589f6e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830053

Change-Id: I2fbe236b2a81eb5f223ab566369b8dcfa7b04bca
2021-10-07 19:49:37 +00:00
Jingwen Chen
ad5acd94de Stop relying on target.kind in mixed builds. am: 8f22274297
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1849359

Change-Id: Iabf3aaea4cec22e1bc46dc8677bed5e6a57e0a20
2021-10-07 19:49:33 +00:00
Jingwen Chen
6ada589f6e Add support for nocrt by translating it to link_crt in bp2build.
If nocrt is true, then the compilation for cc_shared_library,
cc_binary (shared or static binaries) will _not_ link against their
respective crtbegin and crtend libraries.

nocrt is true only for the Bionic libraries themselves. For everything
else that links against the Bionic runtime, crtbegin and crtend
libraries are used. This makes the "nocrt: false" case the majority.
Hence, if nocrt is explicitly false, we omit the generating attribute in
bp2build.

If nocrt is explicitly true (link_crt is false), the Starlark macro will
disable the link_crt cc_toolchain feature.

Test: new tests
Test: CI
Fixes: 187928070
Fixes: 197946668
Change-Id: I8947789930e599dc802d8eae440859257d044475
2021-10-07 14:04:39 +00:00
Jingwen Chen
8f22274297 Stop relying on target.kind in mixed builds.
target.kind was a field that existed for only a few months, and have
been removed from Bazel. This is needed to update to a newer Bazel version.

Also, this reverts filegroups to be queried for a specific arch again,
but leaving file targets in the common arch (which is correct, anyway).

Fixes: b/199363072
Test: mixed_libc
Test: presubmits
Change-Id: I3b8e5c43a39516d977d327a44a75750b2f251be3
2021-10-07 14:04:38 +00:00
Ulyana Trafimovich
a1c9d20dcc Merge "Defer dexpreopt failure with missing implementation jar" am: 9d373d8cb0 am: 4f96d844a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1849413

Change-Id: I013d245ae54ceb78138bd41e8a121681d12be186
2021-10-07 12:06:58 +00:00
Ulyana Trafimovich
4f96d844a3 Merge "Defer dexpreopt failure with missing implementation jar" am: 9d373d8cb0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1849413

Change-Id: Iee2b931d37923fe823905e16a144dd8c5c9de862
2021-10-07 11:54:14 +00:00
Ulyana Trafimovich
9d373d8cb0 Merge "Defer dexpreopt failure with missing implementation jar" 2021-10-07 11:39:59 +00:00
Pedro Loureiro
ae4d32592a Merge "Add module-lib to droidstubs' supported sdk types" am: 2937eb5bb4 am: bba5a387d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844312

Change-Id: Iea9e9390db3539d9ec71abf598bfdece5f64c3e8
2021-10-07 10:45:07 +00:00
Pedro Loureiro
bba5a387d6 Merge "Add module-lib to droidstubs' supported sdk types" am: 2937eb5bb4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844312

Change-Id: I3a23a868ff9b476bc3c60f01ad756d897829ff3b
2021-10-07 10:29:31 +00:00
Pedro Loureiro
2937eb5bb4 Merge "Add module-lib to droidstubs' supported sdk types" 2021-10-07 10:17:03 +00:00
Paul Duffin
77a80fa397 Defer dexpreopt failure with missing implementation jar
Previously, if an implementation jar (Host) was not available to the
build it would panic when trying to generate the JSON representation of
the CLC. That prevents builds with missing implementation jars from
working even if those jars are never actually built.

This change defers the build failure until it is actually built.

Test: TARGET_PRODUCT=armv8 TARGET_BUILD_VARIANT=eng ./art/test/testrunner/run_build_test_target.py -j80 art-no-prebuild
      - run above in master-art before and after this change.
Bug: 202366925
Change-Id: I60a78a8bf6c13b83a9dceb5c43019a9e21f0b637
2021-10-07 09:52:42 +01:00
Treehugger Robot
320c01e78f Merge "Include proc macro crates in rust-project.json" am: 688cea69f4 am: d48d7bd682
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1846797

Change-Id: I5f8a3c927914f70bd7bc0e142af5bfe3e78b723a
2021-10-07 04:50:14 +00:00
Treehugger Robot
d48d7bd682 Merge "Include proc macro crates in rust-project.json" am: 688cea69f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1846797

Change-Id: I2f861ec8cc5231cf9807ffd52c571039ff709302
2021-10-07 04:29:36 +00:00
Treehugger Robot
688cea69f4 Merge "Include proc macro crates in rust-project.json" 2021-10-07 04:13:07 +00:00
Xin Li
08615f7aab Merge Android 12
Bug: 202323961
Merged-In: Ia86b363c2556ad4999f124cbb9bec21cf0ad58ff
Change-Id: Ib58c27d67387c331b2adc390906f4c846bb8bacb
2021-10-06 22:51:44 +00:00
Liz Kammer
c19d5cdcff Restrict mixed build cquery to deps of depth 2.
This will be the list of targets directly being requested + additional
targets necessary for mixed_root. This reduces the size of the cquery
file by ~300Kb. Additionally, it removes unnecessary targets, making it
ever so slightly easier to find what one is looking for in cquery.out
for debugging purposes.

Test: build/bazel/ci/mixed_droid.sh
Change-Id: I6d0e337c9ab7c13388459dee16415be0ab3c0506
2021-10-06 18:16:58 -04:00
Trevor Radcliffe
31b48a72d0 Add support for USES_LIBRARIES to androidmk
And OPTIONAL_USES_LIBRARIES. Also includes lint fix.

Fixes: 202163928
Test: Ran tool against development/apps/Development/Android.mk
Test: Added integration test cases
Change-Id: I9c8130b19f05df938f01957852384c0532e73433
2021-10-06 20:28:01 +00:00
Seth Moore
af96f99d83 Include proc macro crates in rust-project.json
These crates were skipped before, leaving dependencies missing in
rust-project.json. Include them and mark them as `"is_proc_macro": true`
so that rust-analyzer can process them.

Fixes: 202290038
Test: SOONG_GEN_RUST_PROJECT=1 m nothing
Change-Id: Ia80e6f5e2f56a76608ba057075600e6b4424281b
2021-10-06 19:39:06 +00:00
Yu Liu
fa9d735365 Merge "Store build targets in the soong metrics." am: c7ece788de am: b5baa65c8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844469

Change-Id: Ibab8761041714253e4df602d8b0e54ba816015e3
2021-10-06 18:24:09 +00:00
Yu Liu
b5baa65c8e Merge "Store build targets in the soong metrics." am: c7ece788de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844469

Change-Id: Ia86b363c2556ad4999f124cbb9bec21cf0ad58ff
2021-10-06 18:09:23 +00:00
Yu Liu
c7ece788de Merge "Store build targets in the soong metrics." 2021-10-06 17:53:32 +00:00
Pirama Arumuga Nainar
811a1ae270 [get_clang_version] Make the version regex permissive
For instance, this will match `clang-dev` when using a local build of
llvm-toolchain.

Test: run script
Change-Id: I3f2a0a6adc360f0a299def79535ce139353aece2
2021-10-06 09:44:15 -07:00
Sasha Smundak
5f463be4a9 Fix wildcard ('%') handling in the filter pattern.
Fixes: 200094780
Test: internal
Change-Id: I5f6a46679cdfa965ad98b9c0c22ef396a13a0bf6
2021-10-06 09:38:22 -07:00
Liz Kammer
18802aea60 Merge "Handle arch-variant in prebuilt_etc" am: ba26bdc316 am: 02aaca663d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844460

Change-Id: Ie0ea862fc48d98155d98ac88a5194e9ccb2fda94
2021-10-06 16:04:20 +00:00
Liz Kammer
02aaca663d Merge "Handle arch-variant in prebuilt_etc" am: ba26bdc316
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844460

Change-Id: I1e842ab2cc34548f498fd083e07ddeecd18a5da1
2021-10-06 15:49:20 +00:00
Liz Kammer
ba26bdc316 Merge "Handle arch-variant in prebuilt_etc" 2021-10-06 15:36:57 +00:00
Paul Duffin
ea16a1f94f Merge "Allow implementation details to be excluded from signature patterns file" am: 6546573ec9 am: dc3951c407
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788094

Change-Id: I615d702edc94e408566a51600525ddd47e51b195
2021-10-06 12:45:11 +00:00
Paul Duffin
dc3951c407 Merge "Allow implementation details to be excluded from signature patterns file" am: 6546573ec9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1788094

Change-Id: I28f0ddcfe3746a8bf37471f9f1c9b9771fab690a
2021-10-06 12:35:12 +00:00