Commit Graph

32246 Commits

Author SHA1 Message Date
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
Orion Hodson 50ad989646 apex/allowed_deps: add libnetjniutils
Bug: 158749603
Test: m
Change-Id: I00a8d61eebba5ae43f2338822854264dfabad4af
2020-12-08 13:55:16 +00: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 523d790a68 Merge "Add dependencies for source-generated crates" am: 799eeb8dd6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518601

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I65b7c0cce01f0ab3e23449e924c81b09f1ecc981
2020-12-08 09:09:09 +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 0451cc0328 Merge "Fix empty item handling in Split function, rewrite Words function" am: 150d708163
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1513334

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I061a539cf1043ab4f68794bd739c0480143097cf
2020-12-07 22:33:44 +00:00
Sasha Smundak d63f7f0846 Add missing export/unexport directives
Test: treehugger
Bug: 172923994
Change-Id: I70494a02d37d149042a4d5772f1cf14b8bbcc06e
2020-12-07 14:15:07 -08: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 ffe6b9d9ba Add TransitivePackagingSpecs
Add TransitivePackagingSpecs to return the PackagingSpecs for a
module and any of its transitive dependencies that have dependency
tags for which IsInstallDepNeeded returns true.

Bug: 124313442
Test: m checkbuild
Change-Id: I1d6750db830d1601d696349674f0b7071372ca11
2020-12-07 12:27:50 -08: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
Colin Cross 859dfd9240 Add executable flag to sbox copy requests
Add a boolean flag to the sbox proto to request the executable bit
to be set after copying a file.  This will be used for sandboxing
tools when copying a file in from the source tree that would
normally get its executable bit set during installation.

Bug: 124313442
Test: sbox_test.go
Change-Id: Ie2c197bb5183ffc1bf63fd6effd175143cd324d4
2020-12-07 12:27:50 -08:00
Colin Cross 5d5839522c Export files to install as a depset
Export files to install through a depset instead of a list to reduce
the size at each module.

Bug: 124313442
Test: m checkbuild
Change-Id: I6a51c89acc9f0f3a9c3c792d3ef8a7cfd6b8bef2
2020-12-07 12:27:50 -08:00
Treehugger Robot 8de7b2f955 Merge "Add ranking in docs for exclude_srcs to follow srcs" am: 741711b34c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1483862

Change-Id: Icbe29605cd1667711681b6dbb6c0881d0e1b6fba
2020-12-07 19:19:25 +00:00
Treehugger Robot 741711b34c Merge "Add ranking in docs for exclude_srcs to follow srcs" 2020-12-07 18:27:50 +00:00
Jaewoong Jung 02b11a6035 Remove AndroidMkExtraFootersFunc entries param.
I added in case anyone needs to access AndroidMkEntries to generate
footer lines, but nobody uses it, and it only confuses people.

Test: m nothing, TreeHugger
Change-Id: Ic8a450e3c306d9228c1fdec212c7441bd6aaee03
2020-12-07 10:23:54 -08: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 3ebd82baca Merge "No matching variant android_app_import fix" am: 71debbfcc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518388

Change-Id: Iff991a2259ddebf657afe4738657c246695b7091
2020-12-07 15:00:37 +00:00
Jaewoong Jung 71debbfcc5 Merge "No matching variant android_app_import fix" 2020-12-07 14:33:17 +00:00
Treehugger Robot 39317c0828 Merge "Only print the Bazel command line once." am: 25c14959a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518938

Change-Id: I1ee70f64415cdf00db23bf20be33dce163a22efa
2020-12-07 14:03:43 +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 be6f1e64af Merge "Improve error messages for missing dependencies" am: 5e2697117f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1516937

Change-Id: I00cd348627ea3ec14b864142aed0bd3ba895ead4
2020-12-07 11:04:16 +00:00
Paul Duffin 5e2697117f Merge "Improve error messages for missing dependencies" 2020-12-07 10:40:07 +00:00
Ulyana Trafimovich b75a82f874 Merge changes I697a65e4,Iaac6aaf6 am: 678ddb9d24
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515502

Change-Id: Iecedfb295dbbbdbb8b981da5ba10a7e7a4e4a37a
2020-12-07 10:28:58 +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 043a7e0f47 Merge "Use lstat instead of stat to avoid permissions issues when creating symlinks." am: 47132c4943
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1517477

Change-Id: I63d5054c933f322c5d397d06fc14721392b62c10
2020-12-07 08:07:04 +00:00
Jingwen Chen abe87e8813 Merge "Add bp2build mode to soong_build." am: 946e0b69d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515407

Change-Id: Ic200db7f6932a890a4814b6fdaf3f598ca9cb94f
2020-12-07 08:06:21 +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
Treehugger Robot dc63f2fa67 Merge "Print the full Bazel command line (including env) for debugging purposes." am: 0ec64e5df7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1517478

Change-Id: I15b5e91ba4ea6eb24b82fa003b286570e1c43a23
2020-12-07 05:17:43 +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 d2d3950574 Merge "Remove obsolete environment variables from ninja.go allowlist." am: 840708e45b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1517240

Change-Id: I6a052b954082131de0aa4f0f9c27885e4ded5830
2020-12-05 03:14:24 +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 92d8bbfdd3 Merge "Allow rust code in packages/modules/DnsResolver" am: c08f602f31
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1518457

Change-Id: Ib5dc59753da5b7a98bb1389b3acfe731b655ddb9
2020-12-04 21:30:27 +00: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 99d01eab68 Merge "vndk.go: remove keymint" am: 252e4c44f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1514844

Change-Id: I3904bb13363ebaa7dea14071abc7e9f0b915ea7e
2020-12-04 19:39:22 +00:00
Colin Cross bfbe007c03 Merge "Allow stripping host modules" am: 110d13bef3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1514992

Change-Id: I7c9ed9b1627806c0f4d8cc415e96bcaaec4dcab8
2020-12-04 19:32:35 +00:00
Steven Moreland 252e4c44f1 Merge "vndk.go: remove keymint" 2020-12-04 19:24:40 +00:00
Victor Hsieh 274597b951 Put external/libchromeos-rs in the Rust allowlist
Bug: 174797066
Test: m
Change-Id: Ieef7df3c17e6d6b1223769cfd07301dfe7d91363
2020-12-04 11:21:06 -08: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