Commit graph

27946 commits

Author SHA1 Message Date
Jingwen Chen
946e0b69d2 Merge "Add bp2build mode to soong_build." 2020-12-07 07:16:15 +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
Treehugger Robot
c08f602f31 Merge "Allow rust code in packages/modules/DnsResolver" 2020-12-04 20:51:26 +00: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
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
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
Treehugger Robot
d348c41af5 Merge "Don't use module names with "prebuilt_" prefixes in make dependencies." 2020-12-04 06:23:51 +00:00
Jingwen Chen
4133ce6912 Add bp2build mode to soong_build.
This CL adds a new CONVERT_TO_BAZEL env var, and a bp2build goal. It
reuses the queryview architecture, but registers no mutators before
converting to BUILD files. This gives us a blank slate of the module
graph to work with, and create a shadow/alternate pipeline of mutators
to converge the Bazel BUILD graph to be semantically equivalent with the
Android.bp graph (after apply its current set of mutators).

The command to do so is:

    $ CONVERT_TO_BAZEL=true m bp2build

To not clobber with queryview, the generated files are in
out/soong/bp2build.

Test: CONVERT_TO_BAZEL=true m bp2build && bazel query --config=bp2build //...
Test: m queryview && bazel query --config=queryview //..
Test: soong tests
Test: TH presubmit
Fixes: 174465461
Signed-off-by: Jingwen Chen <jingwen@google.com>
Change-Id: I4dd0ccc73abc345d70a50ca2803d6f400cd8c863
2020-12-03 23:36:57 -05:00
Treehugger Robot
2859d737f0 Merge "Add comments/refactor for python.go" 2020-12-04 03:45:21 +00:00
Martin Stjernholm
2856c66c99 Don't use module names with "prebuilt_" prefixes in make dependencies.
The distinction between foo and prebuilt_foo doesn't exist in make, so
this could create invalid dependencies when both source and prebuilt
modules exist and the prebuilts are preferred.

Test: `m` with ART module prebuilts with prefer:true in the tree
Test: m nothing
Bug: 172480615
Change-Id: I90b76a8f38493882b3330d1b6789159852e59d55
2020-12-04 01:00:23 +00:00
Kiyoung Kim
2ba87f466c Merge "Add linkerconfig to Runtime APEX" 2020-12-04 01:00:22 +00:00
Treehugger Robot
cf8b2ee16e Merge "Dogfood the new IR Kotlin compiler backend." 2020-12-04 00:05:07 +00:00
Sophie Zheng
8baa8b50a8 Merge "Automated NDK API coverage used by Mainline modules build integration." 2020-12-03 23:30:21 +00:00
Yifan Hong
4396c01aff Merge "Do not install init.rc for (vendor_)ramdisk variants." 2020-12-03 22:27:53 +00:00
Treehugger Robot
fe9e0c775c Merge "Rename __ANDROID_SDK_VERSION__." 2020-12-03 22:09:56 +00:00
Steven Moreland
b9157b152e vndk.go: remove keymint
keymint-unstable is the VNDK variant (and this list is only checked to
be a superset of the desired libraries).

The other library exists, but it is removed because it's not in the VNDK
and this list is only for VNDK libs.

Bug: 173660792
Test: build
Change-Id: I0e1a2a7af13f132cd3bfa4ca1305c098acbe747b
2020-12-03 21:44:14 +00:00
Colin Cross
897a5ad507 Merge "Pass pctx and ctx to NewRuleBuilder" 2020-12-03 20:07:30 +00:00
Thiébaud Weksteen
064f6e957e Includes rust_binary in rust-project.json
Until now, only rust_library (and their derivatives such as
rust_library_host) were reported in rust-project.json. Adds support for
rust_binary and rust_tests.

Bug: 174743191
Test: Validate auto-completion in keystore2_main.rs
Change-Id: I17b3ec29e233f29b7abd16dc771070ada48d17fb
2020-12-03 20:58:32 +01:00
Christopher Parsons
47f0e63ba0 Merge "Add comments to cc/cc.go" 2020-12-03 16:15:31 +00:00
Orion Hodson
8523735341 Merge "Add 'append' command for conv_linker_config" 2020-12-03 15:23:34 +00:00
Mads Ager
ad2bfda285 Dogfood the new IR Kotlin compiler backend.
Test: make
Test: atest com.android.systemui

Change-Id: I610058001bde19554c55dee5a79ad1782abc3186
2020-12-03 12:23:55 +01:00
Kiyoung Kim
4ee686ddca Add 'append' command for conv_linker_config
Add 'append' command for conv_linker_config so any item can be appended
to linker.config.pb file.

Bug: 174646355
Test: buildbot_build.sh succeeded
Change-Id: Ic3f12ee5e5c0e7ca7c27d4a8cff347e93061eb5f
2020-12-03 17:09:56 +09:00
Treehugger Robot
f202e4e793 Merge "Reduce default shard size." 2020-12-03 07:08:00 +00:00
sophiez
c80a2b392e Automated NDK API coverage used by Mainline modules build integration.
Add gen_ndk_usedby_apex.sh script to generate NDK API list used by Mainlain modules when modules get build.

Test: TARGET_BUILD_APPS=com.android.adbd m dist apps_only

Forrest run: android-build.googleplex.com/builds/forrest/run/L97800000742565481

Change-Id: I39e5aa7c74eff46aba06808642b2bd67ae45ba1e
2020-12-03 05:45:20 +00:00
Treehugger Robot
c0a7b832f3 Merge "WriteFileRule: Chunk long content and merge them to result" 2020-12-03 04:44:02 +00:00
Evgenii Stepanov
f47c90db24 Reduce default shard size.
Current HWASan build on master fails if OUT_DIR is ~17 characters,
passes with 3. Halve defaultShardSize to avoid this.

Bug: 170327170
Test: build with long OUT_DIR

Change-Id: I04e3cae91118891c0e28d895108670dd0d373a3f
2020-12-02 18:56:57 -08:00
Yifan Hong
919dae1e67 Do not install init.rc for (vendor_)ramdisk variants.
Previously, the vendor_ramdisk variant of a module installs the
init.rc file to /vendor/etc/init.

In first stage init, no init rc files are read, so no init rc files
should be installed to any ramdisks.

This change removes LOCAL_INIT_RC for the (vendor_)ramdisk variant
of a module, so that init rc file is not installed for (vendor_)ramdisk
variant of a module.

Test: m snapuserd snapuserd.vendor_ramdisk
      and manually inspect the out directory
Fixes: 174587489
Change-Id: I71227d807244b6538be0d6acce5e94f129a86065
2020-12-02 18:55:29 -08:00
Jingwen Chen
97d85c8a61 Merge "Remove soong.config, FileConfigurableOptions, MegaDevice config." 2020-12-03 02:07:35 +00:00
Inseob Kim
7ad102164b Merge "map list files must have newline characters" 2020-12-03 00:06:59 +00:00
Chris Parsons
ef6e0cf5f7 Add comments to cc/cc.go
Test: N/A
Change-Id: I2e221a40fdf9d6975891dedf0bf8a7db3e3943f1
2020-12-02 16:46:53 -05:00
Christopher Parsons
b9e93f8789 Merge "Improve commenting for cc/builer.go, and kill dead code" 2020-12-02 15:59:55 +00:00
Jaewoong Jung
6a96b82937 Merge "Improve comments in java/aapt2.go" 2020-12-02 15:19:56 +00:00
Jaewoong Jung
2b2bc8c712 Merge "Bolster comments in android/androidmk.go." 2020-12-02 15:16:27 +00:00
Hans Månsson
d3f2bd79e8 WriteFileRule: Chunk long content and merge them to result
sbox.textproto files are created when handling genrule. The command
for the genrule and output files are written to this file in the
following format:

commands <
  command: "...."
  copy_after: <
    from: "out/asm-generic/auxvec.h"
    to: "out/soong/.intermediates/kernel/msm-4.19/qti_generate_kernel_headers_arm/gen/asm-generic/auxvec.h"
  >
  copy_after: <
    from: "out/asm-generic/bitsperlong.h"
     to:
     "out/soong/.intermediates/kernel/msm-4.19/qti_generate_kernel_headers_arm/gen/asm-generic/bitsperlong.h"
  >
  ....
>

This file grow by one copy_after entry for each output file.

When generating kenrnel headers where the number of output files are
~1000 we run into problems as the contents of sbox.textproto files
are written to disk by generating a shell script using the following
template: /bin/bash -c 'echo -e "$$0" > $out' $content
If $content is very long as in the case of generating kernel headers we
run into the issue where the command line is so long that the shell
script return E2BIG.

Fix this issue by chuking contents into smaller files and then merge
them as a final step.

Test: Build
Issue: 174444967
Change-Id: I1a74023b4222d19672e4df7edb19810a9cf2136f
2020-12-02 15:58:48 +01:00
Cindy Zhou
591833471f Merge "Add arch_variant support for diag" 2020-12-02 13:01:43 +00:00
Treehugger Robot
b28bd8cd66 Merge "Fix the instructions for regenerating .txt" 2020-12-02 13:01:37 +00:00
Anton Hansson
5e5c48b2b5 Add support for skipping just kati
The existing --skip-make flag disables both the config step and the kati
step in the build. Add support for a --skip-kati flag that skips just
the kati step, and refactor things so that the logic is shared between
these two.

Bug: 174315599
Test: TARGET_PRODUCT=aosp_arm64 soong_ui --make-mode --skip-kati;
      (verify soong.variables is regenerated)
Change-Id: I75b1910fc1c12fcda130e37b7bc4c050131c7b33
2020-12-02 10:39:50 +00:00
Treehugger Robot
d74b9c5728 Merge "Minor cleanup of soong.go." 2020-12-02 08:21:59 +00:00
JaeMan Park
a4d314c91c Merge "Add java sdk library enforcement flag" 2020-12-02 04:39:10 +00:00
Kiyoung Kim
4098c7eddf Add linkerconfig to Runtime APEX
Add linkerconfig to Runtime APEX module.

Bug: 165769179
Test: Cuttlefish boot succeeded
Change-Id: I31c4bfa2ce88b64d7100f227ec289416db253b13
2020-12-02 11:33:54 +09:00
Treehugger Robot
d8c099e12d Merge "Minor cleanup of build.go." 2020-12-02 02:29:08 +00:00