Commit Graph

32181 Commits

Author SHA1 Message Date
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
Treehugger Robot bf3f99940c Merge "Add context for invalid extensions for cc compile" am: 0157cc658a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1516958

Change-Id: If3e34b62bafaa823e62ddc243a61b8b9023fc9e6
2020-12-04 18:06:03 +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 e3705046ff Merge "Allow RBE-related environment variables to be visible during Bazel action execution." am: 06e7b6d906
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1517239

Change-Id: I29062e8d87548da2db2b4a238f7e740fbee02b83
2020-12-04 16:09:22 +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
Thiébaud Weksteen e6d47da771 Merge "Includes rust_binary in rust-project.json" am: 4bfb2b99f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1517037

Change-Id: I86c9d56d527c269bd72dec5c31ac32a0abfd866a
2020-12-04 15:28:33 +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
Rupert Shuttleworth ad532f21ab Allow RBE-related environment variables to be visible during Bazel action execution.
Test: Manually.
Change-Id: I1acfdd5f30b2e08288508da8136029e454316622
2020-12-04 11:27:54 +00:00
Jiyong Park e386754898 target.apex.exclude_[shared|static]_libs to cc_* modules
The property is used to exclude some shared and static libs when the
module is built for an APEX.

Bug: 166468760
Test: m
Change-Id: I0dcaa4ae94c01aa00dc5539c60d3054c57fd8824
2020-12-04 18:09:39 +09:00
Treehugger Robot 00fd1c09d5 Merge "Don't use module names with "prebuilt_" prefixes in make dependencies." am: d348c41af5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1515504

Change-Id: Id640558409539dd91f945f35786085afcbbf8fa3
2020-12-04 07:32:25 +00:00
Treehugger Robot d348c41af5 Merge "Don't use module names with "prebuilt_" prefixes in make dependencies." 2020-12-04 06:23:51 +00:00
Treehugger Robot 22e8d2c427 Merge "Add comments/refactor for python.go" am: 2859d737f0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502093

Change-Id: Iec08f7d0e6766dabc7ae1b1c4c57b1f6c48304ba
2020-12-04 05:08:16 +00:00