Commit graph

31784 commits

Author SHA1 Message Date
Jaewoong Jung
9f98d3f423 Improve soong_ui main.go comments.
And do a minor cleanup while we're there.

Test: TreeHugger
Bug: 173557448
Change-Id: Id1736f82f64c1a0a4b29749f73d3a3724fc501a7
2020-11-17 18:29:58 -08:00
Jingwen Chen
096a3bf08f soong_ui finder.go: improve comments/documentation.
Test: m
Bug: 173474588
Change-Id: I947a34b3d9a5b2cd36fba293b55860a20a11d40b
2020-11-17 19:48:31 -05:00
Jingwen Chen
73d037c2b3 Merge "soong_ui's bazel.go: document/comment with tiny refactoring." am: 6d41e995f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501154

Change-Id: Iaf1db04bd1fdea124139cf8c8f92e1291c646ef1
2020-11-18 00:45:04 +00:00
Jingwen Chen
6d41e995f3 Merge "soong_ui's bazel.go: document/comment with tiny refactoring." 2020-11-18 00:32:18 +00:00
Jingwen Chen
7c6089ad95 Integrate bazelenv.sh environment variables into soong_ui environment.
This removes the need to source bazelenv.sh for USE_BAZEL_ANALYSIS, and
unifies mixed builds to use the checked in tools/bazel and bazelrc.

It also unifies all bazel-related output to be in out/bazel.

Without aosp/1502095, this change still requires toplevel_output_directories to be an empty
list, otherwise there'll be this error:

ERROR: Directories specified with toplevel_output_directories should be
ignored and can not be used as sources.

Test: With aosp/1441774: rm -rf out/ && lunch aosp_cf_x86_auto && USE_BAZEL_ANALYSIS=1 m libc && prebuilts/build-tools/linux-x86/bin/ninja -f out/combined-aosp_cf_x86_auto.ninja -t commands libc | grep bazel-out | wc -l # 2 results
Change-Id: I69b217ec88da531415792bb6e04b6a194ca4718d
2020-11-17 18:58:03 -05:00
Colin Cross
d976af0cb4 Skip creating variants for disabled OSes
The documentation java_genrule_host states that it creates a single
variant, which would make it work with the single variant fallback
in AddDependency used by the data property, but it actually has a host
and a host-cross windows variant.  Modify osMutator to take the
OS-specific enabled properties into account to skip creating variants
that will immediately be disabled so there is a single variant.

Test: m checkbuild
Change-Id: Ic2daab29f4fa3a3797d7a08348fbfcf1036ec5dc
2020-11-17 14:24:24 -08:00
Colin Cross
34037c66ae Use bitfield for HostOrDeviceSupported
The HostOrDeviceSupported enums have become unwieldy, replace them
with bitfields to simplify checking if a specific trait is set.

Test: Soong arch tests
Test: m checkbuild
Change-Id: I884ddd092d4c6f740def611b6a055007dc24bd6e
2020-11-17 14:24:11 -08:00
Steven Moreland
0029898a84 java link time error improve
Asked about error message including "against private API.Adjust
sdk_version", which is a bit hard to parse due to missing space. Also
tried to make error message less verbose, so that it is more clear what
to do, and fixed a grammar mistake.

Bug: N/A
Test: N/A
Change-Id: Ib9a30d86b5cb0e9b3b7d5576ecb9498a9b316042
2020-11-17 21:57:23 +00:00
Jose "Pepe" Galmes
6209e3a346 Merge "Support for recovery snapshot." am: f77bd8d60d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498740

Change-Id: I3edcf5f3df4b995f5ba5d007ffd3ba07a820e06d
2020-11-17 21:23:34 +00:00
Jose "Pepe" Galmes
f77bd8d60d Merge "Support for recovery snapshot." 2020-11-17 20:51:54 +00:00
Chris Parsons
8ccdb6358e Use packagepath and local_repository for mixed builds
This allows mixed builds to continue functioning even given the toplevel
WORKSPACE file containing toplevel_output_directories with out/.

Test: Manually verified on aosp_flame building libc.
Change-Id: I80fc4853421317e2d2c7f03d92d58286df1342ce
2020-11-17 15:42:36 -05:00
Colin Cross
3d68051218 Move genrule on top of RuleBuilder
In preparation for more complicated sandboxing support in sbox, use
a single implementation of the sbox sandboxing by moving genrule to
use RuleBuilder's sbox support instead of creating an sbox rule
directly.

Also move genrule's input list hash support into RuleBuilder.

Test: genrule_test.go
Test: rule_builder_test.go
Change-Id: I292184d02743c7e6887ebbcd232ba565db2ab0cc
2020-11-17 11:23:45 -08:00
Colin Cross
95f1ca07ce Store ndkKnownLibs in the config
Storing ndkKnownLibs prevents multiple tests from running in parallel
as one may be writing to the list while another is reading from it.
Store it in the config so each test has its own copy.

Test: go test -race ./apex
Change-Id: Iba57c9494012c9e0ae9e5ffaa63b9b2bd2c77492
2020-11-17 10:50:19 -08:00
Colin Cross
5789858aa8 Register the kythe singleton on the Context instead of globally
Test: all soong tests
Change-Id: Ief43ff51e66db2d3c895b2a6952385e31b9d669b
2020-11-17 10:50:19 -08:00
Colin Cross
121292911a Store ninja file deps from PackageVarContext in the config
Store ninja file deps from ExistentPathForSource on a
PackageVarContext in the config instead of the PackageContext, as
the PackageContext may be shared between multiple tests running
in parallel.

Test: all soong tests
Change-Id: Ib1809a4dd4a82696e0fe48a87eac21a44684ecb5
2020-11-17 10:50:19 -08:00
Colin Cross
06fa588d1a Store SingletonMakeVarsProviders in the config
Store SingletonMakeVarsProviders in the config instead of a global
variable to avoid races between tests running in parallel.

Test: all soong tests
Change-Id: I2ab64f368b5ac673fd985399d4421ed018abc562
2020-11-17 10:47:24 -08:00
Ivan Lozano
9b44383788 rust: Add header library support to rust_bindgen.
Allow rust_bindgen modules to define dependencies that only provide
headers and may not necessarily need to be linked in.

Bug: 161141999
Test: Soong tests pass.
Test: Example module has appropriate include flags when compiling.
Change-Id: Ic9ce8b1204008ad8dcb18766c914e48bb292d485
2020-11-17 13:40:50 -05:00
Treehugger Robot
9d69703838 Merge "Add keymint to vndk." am: beab64ea81
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1431273

Change-Id: I9c0c19a369dbfe758d682a572410fe6939da9a9a
2020-11-17 16:55:17 +00:00
Treehugger Robot
beab64ea81 Merge "Add keymint to vndk." 2020-11-17 16:13:50 +00:00
Ivan Lozano
1e034e7ce1 Merge "rust: Fix incorrect expected gcno file for dylibs" am: 3d0f191c35
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500970

Change-Id: I2450c40b1978ee8f9325239f00a4451b46406d50
2020-11-17 15:30:11 +00:00
Ivan Lozano
3d0f191c35 Merge "rust: Fix incorrect expected gcno file for dylibs" 2020-11-17 15:18:03 +00:00
Ivan Lozano
d7ddf051d3 rust: Fix incorrect expected gcno file for dylibs
For Rust dylibs we generate a file suffix of .dylib.so. rustc seems to
split the output filename for the gcno file at the first '.', so instead
of libfoo.dylib.gcno (which our build system expects), it produces
libfoo.gcno.

This fixes the mismatch so the build system can find the gcno file that
gets produced for Rust dylibs.

Bug: 170983066
Test: CLANG_COVERAGE=true NATIVE_COVERAGE_PATHS=external/rust/crates \
      m libandroid_log_sys
Change-Id: Icba48bf10ab06c255bd17053d57feb889b1f9ee5
2020-11-17 08:08:21 -05:00
Paul Duffin
0a72ce0d85 Merge "Switch boot jars package check to use dexdump xml output" am: 969ca6701c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496337

Change-Id: I4364d156c84c57acb4b01709a25a56b446e58e9e
2020-11-17 12:38:45 +00:00
Paul Duffin
969ca6701c Merge "Switch boot jars package check to use dexdump xml output" 2020-11-17 12:16:32 +00:00
Ulyana Trafimovich
c4232f60d6 Merge changes Iebfbf2ff,Ibd974268 am: d8d8e726a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1478656

Change-Id: I7d67b21e6f2590dd502f1212a70639160a5fafbc
2020-11-17 10:51:02 +00:00
Ulyana Trafimovich
d8d8e726a5 Merge changes Iebfbf2ff,Ibd974268
* changes:
  Rename fields and methods to reflect class loader context changes.
  Do not add dependencies of shared SDK libraries to manifest_fixer.
2020-11-17 10:22:00 +00:00
Jingwen Chen
7a5391a979 soong_ui's bazel.go: document/comment with tiny refactoring.
This patch adds information behind the Bazel USE_BAZEL=1 execution
pipeline.

Test: m
Bug: 173474588
Change-Id: I54bdd26fb14c8a371de0922d193419112e8c3ece
2020-11-17 03:46:23 -05:00
Yo Chiang
803c40daa2 prebuilt_etc: Improve comments and slight refactoring
Comment changes:
* Add top level package description.
* Clarify `OutputFileProducer` usage for `prebuilt_etc.src` field.
* Clarify output file basename selection rule.

Refactor changes:
* Don't emit superfluous `LOCAL_UNINSTALLABLE_MODULE := false` lines.
* `for _, i := range list { entry.AddStrings(prop, i) }` =>
  `entry.AddStrings(prop, list...)`

Bug: 173379413
Test: TH presubmit
Change-Id: Iab90aea5ff2497525ebe1600d3ce5a480923760a
2020-11-17 15:46:07 +08:00
Colin Cross
1e9bf4a2d4 Merge "Revert "Annotate dependency tags for dependencies of installed files"" am: e3d308b5a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500597

Change-Id: I4eff34a7b09bad10a0d76b977a61bd39734aaf98
2020-11-17 06:47:33 +00:00
Colin Cross
e3d308b5a5 Merge "Revert "Annotate dependency tags for dependencies of installed files"" 2020-11-17 06:32:57 +00:00
Colin Cross
b5ae193b8f Revert "Annotate dependency tags for dependencies of installed files"
This reverts commit 62a0cfd054.

Reason for revert: b/173475545

Change-Id: I4e834200c8e68dfa1b8144dfd1fa95ca68554980
2020-11-17 06:32:06 +00:00
Inseob Kim
f6d606ebea Always turn on compatible property
It's mandatory for devices launching with Android P or later.

Bug: 170082975
Test: m
Change-Id: I22578c3b77d28abc8a09b88324ef3702d0ccafde
2020-11-17 06:29:23 +00:00
Sasha Smundak
8eedba6184 Document usage, perform minor cleanups.
Test: treehugger
Bug: 173466220
Change-Id: I5aa09c2941c0eceb8ae635b9e613ad932d38aebb
2020-11-16 19:00:27 -08:00
Treehugger Robot
43cc7f16f6 Merge "Always set apex_available in SDK snapshots." am: 0a829f2a0a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1484480

Change-Id: I7dd77ce55b90ef6ffa0b7128444f41af9bc8c76f
2020-11-17 02:05:13 +00:00
Joseph Murphy
10fa2d924e Merge "Adds a workaround to fix version inconsistency" am: bac4ee008b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1402212

Change-Id: If3d9546e4ca2c0dc7e41c96e05a1fef79cee5ffd
2020-11-17 02:02:32 +00:00
Treehugger Robot
0a829f2a0a Merge "Always set apex_available in SDK snapshots." 2020-11-17 01:30:46 +00:00
Joseph Murphy
bac4ee008b Merge "Adds a workaround to fix version inconsistency" 2020-11-17 01:23:39 +00:00
Jose Galmes
f729458e69 Support for recovery snapshot.
Bug: 171231437
Test: source build/envsetup.sh
Test: ALLOW_MISSING_DEPENDENCIES=true m -j nothing

Change-Id: I6b35fbb0b90ffffa941ea108cbd31a454b2dd403
2020-11-16 17:09:36 -08:00
Jingwen Chen
f8835ce575 Merge "Set PATH and --action_env=PATH for the Bazel build in soong_ui." am: 556dafcdbf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1499283

Change-Id: I864ce9a102b150c13d129852e774660e20d2de8f
2020-11-17 00:14:40 +00:00
Jaewoong Jung
f2200adccb Add and update comments in env and android_env.go
Bug: 173450116
Test: m nothing
Change-Id: I582a483d11c2ca23fd6e9597e49cdfb7e69152de
2020-11-16 16:01:27 -08:00
Jingwen Chen
556dafcdbf Merge "Set PATH and --action_env=PATH for the Bazel build in soong_ui." 2020-11-16 23:51:10 +00:00
Colin Cross
e37a8e2d51 Merge "Replace android.WriteFile rule with android.WriteFileRule" am: 1af783fae7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498169

Change-Id: I6745509020145188d097044af68c3643036c0872
2020-11-16 23:37:18 +00:00
Colin Cross
6ae2d3dc85 Merge changes Ic22603a5,I5330b571 am: f15c0558bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1494957

Change-Id: Ibc07bacf48fc50738b6e3302daf08258b98c2f70
2020-11-16 23:36:32 +00:00
Colin Cross
1af783fae7 Merge "Replace android.WriteFile rule with android.WriteFileRule" 2020-11-16 23:11:41 +00:00
Colin Cross
f15c0558bf Merge changes Ic22603a5,I5330b571
* changes:
  Annotate dependency tags for dependencies of installed files
  Use the the preferred architecture symlink as the tool path if it exists
2020-11-16 23:11:10 +00:00
Treehugger Robot
18878365a6 Merge "Fix bug in python module hasExtention." am: bc1f77e590
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500870

Change-Id: I441efad8ab0bb8c5bca42d4244fc7f1d23be741e
2020-11-16 23:08:22 +00:00
Treehugger Robot
bc1f77e590 Merge "Fix bug in python module hasExtention." 2020-11-16 22:56:52 +00:00
Liz Kammer
3dfd3ce478 Fix bug in python module hasExtention.
Test: m nothing
Test: soong go tests
Change-Id: I1944a3bbb871bc1021c841d944e765bb0cadba86
2020-11-16 11:30:55 -08:00
Dan Shi
d79572f73e Add unit_test test option in test configs
This change allows a test (native, java, rust or python) to be included
in host-unit-tests suite when test option `unit_test` is set to true.

Bug: 172006742
Test: m host-unit-tests
Change-Id: I69d3eb5b51198c549e2e6914ceac3a4fc33c3cf2
2020-11-16 11:05:00 -08:00
Paul Duffin
cd4f673ceb Switch boot jars package check to use dexdump xml output
The xml output from dexdump is more stable than the text output so this
change switches to use that.

Bug: 171479578
Test: m check-boot-jars - for failing and passing cases
Change-Id: Ie347b1b685951524d5ae09db280248c61b4228ee
2020-11-16 17:46:16 +00:00