Commit graph

45470 commits

Author SHA1 Message Date
Guang Zhu
5c97bc698f Revert "update build rules to use /data/local/tests/unrestricted"
Revert submission 1826231-native-test-path

Reason for revert: b/199996863

Bug: 199996863

Reverted Changes:
Ic106011a7:update build rules to use /data/local/tests/unrest...
Id727355ec:update build rules to use /data/local/tests/unrest...

Change-Id: Id53334a6169e58964ef86e78de738f29b32dd491
2021-09-22 04:20:22 +00:00
Treehugger Robot
364f3baa71 Merge "Remove arch-variant from some python properties" am: 0bdaa188e1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1831852

Change-Id: I4cfc92f22cebbecead5a0a4866e86e187bf494fb
2021-09-22 02:01:16 +00:00
Treehugger Robot
af59d812d3 [automerger skipped] Merge "[IRadioConfig] Add to VNDK variant list" am: 0f7dddcc9c -s ours
am skip reason: Merged-In Ibacc996f42c4bfa12b135247a2cebe1e28bbff09 with SHA-1 af68148d19 is already in history

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

Change-Id: Ida100b11896d6dcf3db9f804141e0eca6717a007
2021-09-22 02:01:06 +00:00
Treehugger Robot
0bdaa188e1 Merge "Remove arch-variant from some python properties" 2021-09-22 01:51:51 +00:00
Treehugger Robot
0f7dddcc9c Merge "[IRadioConfig] Add to VNDK variant list" 2021-09-22 01:49:23 +00:00
Romain Jobredeaux
89cb22416d Add a flag-protected (-pom2build) feature for pom2bp to produce Bazel BUILD files.
Note that this is an initial, rather crude attempt at this,
that unblocks generating BUILD files needed to build AOSP android apps.
In particular, note that
- Jetifier step currently ignored
- Visibility set to public for all output targets
- All dependencies are gathered in 'deps', though they are split under various categories in bp files
- Host, host-only notions are ignored for now

Test: Copy first 2 lines of, e.g. prebuilts/sdk/current/support/Android.bp to a BUILD.bazel file and run pom2bp -pom2build -regen BUILD.bazel
Bug: 198433754
Change-Id: I5efa93517e6c319fd828da5b16ba7efd2d90bca8
2021-09-21 20:36:07 +00:00
Spandan Das
9c30c0a1a6 Merge "Add Property.Type to bpdocs template" am: 235a9443b7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1825054

Change-Id: I63c818a85c8e5f1b7b1b519ee5476054ecf9680a
2021-09-21 20:21:53 +00:00
Spandan Das
235a9443b7 Merge "Add Property.Type to bpdocs template" 2021-09-21 20:00:35 +00:00
Colin Cross
3c0fe0edc0 Add environment variable to force keeping ANSI codes
If SOONG_UI_ANSI_OUTPUT is set to a true value force the simple status
output to keep ANSI codes.  This will allow buildbots to collect logs
with ANSI codes in them.  Smart status output is not affected as it
always keeps ANSI codes.

Bug: 147310922
Test: manual
Change-Id: I0b78ceebb65125b8e8dafb4787816fb679d3eb3e
2021-09-21 12:53:30 -07:00
Colin Cross
72a28a6a13 Disable table mode in smart status if window size is not available
Make smart status output automatically disable table mode when the
window size is not available.

Bug: 147310922
Test: status_test.go
Change-Id: Ic57e1efd742e869bb84b6a86b3014335f5a65d39
2021-09-21 12:36:22 -07:00
TreeHugger Robot
a91b77734b Merge "[IRadioConfig] Add to VNDK variant list" into stage-aosp-master 2021-09-21 17:23:20 +00:00
Christopher Parsons
5a5ceb553e Merge "bp2build: reference static variants directly" am: ce0944fc96
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1832014

Change-Id: I6314b59c55d7dcc65444d44f631d39ff566c49d9
2021-09-21 15:32:04 +00:00
Christopher Parsons
ce0944fc96 Merge "bp2build: reference static variants directly" 2021-09-21 15:13:43 +00:00
Ivan Lozano
ba2226164c rust: Add require_root and vendor install base
Adds the require_root property to rust_test modules so that tests can
run as root. Also adds an install base to allow vendor tests to install
to a different path, otherwise installs to 'unrestricted' like cc_test.

Bug: 200602232
Test: test with require_root: true runs as root
Test: test installed to new base directory
Change-Id: Ifa716871ff87471f0c0caff7af558d47db85ccd1
2021-09-21 11:01:11 -04:00
Anton Hansson
825a2659e6 Merge "Add back the api_srcs argument" am: 8b1add6dd4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830032

Change-Id: I1dd0b451e8d195e7f382b649aedadebb804a429f
2021-09-21 14:57:36 +00:00
Anton Hansson
8b1add6dd4 Merge "Add back the api_srcs argument" 2021-09-21 14:45:02 +00:00
Ulya Trafimovich
29e95d94bf Move copy rule for system server jars from dexpreopt_gen to makefiles.
This is necessary in order to expose the copy rule to Ninja. Otherwise
Ninja has a build rule that depends on the copied jar (namely, dexpreopt
commands for all subsequent system server jars that have the current one
in class loader context), but no rule that creates it, so Ninja fails
with a "no rule to make ..." error.

The change only affects system server ed in Android.mk

Previously the problem existed, but was hidden by the fact that the only
system server jar defined in Android.mk was the last one on the list, so
no other jar depended on it. Now that updatable apex jars are also
dexpreopted (https://r.android.com/1828115) the problem was uncovered.

Bug: 200297762
Test: lunch bertha_x86_64-userdebug && m
Change-Id: Idbf2eacdf7ae89847aa9d755ef688eda3720ce89
2021-09-21 14:08:32 +01:00
Dan Willemsen
8e6b37119a Add java_binary_host support for Windows
So that the Windows build-tools package doesn't need to manually copy
the wrapper. Also fixes enabling java modules for Windows by hiding them
from Make, as the Make code does not handle Windows java modules
properly.

Bug: 187222815
Change-Id: I13534b38b9a9f4b5ff0630e028c3b4f88a6b34f8
2021-09-20 23:29:48 -07:00
Serik Beketayev
af68148d19 [IRadioConfig] Add to VNDK variant list
Test: build
Bug: 198331805
Change-Id: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
Merged-In: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
2021-09-21 04:52:44 +00:00
Treehugger Robot
c41aa75dec Merge "Add tidy_disabled_srcs property." am: 1b15345ac9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1831865

Change-Id: I430b1fcd21e417e1ca0382228229188e1b47c718
2021-09-21 03:58:15 +00:00
Treehugger Robot
1b15345ac9 Merge "Add tidy_disabled_srcs property." 2021-09-21 03:46:12 +00:00
Chih-Hung Hsieh
769a51cc6a Add tidy_disabled_srcs property.
Used as a supplement to C/C++ srcs to disable
clang-tidy for selected srcs, when a library
contains many files in srcs and only some of them
are too large to compile with clang-tidy.

Test: WITH_TIDY=1 TIDY_TIMEOUT=90 make tidy-soong
Bug: 198098397
Change-Id: Ib32eb0e46ddbc717999797717bfd8c57e182ee88
2021-09-20 18:17:59 -07:00
Jingwen Chen
f02ef5707a Merge "Fix bp2build-progress generating an empty converted_modules list, and duplicate module names." am: b3c3d9a2d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1831633

Change-Id: Ib004dcae1f80d6aa98f53c5be24d5c8790bc7b4f
2021-09-21 00:37:48 +00:00
Serik Beketayev
319c773900 [IRadioConfig] Add to VNDK variant list
Test: build
Bug: 198331805
Change-Id: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
Merged-In: Ibacc996f42c4bfa12b135247a2cebe1e28bbff09
2021-09-20 17:32:30 -07:00
Jingwen Chen
b3c3d9a2d5 Merge "Fix bp2build-progress generating an empty converted_modules list, and duplicate module names." 2021-09-21 00:24:36 +00:00
Aurimas Liutikas
2fa15f76a3 Merge "Enable compose kotlinc plugin when depending on the compose runtime" am: e992a52d0e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830673

Change-Id: I8becfa1da6f0b03d0fd839b5e60b6a5f9c662821
2021-09-20 23:53:09 +00:00
Aurimas Liutikas
e992a52d0e Merge "Enable compose kotlinc plugin when depending on the compose runtime" 2021-09-20 23:28:33 +00:00
Martin Stjernholm
531d8fdc2a Remove workaround for modules with missing BCP fragments, as they are
present now.

#codehealth

Test: presubmits
Bug: 192868581
Change-Id: I8370525849ea589af0bf4f8d3fd081f3004516a1
2021-09-20 23:47:24 +01:00
Colin Cross
0abff32886 Merge "Add support for d8 --main-dex-rules" am: 80bb3164b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1829133

Change-Id: Ib105939a0e11dae97b40cf003c75808ee1d879ec
2021-09-20 20:37:51 +00:00
Colin Cross
80bb3164b9 Merge "Add support for d8 --main-dex-rules" 2021-09-20 20:22:44 +00:00
Treehugger Robot
728105d7b6 Merge "Increase timeouts in Test_runWithTimeout" am: e646717cdf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830674

Change-Id: Ia50a5b2c449d32feb150133d536a956d9e713033
2021-09-20 20:14:37 +00:00
Treehugger Robot
e706cc8c42 Merge "Fix statusfile used in dexpreopt" am: 77cdde7d91
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1831862

Change-Id: I98ac9c34fa01e249a8d01ab5412c5832f4dbe389
2021-09-20 20:14:05 +00:00
Treehugger Robot
e646717cdf Merge "Increase timeouts in Test_runWithTimeout" 2021-09-20 19:53:57 +00:00
Treehugger Robot
77cdde7d91 Merge "Fix statusfile used in dexpreopt" 2021-09-20 19:53:38 +00:00
Chris Parsons
953b35623a bp2build: reference static variants directly
Previously, when referencing a cc_library as a static_lib from a
converted module, the corresponding target would depend on the "root
target" of that cc_library. This resulted in a superfluous dependency on
the shared target of the cc_library dependency. This superfluous
dependency could sometimes result in cycles.

This change ensures the static target name is directly specified in such
cases.

Test: mixed_libc.sh CI
Test: USE_BAZEL_ANALYSIS=1 m fmtlib
Change-Id: I36ee9f0a9017b1e9d73df9e3174669107f0afd4f
2021-09-20 15:15:29 -04:00
Spandan Das
3d5cd4d109 Fix statusfile used in dexpreopt
https://android-review.googlesource.com/c/platform/build/soong/+/1820496/1/scripts/manifest_check.py#361
caused a regression wrt to statusfile creation. Specifically it inverted
the logic used to create the status file. This file is used in
dexpreopt, thereby affecting all odex files

Test: In internal git, m <an_odex_file>. File size is restored to
pre-regression value
Bug: 199921980
Bug: 200329228

Change-Id: If1e61ac8e2b95455dacc6e7b9431c8f6e1f339b3
2021-09-20 18:24:56 +00:00
Martin Stjernholm
e576120738 Merge "Show less ambiguous paths in the error when it fails to match the given output file." am: bacf6a1a6a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1830039

Change-Id: I247387b90d0508e22f24adb941b005b5a5df1b7e
2021-09-20 18:10:48 +00:00
Martin Stjernholm
bacf6a1a6a Merge "Show less ambiguous paths in the error when it fails to match the given output file." 2021-09-20 17:44:01 +00:00
Alexander Smundak
02aa596f47 Merge "Share version settings with product config makefile." am: dd6149122c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1824773

Change-Id: I984f60ec4b39375db128ebb8631a3ee940337738
2021-09-20 17:13:56 +00:00
Liz Kammer
59c0eaedca Remove arch-variant from some python properties
Version and package should not vary based on architecture.

Test: m nothing
Change-Id: Id9cb655d9c25caee3b6068a261b3db36e1654467
2021-09-20 12:56:17 -04:00
Alexander Smundak
dd6149122c Merge "Share version settings with product config makefile." 2021-09-20 16:56:10 +00:00
Colin Cross
a1ff7c6926 Enable compose kotlinc plugin when depending on the compose runtime
When a module depends on the compose runtime add a -Xplugin argument
to the kotlinc flags that enables the compose compiler plugin.

Bug: 196351110
Test: TestKotlinCompose
Change-Id: I423a3c4d12df42804a24b672a40a165bc8dd165f
2021-09-20 09:12:42 -07:00
Treehugger Robot
45dd37c6e3 Merge "Add test to TestJavaStableSdkVersion for legacy core platform" am: 3769a27c5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655611

Change-Id: I752f24a2e6b9763019866402a8af6adb3e96ee2a
2021-09-20 14:20:18 +00:00
Treehugger Robot
3769a27c5e Merge "Add test to TestJavaStableSdkVersion for legacy core platform" 2021-09-20 14:04:35 +00:00
Martin Stjernholm
804f4d1117 Merge changes I464e6ebd,Iaf7655e4 am: 3536614edd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826777

Change-Id: I7e03d04afbc809544d964548caa1646bc36aa353
2021-09-20 13:17:53 +00:00
Martin Stjernholm
a4aaa47a00 Show less ambiguous paths in the error when it fails to match the given
output file.

PathRelativeToTop should give an unambiguous path that can be used for
matching, as opposed to Rel().

Test: `m nothing` with a test with an invalid Output() call
Change-Id: I6d501df6acb0a1700f1480bd4250320f69278c39
2021-09-20 14:17:09 +01:00
Martin Stjernholm
3536614edd Merge changes I464e6ebd,Iaf7655e4
* changes:
  Make it possible to pass an error message with an invalid optional path.
  Replace OptionalPath.valid flag by checking the path itself.
2021-09-20 13:03:20 +00:00
Martin Stjernholm
c32dd1c0ab Make it possible to pass an error message with an invalid optional path.
This is useful to delay errors until the paths need to be used.

Test: m nothing
Change-Id: I464e6ebd04b06c5e17617e8ee4e65a3320f1168f
2021-09-20 14:02:11 +01:00
Martin Stjernholm
2fee27f3c9 Replace OptionalPath.valid flag by checking the path itself.
Test: m nothing
Change-Id: Iaf7655e4676d2beeb7c7ac3bcba11a7dad4a01a3
2021-09-20 14:02:11 +01:00
Jingwen Chen
310bc8f5f4 bp2build: Refactor metrics collection to use exported functions.
This CL splits the metric count into handcrafted, generated, and
unconverted modules.

Test: CI
Test: m bp2build, the metrics reported are identical.
Change-Id: I80e3d2fd2989222bd40b6433b4a1924b4943d0ba
2021-09-20 11:54:00 +00:00