Commit Graph

32411 Commits

Author SHA1 Message Date
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
Anton Hansson dff2c78a20 Add attribute to disable last-api compat tracking
Setting this to true by default is dangerous as it can mask bugs. Create
a dedicated attribute for java_sdk_library to enable this behavior
instead. The default will be flipped in a future CL when all the current
offenders have been fixed.

Fix all the tests to have the right API files.

Bug: 176092454
Test: m nothing
Change-Id: Ieab94bcb74abf8d018365a56fb447fe3dbd46957
2020-12-21 17:25:30 +00:00
Jaewoong Jung 4eb5048585 Merge "Remove the return value from dexpreopt" 2020-12-21 16:19:23 +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 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 bad07a2fb9 Merge "Fix NDK build in downstream branches" 2020-12-20 05:36:26 +00:00
Treehugger Robot 15d46f15d7 Merge "variable: Update product_variables.arc struct" 2020-12-19 08:07:42 +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 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 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
Liz Kammer 40ddfaae7a Check whether value_variables are set
If value variable had not been set by a user, previously we would error
out. Now, we just skip it.

Test: go test soong tests
Test: m nothing
Change-Id: Ibab67e00b28055b5feee2f4fd79bf4dfb2fc6704
2020-12-17 12:18:37 -08: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 1a74be780b Merge "Assert android.ApexModule interface for types having ApexModuleBase" 2020-12-17 04:14:35 +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
Treehugger Robot f1c48afc31 Merge "arch specific dependencies are supported for apex" 2020-12-17 00:15:26 +00:00
Patrice Arruda c7ed779e5a Merge "Add and update comments in ui/metrics/metrics.go." 2020-12-16 19:34:56 +00:00
Liz Kammer 13548d7fa8 Correct mismatched string format in bazel_handler
Test: go test soong tests
Change-Id: Ic48d2e75e8d246f490f46f4619e739b0fa565902
2020-12-16 11:13:30 -08:00
Treehugger Robot 2df93e550b Merge "Remove soong_metrics_proto from the import of the protobuf file." 2020-12-16 17:22:09 +00:00
Treehugger Robot f747e75119 Merge "Add setup_tools performance metrics to Soong protobuf file." 2020-12-16 17:21:50 +00:00
Christopher Parsons 61f6eb6664 Merge "Use aquery to declare bazel actions in the ninja file." 2020-12-16 15:59:27 +00:00
Treehugger Robot abada78f05 Merge "Always track transitive dependencies for host." 2020-12-16 13:14:28 +00:00
Colin Cross 7cd23e3d02 Merge "Revert "Sandbox genrule tools"" 2020-12-16 02:53:25 +00:00
Colin Cross 0096047180 Revert "Sandbox genrule tools"
This reverts commit 3a150d6951.

Reason for revert: b/175743249

Bug: 124313442
Bug: 175743249
Change-Id: Id1695df7b83bf057511f856b40cf7d5413030270
2020-12-16 02:52:32 +00:00
Martin Stjernholm f2635ec434 Always track transitive dependencies for host.
This fixes a regression in https://r.android.com/1515154 when building
the host ART APEX (com.android.art.host).

Test: art/build/apex/runtests.sh
Bug: 166468760
Change-Id: I39a00019b7bfa77a865e7287c66add3566b34d87
2020-12-16 01:34:43 +00:00
Treehugger Robot 6a8c18a89b Merge "versioning macro is exported from prebuilt stubs as well" 2020-12-16 01:31:10 +00:00
Kalesh Singh fc0cba0b77 Merge "Revert "Add android.hardware.memtrack-unstable-ndk_platform"" 2020-12-16 00:48:06 +00:00
Kalesh Singh 67d69f0d1c Revert "Add android.hardware.memtrack-unstable-ndk_platform"
Revert submission 1518702-memtrack-aidl

Reason for revert: Broken tests and boot time regressions
Reverted Changes:
Ic4dd70e2c:Add android.hardware.memtrack-unstable-ndk_platfor...
Iaf99d0ca4:Add stable aidl memtrack HAL to product packages
Iac54ae2ba:Add stable aidl memtrack hal to vndk list
If310210a3:libmemtrack: Add support for AIDL memtrack HAL
Ib6c634def:Memtrack HAL: Add stable AIDL implementation
I5e1d0e006:Memtrack HAL stable aidl sepolicy

Change-Id: I4fc71dc5813d10600727a2630c10f5d113f61936
2020-12-16 00:19:38 +00:00
Patrice Arruda 589826bc1e Add and update comments in ui/metrics/metrics.go.
The metrics.go had missing comments and also did minor code refactoring
to be more in golang best practices.

Bug: b/172917718
Test: m nothing.
Change-Id: Id63e4af3f27b582fc13ef3f988ac5c8707fb9adf
2020-12-15 23:36:01 +00:00
Treehugger Robot 4d24e65bbf Merge "Put external/libchromeos-rs in the Rust allowlist" 2020-12-15 23:28:19 +00:00
Chris Parsons dbcb1ff469 Use aquery to declare bazel actions in the ninja file.
This effectively moves execution of Bazel actions outside of soong_build
and alongside ninja execution of the actual ninja files, whether that be
by ninja or by Bazel itself.

This almost allows for mixed builds and Bazel-as-Ninja-executor to
coexist, but requires hacks explained in b/175307058.

Test: Treehugger
Test: lunch aosp_flame && USE_BAZEL_ANALYSIS=1 m libc
Test: lunch aosp_flame && USE_BAZEL=1 USE_BAZEL_ANALYSIS=1 m libc,
though this requires a hack of the main BUILD file. See b/175307058

Change-Id: Ia2f6b0f1057e8cea3809de66d8287f13d84b510c
2020-12-15 17:39:23 -05:00
Colin Cross 0e0e4fea75 Merge "Sandbox genrule tools" 2020-12-15 22:33:15 +00:00
Ivan Lozano fde77e02f3 Merge "Merge rust_protobuf and rust_grpcio module types." 2020-12-15 21:38:32 +00:00