Commit Graph

27988 Commits

Author SHA1 Message Date
Patrice Arruda 7d235cc24d Allow uploading a directory of metrics files.
The upload functionality now supports directories to be uploaded
for metrics purpose.

Bug: b/174479728
Test: Wrote unit test case.

Change-Id: I6906be4c1b7fd76ddf6ff7b94e48fe1c4209c59d
2020-12-10 21:48:05 +00:00
Treehugger Robot 5839c91074 Merge "Provide an interface for shared paths between Soong and Soong UI." 2020-12-09 17:31:02 +00:00
Treehugger Robot 413c3bea63 Merge "Soong: remove output file before running signapk" 2020-12-09 16:58:02 +00:00
Mohammad Islam 5d2c54f1e2 Merge "Enable soong build tool to handle APEX compression" 2020-12-09 14:34:42 +00:00
Treehugger Robot 5b0b94ecea Merge "Soong: remove output file before running SoongZip" 2020-12-09 08:05:06 +00:00
Treehugger Robot 6bba8382af Merge "Prebuilt is enabled even if the source one is not." 2020-12-09 07:29:24 +00:00
Treehugger Robot 61cb7ed6ff Merge "Soong: add missing header-abi-dumper inputs" 2020-12-09 07:26:36 +00:00
Jaewoong Jung 729c0bdb54 Prebuilt is enabled even if the source one is not.
This fix a bug in a recent android_app_import-related change
(I8215aa1a6dad74b503eaa1169a64f8c30dda287c) where it uses an incorrect
module reference, and so disables a prebuilt module if its source-based
counterpart is disabled.

Test: app_test.go
Bug: 152343232
Change-Id: Ic7f5ca40be58f06e44b5ec4945caf209ef2dae96
2020-12-08 19:11:54 -08:00
Rupert Shuttleworth 0bc9a9ad6b Add dependency checker special case for out/build_date.txt.
Test: Future TH presubmit.
Change-Id: I4f80cf12be4aa1a3040b38ac7c6bed593aefd65e
2020-12-08 23:28:25 +00:00
Ivan Lozano 78b340f375 Merge "Add LinuxBionic toolchain to Rust" 2020-12-08 22:04:49 +00:00
Treehugger Robot 0903e89f4a Merge "Print both the implicit and explicit environment variables when running Bazel." 2020-12-08 20:50:17 +00:00
Patrice Arruda 83842d7235 Provide an interface for shared paths between Soong and Soong UI.
Code refactoring has been done for logs directory logic code since
the bazel metrics directory depends on the log directory. For builds
that did not specify a dist directory, the log directory is under
out directory. With dist, the logs directory is under <dist dir>/logs.
This matters for Android CI builds where the metrics files are
placed under logs directory. With this change, the bazel metrics
directory and corresponding files will be under <dist dir>/logs
directory for Android CI builds.

Bug: b/174479728
Test: * USE_BAZEL=1 m nothing (bazel_metrics dir in out dir)
      * m nothing (bazel_metrics dir deleted)
      * DIST_DIR=/tmp/build USE_BAZEL=1 m nothing dist (bazel_metrics
        is in /tmp/build/logs directory)

Change-Id: Ic9e1ff49a1964fcaaf801bde2c19f33597ca1db4
2020-12-08 20:24:14 +00:00
Colin Cross 69e9230641 Merge "Reimplement DepSet as a wrapper around a generic implementation" 2020-12-08 19:36:22 +00:00
Paul Duffin c27dd1a9bb Merge changes Ie51f097e,Ibf26da14
* changes:
  Use apex and jar to select boot image dex jar
  Ensure that only one dex jar is chosen for each boot image library
2020-12-08 14:27:35 +00:00
Anton Hansson d230030dfd Merge "Add native modules build utils to allow list" 2020-12-08 14:19:38 +00:00
Ivan Lozano bf3b6e9b8d Add LinuxBionic toolchain to Rust
The LinuxBionic toolchain wasn't defined for Rust.

This would lead to build breakage if a CC module that targeted Linux
Bionic linked against a Rust FFI module.

Bug: 174873186
Test: Build breakage no longer occurs if CC module with Rust dependency
      is built for the Linux Bionic target.
Change-Id: I39df7b9a29372986c9beeb1fe5602140d805d731
2020-12-08 09:04:21 -05:00
Mohammad Samiul Islam 3cd005d347 Enable soong build tool to handle APEX compression
1. Soong can now detect PRODUCT_COMPRESSED_APEX flag
     We don't want APEX to be compressed on all devices. Only those that
     have explicitely set PRODUCT_COMPRESSED_APEX flag.
2. Handle "compressible" field in soong build rule
     On devices that supports APEX compression, all APEX will be
     compressed by default. If any apex does not want to be compressed,
     they will need to state that by setting "compressible" field to
     false
3. Can use apex_compression_tool to compress APEX
     Note we compress the APEX after it has been signed. That way, when
     we decompress we will get a signed APEX.
4. Place the compressed APEX in system with .capex extension
     This makes it easy to identify. We still preserve the original
     extension so that when we decompress, we can just rename by cuttif
     off the .capex extension.

Note: with this change, we can create a system image with compressed
APEX, but we cannot boot with it since platform doesn't know how to
handle .capex files. Platform support will be added on follow up CLs.

Bug: 172911362
Test: OVERRIDE_PRODUCT_COMPRESSED_APEX=true m (apex_test.go)
Test: observed $OUT/system/apex has .capex files
Change-Id: I20ac4c4ceb521924c751a6017f979b2d808fdded
2020-12-08 13:06:25 +00:00
Thiébaud Weksteen 799eeb8dd6 Merge "Add dependencies for source-generated crates" 2020-12-08 08:42:57 +00:00
Rupert Shuttleworth 72f72b42cb Print both the implicit and explicit environment variables when running Bazel.
Test: Manually via USE_BAZEL=1 use_rbe m.
Change-Id: I9f0ac8875b47848fdea4ae97d107e4167c4a7f6e
2020-12-08 06:12:51 +00:00
Treehugger Robot 150d708163 Merge "Fix empty item handling in Split function, rewrite Words function" 2020-12-07 22:13:51 +00:00
Colin Cross 96c44127d1 Reimplement DepSet as a wrapper around a generic implementation
Implement depSet as a generic depsets implementation using reflection,
and then make DepSet a type-safe wrapper around it.  This will allow
additional wrappers for depsets that work with other types.  All of
this can be replaced with generics once Go supports them.

Test: depset_test.go
Change-Id: Id9df17bcc76f6c1545e7eb498f298066cf8a7679
2020-12-07 12:27:50 -08:00
Treehugger Robot 741711b34c Merge "Add ranking in docs for exclude_srcs to follow srcs" 2020-12-07 18:27:50 +00:00
Paul Duffin fc02166dab Use apex and jar to select boot image dex jar
Previously, only the <jar> part of the boot image configuration pair of
<apex>:<jar> was used to select the module that provides the boot image
dex. The name was sufficient to select the module but not the module
variant and it relied on the platform variant not being installed to
select a unique variant. Unfortunately, when modules are provided as
prebuilts they are not installed and so they get ignored.

This change removes the install check and instead checks the <apex> as
well to select a unique variant.

It also moves the DexJarBuildPath() and ApexModule checks to after
checking the name and treats them as errors. It is safe to do so
because every module that has the same name has to have the same module
type and in order for the module to be valid in the boot image
configuration it must pass those two checks. Treating these as errors
rather than silently ignoring them makes it easier to diagnose problems
with the configuration and/or the boot image modules.

Test: m droid
Bug: 171061220
Change-Id: Ie51f097e081907ea5b75d75840736b10d8d883e8
2020-12-07 17:36:53 +00:00
Paul Duffin db77e14d84 Ensure that only one dex jar is chosen for each boot image library
This change does not break modules like "core-oj" that are in multiple
apexes, i.e. com.android.art, com.android.art.debug and
com.android.art.testing because they all shared the same variant. So,
the getBootImageJar() is only called once for that variant.

Test: m droid
Bug: 171061220
Change-Id: Ibf26da147af2b49ab9e4588030e8cd4002d04a7a
2020-12-07 17:30:48 +00:00
Jaewoong Jung 71debbfcc5 Merge "No matching variant android_app_import fix" 2020-12-07 14:33:17 +00:00
Treehugger Robot 25c14959a2 Merge "Only print the Bazel command line once." 2020-12-07 13:46:40 +00:00
Thiébaud Weksteen fa5feae43c Add dependencies for source-generated crates
When using SourceProviders, the dependency tree does not include
directly the source variant, only the built variant. For instance:

  liba --> libbingena_rlib --> libbingena_source

However, libbindgena_rlib did not have a source associated with the
module, and was therefore not added as a dependency. Modify the logic so
that a SourceProvider library will find the right variant and always
have a source defined.

Adds display_name fields to the crate description to ease debugging.

Test: rust-analyzer analysis-stats .
Bug: 174158339
Change-Id: Id65708d57cd176f7e1da353f4a5f7ad65b003090
2020-12-07 14:45:09 +01:00
Anton Hansson 1e1e823895 Add native modules build utils to allow list
This is a backward-compatible library.

Test: m with dep
Change-Id: Id68a00efe8973e7660ce2e53d42b7741c9f22a5c
2020-12-07 12:54:07 +00:00
Paul Duffin 5e2697117f Merge "Improve error messages for missing dependencies" 2020-12-07 10:40:07 +00:00
Ulyana Trafimovich 678ddb9d24 Merge changes I697a65e4,Iaac6aaf6
* changes:
  Do not propagate <uses-library> deps through static SDK component libs.
  Make error message more precise.
2020-12-07 10:01:40 +00:00
Rupert Shuttleworth 561f2f2d96 Only print the Bazel command line once.
Test: USE_BAZEL=1 m and USE_BAZEL=1 use_rbe m.
Change-Id: I8413e92d91c906f884628bedac6955575cf86a1c
2020-12-07 09:59:13 +00:00
Treehugger Robot 47132c4943 Merge "Use lstat instead of stat to avoid permissions issues when creating symlinks." 2020-12-07 07:25:38 +00:00
Jingwen Chen 946e0b69d2 Merge "Add bp2build mode to soong_build." 2020-12-07 07:16:15 +00:00
Rupert Shuttleworth ead7ef6e3b Use lstat instead of stat to avoid permissions issues when creating symlinks.
Also refactor symlink code slightly and add some more error checking.

Test: Manually.
Change-Id: I75119707cdf497e5690ac57abd814c8f18cab1f8
2020-12-07 04:54:18 +00:00
Treehugger Robot 0ec64e5df7 Merge "Print the full Bazel command line (including env) for debugging purposes." 2020-12-07 04:52:37 +00:00
Rupert Shuttleworth 947ed97367 Print the full Bazel command line (including env) for debugging purposes.
Test: Manually ran USE_BAZEL=1 m and USE_BAZEL=1 use_rbe m and looked at the build output.
Change-Id: Idbfdf8b00458fbd4b684cb0c1b58d6515909293c
2020-12-07 04:50:29 +00:00
Treehugger Robot 840708e45b Merge "Remove obsolete environment variables from ninja.go allowlist." 2020-12-05 02:48:42 +00:00
Sasha Smundak cbc17ee62d Fix empty item handling in Split function, rewrite Words function
Test: treehugger
Bug: 172923994
Change-Id: Ic7ee7b1af6e1438df5cf06754b9bec7038b624f2
2020-12-04 17:24:03 -08:00
Treehugger Robot c08f602f31 Merge "Allow rust code in packages/modules/DnsResolver" 2020-12-04 20:51:26 +00:00
Jaewoong Jung 84f1b80866 No matching variant android_app_import fix
This fixes a bug where android_app_import or android_test_import without
a matching variant or a default apk property value breaks the build.

Test: app_test.go
Fixes: 152343232
Change-Id: I8215aa1a6dad74b503eaa1169a64f8c30dda287c
2020-12-04 11:51:29 -08:00
Steven Moreland 252e4c44f1 Merge "vndk.go: remove keymint" 2020-12-04 19:24:40 +00:00
Rupert Shuttleworth 411996ca50 Remove obsolete environment variables from ninja.go allowlist.
Test: N/A.
Change-Id: I717b31f2b68d2cac72cca33f04cfa3b6078cb8eb
2020-12-04 18:42:29 +00:00
Colin Cross 110d13bef3 Merge "Allow stripping host modules" 2020-12-04 18:24:13 +00:00
Bernie Innocenti 3a710d6bbb Allow rust code in packages/modules/DnsResolver
Test: m com.android.resolv.apex
Change-Id: I6cb5234f51ac6c31440e7cd5aeca4655629a35d6
2020-12-05 02:55:53 +09:00
Colin Cross 2254cffd53 Allow stripping host modules
Turn on stripping for host modules if they explicitly request it.

Test: m checkbuild
Change-Id: Ia7c76a278ecacfe8a5bab1631af6c28b8b970999
2020-12-04 09:43:49 -08:00
Treehugger Robot 0157cc658a Merge "Add context for invalid extensions for cc compile" 2020-12-04 17:41:06 +00:00
Paul Duffin 7f48eeff59 Improve error messages for missing dependencies
Adds some additional information into the paths that are created when
modules are missing in Soong but SOONG_ALLOW_MISSING_DEPENDENCIES=true.

Test: try and build platform against art prebuilts
Bug: 171061220
Change-Id: Ifbcc0af5bdbd15409758a3b6f216cf9b3b5dba31
2020-12-04 16:21:57 +00:00
Treehugger Robot 06e7b6d906 Merge "Allow RBE-related environment variables to be visible during Bazel action execution." 2020-12-04 15:48:26 +00:00
Liz Kammer e2861131e6 Add context for invalid extensions for cc compile
Change-Id: I342e8ece56bbe632232d83670d14f9368ed9f0ff
Test: treehugger
2020-12-04 15:19:22 +00:00
Thiébaud Weksteen 4bfb2b99f8 Merge "Includes rust_binary in rust-project.json" 2020-12-04 14:37:14 +00:00