Commit Graph

32277 Commits

Author SHA1 Message Date
Anton Hansson
3dba945f2b Merge "Remove sdk_version: "none" restriction" am: 0a2afd183a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533344

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibd095c26ffbf3129e0bbc6a69c7a3d8994956074
2020-12-22 11:47:40 +00:00
Anton Hansson
0a2afd183a Merge "Remove sdk_version: "none" restriction" 2020-12-22 11:41:27 +00:00
Ulyana Trafimovich
99d0a65605 Merge changes I6a512209,I56437f26 am: b630c37d61
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533342

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia6862d1130f743ea5c5bd4c8ad8fbbba1b4fa4b2
2020-12-22 10:53:13 +00:00
Ulyana Trafimovich
b630c37d61 Merge changes I6a512209,I56437f26
* changes:
  Unify addition of class loader subcontext from dependencies.
  Move ClassLoaderContexts() method to UsesLibraryDependency interface.
2020-12-22 10:14:41 +00:00
Ulya Trafimovich
88bb6f6342 Unify addition of class loader subcontext from dependencies.
Previously CLC construction was scattered across different module types
and dependency tags. This CL moves all logic to one function, which
handles all special cases. This will allow to simplify CLC API and
reduce the number of different ways in which CLC is constructed.

Previously some of the cases failed early (at the time when a library is
added to CLC) if the build/install paths were unknown. Other cases did
not fail early, but were validated later before CLC was used. Late
failures are necessary because some of the libraries with unknown paths
still have to be processed by manifest_fixer (which doesn't need library
paths), but they do not use dexpreopt (which needs library paths). This
CL removes the early failures (all paths are still validated later).

The CLC tests do not fail because they use a private method that toggles
the "strict" flag (that enforces early/late failure mode) manually in
the method call.

The CL also makes a functional change in the way CLC is constructed for
component libraries that have an OptionalImplicitSdkLibrary(), or
libraries that are disguised as SDK libraries via `provides_uses_lib`.
Previously such a component/disguised library X was added to its own CLC
as a sibling element of X's own <uses-library> dependencies, which
created incorrect CLC structure. Now this is handled by addCLCFromDep,
when X is processed as dependency and added as a top-level CLC element
with its sub-CLC properly nested under it.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I6a512209b87b81d785875f10f76b21c81b2ed579
2020-12-21 22:16:21 +00:00
Bob Badour
2694776f39 Merge "getNamespacesToSearchForModule to use blueprint.Namespace" am: d8065c606c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533699

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I42c2f90c85f5ced2f8d844aad9e59593ff872739
2020-12-21 21:22:45 +00:00
Bob Badour
d8065c606c Merge "getNamespacesToSearchForModule to use blueprint.Namespace" 2020-12-21 20:56:32 +00:00
Treehugger Robot
ee0052200d Merge "Support writing a ZIP64 file header" am: cef48e956b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532736

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2de7a3b577e0bbdd4b84d96197a7397e0ca474ab
2020-12-21 20:40:15 +00:00
Treehugger Robot
cef48e956b Merge "Support writing a ZIP64 file header" 2020-12-21 20:22:36 +00:00
Bob Badour
38620edca1 getNamespacesToSearchForModule to use blueprint.Namespace
Allow for nil argument.

Test: m all

Change-Id: I03e3afe00d72905f259ce1af5085387b796ebc3d
2020-12-21 18:40:53 +00:00
Jaewoong Jung
c08ca970c9 Merge "Remove the return value from dexpreopt" am: 4eb5048585
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532723

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I76fe4b0cf57d64a573788486622d2557e7685830
2020-12-21 16:38:09 +00:00
Jaewoong Jung
4eb5048585 Merge "Remove the return value from dexpreopt" 2020-12-21 16:19:23 +00:00
Martin Stjernholm
c386b232d8 Merge "Set the Soong config variable to keep building ART from source." am: 7461e3c19a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534343

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I26717be4562adb7c5686224217a23bc1999b514c
2020-12-21 15:38:46 +00:00
Martin Stjernholm
7461e3c19a Merge "Set the Soong config variable to keep building ART from source." 2020-12-21 15:15:11 +00:00
Martin Stjernholm
2a9013ee17 Set the Soong config variable to keep building ART from source.
Without this Soong may run into inconsistencies due to stale prebuilts.
This amends https://r.android.com/1529658.

Test: TH build of NDK
Bug: 175918603
Bug: 172480615
Change-Id: I14680e4547d7d5f560d31ef61b71af8d159c4c53
2020-12-21 13:37:22 +00:00
Anton Hansson
e564c8e685 Merge changes I6d1be1a9,Ie5e9310e am: 69c43e40ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1531790

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iedb64dd996ca82f2f9979ef6cc932bfe8a9da032
2020-12-21 10:32:52 +00:00
Anton Hansson
69c43e40ad Merge changes I6d1be1a9,Ie5e9310e
* changes:
  Skip mainline_sdk by default in build_test.bash
  Allow multiple --skip-products and --products arguments to multiproduct_kati
2020-12-21 09:59:32 +00:00
Colin Cross
1f31a3e61b Merge "Fix NDK build in downstream branches" am: bad07a2fb9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532267

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2ae017ed00ef5436926d1fffd09dbfb0d8ba5eb7
2020-12-20 06:05:21 +00:00
Colin Cross
bad07a2fb9 Merge "Fix NDK build in downstream branches" 2020-12-20 05:36:26 +00:00
Treehugger Robot
ad435c7dde Merge "variable: Update product_variables.arc struct" am: 15d46f15d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532982

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iff09483dee8a183d37fd5c85466384f363502331
2020-12-19 08:26:44 +00:00
Treehugger Robot
15d46f15d7 Merge "variable: Update product_variables.arc struct" 2020-12-19 08:07:42 +00:00
Patrice Arruda
fb2e97a139 Merge "Read the proc status file when PID is given for metrics purpose." am: 175500f016
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532500

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7ce39afe6caa7e92cfc12b5ff4a60318696636fe
2020-12-18 05:03:54 +00:00
Patrice Arruda
175500f016 Merge "Read the proc status file when PID is given for metrics purpose." 2020-12-18 04:14:09 +00:00
Colin Cross
e6a83e65d1 Fix NDK build in downstream branches
The NDK build in downstream branches with prebuilt apexes break
with multiple rules to copy the apex after
I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a renamed SkipInstall to
HideFromMake, which is shadowed by an existing HideFromMake method.
Call through from the existing HideFromMake as a quick-fix for the
build.

Fixes: 175911330
Test: NDK build
Change-Id: Id475671d5dad888913bfb1af2e4be1f2454c3211
2020-12-17 18:22:34 -08:00
Satoshi Niwa
54f4826672 variable: Update product_variables.arc struct
- Add whole_static_libs
- Add `android:"arch_variant"` so arc struct can be used inside
  target.android.product_variables

Test: m
Bug: 171847983
Change-Id: Iaa99b007302462ef66d0d943bc16d37a6e8ecdc7
2020-12-18 09:53:26 +09:00
Treehugger Robot
a90af4fbe5 Merge "SOONG_* variables are emitted only for the BuildOS variants" am: d9d59fb57c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532981

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I125e57f96bce6e5a8417f95ec8908f2c6a14e4eb
2020-12-18 00:08:01 +00:00
Treehugger Robot
d9d59fb57c Merge "SOONG_* variables are emitted only for the BuildOS variants" 2020-12-17 23:44:37 +00:00
Colin Cross
373147baa9 Support writing a ZIP64 file header
If the length of a stored file is more than 2^32 and a data descriptor
is not being used then a ZIP64 extra is required in the file header to
store the uncompressed and compressed lengths.

Bug: 175055267
Test: TestCopyFromZip64
Change-Id: Id414b4c04f48aefabfd835bd8339333d36576375
2020-12-17 15:08:50 -08:00
Patrice Arruda
04157e186f Read the proc status file when PID is given for metrics purpose.
To measure the MaxRSS memory correctly, read the proc status file
under /proc/<pid>/status and extract the MaxRSS value from it. The
implementation is only available for Linux based distributions.

Bug: b/169453825
Test: go test
Change-Id: I32e3068fee7447f9ef5dfb5a8d8dcb6934e0af23
2020-12-17 14:52:14 -08:00
Martin Stjernholm
e032941305 Merge "Change default for source_build config variable to true." am: 56b584c4b2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1529658

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib8fe8fdff0bd7e874931f6031545f5f6e48793ed
2020-12-17 22:40:51 +00:00
Colin Cross
62bc8d2316 Merge changes from topic "sbox_tools" am: 97a1be6e7b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1531944

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I86b631d1263bca0a05f807a1951a7260392fbfd5
2020-12-17 22:39:33 +00:00
Martin Stjernholm
56b584c4b2 Merge "Change default for source_build config variable to true." 2020-12-17 22:31:04 +00:00
Colin Cross
97a1be6e7b Merge changes from topic "sbox_tools"
* changes:
  Sandbox genrule tools
  Call ctx.InstallFile for uninstallable cc modules
  Don't copy uninstallable variants of NDK libraries to sysroot
2020-12-17 22:01:06 +00:00
Anton Hansson
785a31ab58 Skip mainline_sdk by default in build_test.bash
This product does not work in build_test yet for two reasons:
- it's a soong-only build and kati does not pass
- it requires the FORCE_BUILD_LLVM_COMPONENTS env variable to be set

Bug: 174315599
Test: build_test
Change-Id: I6d1be1a9779028fb6b7504b6853edcd6db71e35a
2020-12-17 20:27:45 +00:00
Treehugger Robot
16967c330f Merge "Add test & documentation for PropertiesToApply" am: 41351b5334
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532258

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4b9fc54dafa25d7fb260108d619de04389adbb18
2020-12-17 20:20:16 +00:00
Treehugger Robot
41351b5334 Merge "Add test & documentation for PropertiesToApply" 2020-12-17 19:55:25 +00:00
Colin Cross
f2f3d31549 Allow multiple --skip-products and --products arguments to multiproduct_kati
Concatenate multiple comma separated lists passed to --skip-products
and --products.

Test: manual
Change-Id: Ie5e9310e1ebcb9c7fa88e9c8b45fb29f64f9cce7
2020-12-17 19:33:18 +00:00
Liz Kammer
fe8853d2e6 Add test & documentation for PropertiesToApply
Document PropertiesToApply expectations about props, and suggest it
should generally be generated via CreateProperties.

Test: go soong tests
Test: m nothing
Change-Id: I7cc2590db96865382ad6e0da333d4a4e2c697f45
2020-12-17 18:59:41 +00:00
Colin Cross
ba9e403703 Sandbox genrule tools
This relands I38393900677c5dbe8e72fe06a7dd7d71f3c09f82 after
I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a, which makes the ASAN
variants of libraries have PackagingSpecs so they can be copied
into sandboxed genrules.

Copy tools used by genrules into the sandbox directory.  This
ensures correct dependencies on all files used by tools, and
is one step closer to enabling genrules inside unselected
namespaces.

Bug: 124313442
Test: genrule_test.go
Test: rule_builder_test.go
Test: m checkbuild
Change-Id: I57c0d5fc8bba216fac4deb972d0d2098593e8963
2020-12-17 10:02:56 -08:00
Colin Cross
a9c8c9f145 Call ctx.InstallFile for uninstallable cc modules
SkipInstall is actually primarily used to prevent making a module
visible to Make, rename it and add new SkipInstall that actually
skips installation without affecting Make.

Call c.SkipInstall() for uninstallable cc modules to allow calling
c.installer.install, which will collect PackagingSpecs for
uninstallable cc modules, allowing them to be used by genrules.

Bug: 124313442
Test: m checkbuild
Change-Id: I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a
2020-12-17 10:02:18 -08:00
Colin Cross
95b07f2b59 Don't copy uninstallable variants of NDK libraries to sysroot
After the next patch libraryDecorator.install will be called for
uninstallable variants of modules, manually filter them out when
copying to the NDK sysroot.

Bug: 124313442
Test: m checkbuild
Change-Id: I28b538d4ae271dc5e27c386d7cfa538ac0ed841b
2020-12-17 10:02:18 -08:00
Jaewoong Jung
4b97a56615 Remove the return value from dexpreopt
dexpreopt doesn't strip dex files from the input jar anymore, so there's
no point returning the input jar path untouched.

Test: m nothing + TreeHugger
Change-Id: I8fde6cdc19e85a2fbc946513696417b945c5de0f
2020-12-17 09:43:28 -08:00
Anton Hansson
0af20effc1 Remove sdk_version: "none" restriction
Not entirely sure what the history behind requiring only libcore
projects use this, but it is a bit annoying to have to allow-list every
use.

Bug: 173606718
Test: m nothing
Change-Id: I66f71e67d3f17e7f983c8537dff537fe8419da95
2020-12-17 15:43:29 +00:00
Ulya Trafimovich
dbf31665ab Move ClassLoaderContexts() method to UsesLibraryDependency interface.
This method logically belongs with other UsesLibraryDependency methods,
as it is used in the same context when computing class loader context.
Previously it was part of Dependency interface, which doesn't cover SDK
libraries. We do not currently have the necessary information for
SdkLibraryImport (so ClassLoaderContexts() returns nil for it), but we
do have it for SdkLibrary (via Library).

Bug: 132357300
Test: m nothing
Change-Id: I56437f260efc6a9af3f45b334e84e915244ccce1
2020-12-17 15:05:26 +00:00
Jiyong Park
ad429d0cd2 SOONG_* variables are emitted only for the BuildOS variants
When HOST_OS=linux and HOST_CROSS_OS=linux_bionic, then a module enabled
for the target "linux" is mutated for both linux(linux_glibc) and
linux_bionic. Although this is WAI for most of the host modules, but
also causes duplocated SOONG_* variables from prebuilt_build_tools
modules. They are configured as HostSupportedNoCross, but linux_glibc
and linux_bionic are not considered as HostCross on the regular
linux/x86 machines, because it can run artifacts from both variants
natively.

Since the problem is at SOONG_* variables, not in the fact that
linux_bionic is not considered as HostCross, fixing the problem by
emitting the variable only for the variants whose OS is the same as the
build system OS (android.BuildOS).

Bug: N/A
Test: apply aosp/1512778, lunch mainline_sdk && m nothing.
out/soong/make_vars-mainline_sdk.mk doesn't have duplicated SOONG_*
variables.

Change-Id: Ieb51d180b7c1ee758e7a376a960a8c3b91c836c9
2020-12-17 19:31:17 +09:00
Treehugger Robot
7d3e31bd70 Merge "Assert android.ApexModule interface for types having ApexModuleBase" am: 1a74be780b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1530138

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie9bbf24d1c15c9b1a96386993b08804413654e6c
2020-12-17 04:31:58 +00:00
Treehugger Robot
1a74be780b Merge "Assert android.ApexModule interface for types having ApexModuleBase" 2020-12-17 04:14:35 +00:00
Rupert Shuttleworth
861ea59475 Merge "Skip Bazel dist dir migration if not in dist mode or if Bazel dist dir does not exist." am: e808dae1fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532818

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7840282d1442b4f09eb5ff5e9b5ae5131276b4e6
2020-12-17 03:46:16 +00:00
Rupert Shuttleworth
e808dae1fd Merge "Skip Bazel dist dir migration if not in dist mode or if Bazel dist dir does not exist." 2020-12-17 03:26:12 +00:00
Rupert Shuttleworth
534f15708f Skip Bazel dist dir migration if not in dist mode or if Bazel dist dir does not exist.
Test: DIST_DIR=/tmp/foo USE_BAZEL=1 m dist and DIST_DIR=/tmp/foo USE_BAZEL=1 m dist installclean
Change-Id: Ibf576d2f3ba506e0f45c30a5dbea69de5c475c9a
2020-12-17 01:01:33 +00:00