Commit Graph

28760 Commits

Author SHA1 Message Date
Treehugger Robot
efe4519b1d Merge "Always set apex_available in SDK snapshots." am: 0a829f2a0a am: 43cc7f16f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1484480

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

Change-Id: I96c76a98e0d58de2d30e617d0b0c0017da041800
2020-11-17 02:25:10 +00: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
Jingwen Chen
49f1583bcc Merge "Set PATH and --action_env=PATH for the Bazel build in soong_ui." am: 556dafcdbf am: f8835ce575
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1499283

Change-Id: I7019b863df1924cb3bd8aeeb882c4298f8460830
2020-11-17 01:48:11 +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
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
Colin Cross
104085c573 Merge "Replace android.WriteFile rule with android.WriteFileRule" am: 1af783fae7 am: e37a8e2d51
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498169

Change-Id: I016d612e91f099b0291771d040a42f24ec34154c
2020-11-17 00:11:09 +00:00
Colin Cross
24e1b2cff9 Merge changes Ic22603a5,I5330b571 am: f15c0558bf am: 6ae2d3dc85
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1494957

Change-Id: Iaa74ee6698241d8f83cb0c4223f2f56ac60c0f53
2020-11-17 00:11:02 +00:00
Treehugger Robot
0b22c47235 Merge "Fix bug in python module hasExtention." am: bc1f77e590 am: 18878365a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500870

Change-Id: I96889090f170fcabeecf391a9f4719290819aeab
2020-11-17 00:10:24 +00: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
Ulyana Trafimovich
ce8cd22021 Merge "Add nested class loader subcontext at the proper hierarchy level." am: 0066864a02 am: c5bb9fe652
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1486218

Change-Id: I7fb72c42608f1de55f9660a98ea69e8141c8b711
2020-11-16 17:51:21 +00:00
Ulyana Trafimovich
8fdfb14593 Merge "Disallow adding nested conditional class loader context." am: adff039572 am: 946355e8c9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1486217

Change-Id: I7b1d23355d06fa472f6af239b52a5ad1d64616a9
2020-11-16 17:51:08 +00:00
Ulyana Trafimovich
c5bb9fe652 Merge "Add nested class loader subcontext at the proper hierarchy level." am: 0066864a02
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1486218

Change-Id: I505c2312faafa828c46ec6564decf1cd71530cba
2020-11-16 17:35:39 +00:00
Ulyana Trafimovich
946355e8c9 Merge "Disallow adding nested conditional class loader context." am: adff039572
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1486217

Change-Id: Idd1a48528d5e60aafb50f75cacfa7247f10efb65
2020-11-16 17:35:07 +00:00
Ulyana Trafimovich
0066864a02 Merge "Add nested class loader subcontext at the proper hierarchy level." 2020-11-16 17:17:29 +00:00
Ulyana Trafimovich
adff039572 Merge "Disallow adding nested conditional class loader context." 2020-11-16 17:17:05 +00:00
Ulyana Trafimovich
0d8cbed1b3 Merge "Rework class loader context implementation." am: af335a4694 am: 2084c86c1f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1450818

Change-Id: Ia13cf414e8a2057acf5c7a07f590fd5f4ee001a0
2020-11-16 15:35:03 +00:00
Ulyana Trafimovich
2084c86c1f Merge "Rework class loader context implementation." am: af335a4694
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1450818

Change-Id: I1a3b0e0a3dc1df4fa8104c810cc63b686ac8e073
2020-11-16 15:08:43 +00:00
Ulya Trafimovich
18554243de Add nested class loader subcontext at the proper hierarchy level.
When adding a subcontext in a class loader context tree, there are two
possible cases: 1) the root of the subcontext is itself a <uses-library>
and should be present as a node in the tree, or 2) the root is not a
<uses-library>, but some of its dependencies are -- in that case they
should be disconnected from the root, and the resulting forrest should
be added at the top-level.

Example:

  1) C is a <uses-library>:

     A
     ├── B
     └── C
         ├── D
         └── E
             └── F

  2) C is not a <uses-library>:

     A
     ├── B
     ├── D
     └── E
         └── F

Before the patch subcontexts for transitive dependencies were added
before the subcontext for the direct dependency (even if it was a
<uses-library>, resulting in case-2 hierarchy when case-1 should have
been used. Previosuly this didn't matter because class loader context
was a flat set of libraries, but now it matters because class loader
context is a tree.

This patch changes the order in which libraries are added, so that
direct dependencies are added before transitive ones. The context adding
method now accepts an "implicit root" parameter, so that when adding
transitive dependencies it can check if the corresponding direct
dependency is a <uses-library> and already present in the context.

Partially constructed class loader context is now propagated top-down
into aapt.buildActions, so that the method can use existing part of the
context to decide where the missing part should be connected.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I649aff9e27494306885a4f4fc90226c399636b57
2020-11-16 14:57:05 +00:00
Ulyana Trafimovich
af335a4694 Merge "Rework class loader context implementation." 2020-11-16 14:50:11 +00:00
Jooyung Han
7126f7958d Remove "apex_uses" mutator am: 74f576de58 am: 1ff456f5de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498491

Change-Id: I287abdc10e5de20750adfc64a6d909f1e31fe26e
2020-11-16 13:15:52 +00:00
Jooyung Han
1ff456f5de Remove "apex_uses" mutator am: 74f576de58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498491

Change-Id: I1406da3d598abff84c677aae00d2620eed315d5c
2020-11-16 12:48:41 +00:00
Ulya Trafimovich
5e13a7307e Disallow adding nested conditional class loader context.
Nested conditional context doesn't make sense because conditional
context is only needed for compatibility libraries, and those are only
used by apps, and apps are always at the root of class loader context
tree. Therefore, trying to add conditional nested context can only mean
an error somewhere on the way.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: Iadeaaf89fdb11cb23b107c6fb074b1bc765256be
2020-11-16 12:17:30 +00:00
Jingwen Chen
3a4b58dc5d Set PATH and --action_env=PATH for the Bazel build in soong_ui.
Ensures that Bazel and Ninja are using the same binaries from PATH, such
as `sort` from the linked bug.

Test: USE_BAZEL=1 m
Test: rm out/soong/apex/depsinfo/new-allowed-deps.txt && USE_BAZEL=1 m
Bug: 161074854
Fixes: 161074854
Change-Id: Icc3e717e6d3cfcecfe90f0fb3a94a86485a11918
2020-11-16 04:47:14 -05:00
Jooyung Han
74f576de58 Remove "apex_uses" mutator
which was added to support built-time common apex. But the common apex
was abandoned and it is used nowhere.

This is a manual revert of 5c998b9ff8.

Bug: 173329465
Test: m
Change-Id: I684e6b8bfe2ef5b53943329f4aaa5a5ccba27738
2020-11-16 09:08:30 +00:00
Colin Cross
cf371cc1f7 Replace android.WriteFile rule with android.WriteFileRule
The android.WriteFile rule takes careful escaping to produce the
right contents.  Wrap it in an android.WriteFileRule that handles
the escaping.

Test: compare all android.WriteFile outputs
Change-Id: If71a5843af47a37ca61714e1a1ebb32d08536c31
2020-11-14 16:26:00 -08:00
Colin Cross
62a0cfd054 Annotate dependency tags for dependencies of installed files
Soong currently assumes that installed files should depend on
installed files of all transitive dependencies, which results
in extra installed file dependencies through genrules, static
libs, etc.

Annotate dependency tags for dependencies for which the
installed files are necessary such as shared libraries
and JNI libraries.

This avoids extra installed files, and is also a first step
towards genrules using their own copy of tools instead of
the installed copy.

Bug: 124313442
Test: m checkbuild
Test: java.TestBinary
Test: cc.TestInstallSharedLibs
Test: deptag_test.go
Change-Id: Ic22603a5c0718b5a21686672a7471f952b4d1017
2020-11-14 16:24:10 -08:00
Colin Cross
a615901b53 Use the the preferred architecture symlink as the tool path if it exists
When a genrule uses a binary with symlink_preferred_arch set as a tool,
use the symlink instead of the binary as the tool, as the symlink is
the more canonical name for the binary.

Test: m checkbuild
Change-Id: I5330b57139f03ca07bf70547261f191ed84ec9b8
2020-11-14 14:38:34 -08:00
Jingwen Chen
dba7fbe149 Merge "Add 'pre-production' description to queryview action." am: 1d26d3033a am: fd08e45584
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1497906

Change-Id: Ie8aedb43f5db7e9f7d4568e44713bd76e79f4306
2020-11-14 08:47:03 +00:00
Jingwen Chen
fd08e45584 Merge "Add 'pre-production' description to queryview action." am: 1d26d3033a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1497906

Change-Id: I89f2cd746c9d96455f20c4d84de6731f2fc7471c
2020-11-14 08:33:42 +00:00
Jingwen Chen
1d26d3033a Merge "Add 'pre-production' description to queryview action." 2020-11-14 08:05:35 +00:00
Treehugger Robot
b8316056fe Merge "Pass Config to NewTestContext instead of ctx.Register" am: ceed6be00d am: 748ecd135f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480601

Change-Id: I2be87bd643ea2352f3de3579b43f0afe7abd55a4
2020-11-14 06:43:49 +00:00
Treehugger Robot
748ecd135f Merge "Pass Config to NewTestContext instead of ctx.Register" am: ceed6be00d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1480601

Change-Id: Idc791387f2ced40abe768395717fee33e3650e4f
2020-11-14 06:12:21 +00:00
Treehugger Robot
ceed6be00d Merge "Pass Config to NewTestContext instead of ctx.Register" 2020-11-14 05:58:58 +00:00
Patrice Arruda
22a63966cc Remove unnecessary break and default statements in metrics.go file. am: 33e7f6a0ca am: 62c4767433
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498207

Change-Id: I61df9b19a0b9d098efafd6e5f9e515c4ec77c4f1
2020-11-14 02:02:28 +00:00
Patrice Arruda
ccb311166f Add tracer to runBazel function. am: b7cf9ba175 am: 047210ca6c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498206

Change-Id: I6083852ee8cc035033860bf26ad3d5480e1c2cf0
2020-11-14 02:02:27 +00:00
Patrice Arruda
6d24fd684f Enable bazel metrics from ninja build. am: 18cb70d645 am: 9bfa4625c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498204

Change-Id: I3bfbd4e943c4a0e7057c28044682eb0c8e49bab3
2020-11-14 02:02:24 +00:00
Patrice Arruda
6c6d04824e Define the bazel_metrics directory in $OUT. am: af880da0c4 am: 713775b1c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498164

Change-Id: I8ca22b452f1dc26ec506874c4ec4a389483c1b5f
2020-11-14 02:02:22 +00:00
Patrice Arruda
fa6a7f3ed5 Add bazel profile related functions in paths.go am: 24a086b3dc am: a5e6074855
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498163

Change-Id: I6c0ac2d091910b712e856ac669444d0c84efd858
2020-11-14 02:02:20 +00:00
Patrice Arruda
79ee48f804 Define UseBazel in Config am: 0c1c456643 am: 5439d1cf68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1496658

Change-Id: I3d6f7ee9b693a9e3551e51165aacc4179733c755
2020-11-14 02:02:17 +00:00
Patrice Arruda
62c4767433 Remove unnecessary break and default statements in metrics.go file. am: 33e7f6a0ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498207

Change-Id: Ia0b372fc8173b137061773e12e85b121d0187344
2020-11-14 01:43:39 +00:00