Commit Graph

35462 Commits

Author SHA1 Message Date
Inseob Kim
67e5add194 Add sepolicy related variables
Bug: 33691272
Test: try building with SELINUX_IGNORE_NEVERALLOWS := true
Change-Id: Id2aa450740d412af7ac66f096fa2121957964cac
2021-03-17 18:39:03 +09:00
Lukács T. Berki
236e3ffac0 Merge "Remove global variables from Blueprint." am: 645610e791 am: 98717b621c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629620

Change-Id: Ibe055a60dd02322173e6c9d5386ed28d08010a93
2021-03-17 08:14:29 +00:00
Lukács T. Berki
98717b621c Merge "Remove global variables from Blueprint." am: 645610e791
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629620

Change-Id: Ib3d44ccde559f61758d6e7e4e841f3e171d19aaf
2021-03-17 07:38:29 +00:00
Lukacs T. Berki
d1e3f1ff08 Embed minibp into soong_ui.
This requires linking Blueprint into soong_ui. It lets us avoid the
complicated dance of Ninja files and shell scripts: now the information
as to how soong_build is built is passed directly to Blueprint using a
struct that contains all the information the command line arguments used
to contain.

The ability to run Blueprint from the command line is kept (for now).

Some variables in bootstrap/command.go needed public accessor functions
because soong_build reads them. This will be disentangled by moving the
flag parsing to soong_build.

The presence of the flag definitions in Blueprint means that soong_ui
now also accepts them. This is not a problem in practice because they
are ignored and because soong_ui itself is hidden behind a few layers of
shell scripts.

Test: Presubmits + the new bootstrap_test.sh .
Change-Id: I6dca478f356f56a8aee1e457d71439272351390b
2021-03-17 08:35:52 +01:00
Lukács T. Berki
645610e791 Merge "Remove global variables from Blueprint." 2021-03-17 07:08:24 +00:00
Yuexi Ma
f963e4479e Merge "Export a few utility methods" am: b96a04ba49 am: b2bfff678e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620219

Change-Id: I78ea84a8ab77b6df96f98ab0e6ee766ce4397892
2021-03-17 03:07:35 +00:00
Jooyung Han
092ef811a0 Fix PackagingBase.CopyDepsToZip
CopyDepsToZip() zips direct dependencies with tags implementing
PackagingItem interface.

Previously, it relied on InstallNeededDependencyTag which has a
different meaning.
- InstallNeededDependencyTag tells whether a dependency is required to
  be installed together.
- PackagingItem tells whether a dependency (of PackagingBase) is
  required to be packaged.

With the separation of InstallNeededDependencyTag and PackagingItem,
PackagingBase module can distinguish cases which were not available
before.(I = InstallNeededDependencyTag, P = PackagingItem)

   a (PackagingBase module)
   |
   |`--(I)--> b
   |
   |`--(P)--> c --(I)--> d
   |
    `--(I/P)--> e

a's CopyDepsToZip(): [c, d, e]

Test: m nothing (packaging_test)
Change-Id: I71fce29b19b0f00dc394981bcf4240e9c1041c7a
2021-03-17 11:54:53 +09:00
Yuexi Ma
b2bfff678e Merge "Export a few utility methods" am: b96a04ba49
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1620219

Change-Id: Id2ff7ae6bf144abbcae1c5492d59ffcbc0b8c9fb
2021-03-17 02:25:07 +00:00
Yuexi Ma
b96a04ba49 Merge "Export a few utility methods" 2021-03-17 01:40:51 +00:00
Treehugger Robot
12ba71767b Merge "Fix removing partial zip file on error" am: eb32d6c2a6 am: c7a7d6e589
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638102

Change-Id: Id5ded968d4d3b5e7595ca60b256f17c3fd1a56cc
2021-03-17 01:00:17 +00:00
Martin Stjernholm
b79c7f1101 Run InitAndroidArchModule last in factory functions.
It calls InitAndroidModule which retrieves the properties, so all
AddProperties must go before it.

Test: `m nothing` with new ART prebuilt drop that has a
  prebuilt_boot_image module.
Bug: 177892522
Change-Id: Ia09db9ef17148d36d8d4f25df3f1bf4f528a2fc8
2021-03-17 00:31:15 +00:00
Treehugger Robot
c7a7d6e589 Merge "Fix removing partial zip file on error" am: eb32d6c2a6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1638102

Change-Id: Ie6f3f77ed93cc795dc3bc6d65327682b3513fecd
2021-03-17 00:11:57 +00:00
Colin Cross
5a756a63e4 Check for frameworks/base/Android.bp instead of frameworks/base
Calling ExistentPathForSource from a PackageVarContext has to fall
back to a less optimal glob dependency implementation that adds the
file to out/soong/build.ninja.d.  Checking for "frameworks/base"
adds the directory to build.ninja.d, resulting in any writes to that
directory potentially causing a regeneration.  Check for
"frameworks/base/Android.bp", which will already cause a regeneration
if its timestamp changes and therefore not increase regenerations.

Bug: 158342713
Test: m nothing && touch frameworks/base/foo && m nothing
Change-Id: Iac7ac0445dbaa365c90e9a012f1f32020afc6c08
2021-03-16 23:55:50 +00:00
Bob Badour
9e93e82d9d [automerger skipped] Minimal license feature. am: dc5be9099b am: 2c75333a45 -s ours
am skip reason: skip tag Change-Id Ie7e1695ecb8cd943124426a0cad2c0d1db2b46ed with SHA-1 37af046002 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/13879853

Change-Id: I404ce73c71e9fa2556f1d8de4bb3f792fdce2e00
2021-03-16 23:54:18 +00:00
Colin Cross
c590ec4bda Fix sbox in chdir mode
When running commands in chdir mode sbox needs to translate the
directory placeholders to paths relative to the sandbox directory
instead of relative to the top of the source tree.

Also translate relative PATH entries into absolute paths so they
are still valid when the current directory is changed.

Bug: 182612695
Test: manual
Change-Id: Idcbe20466888909d423d62788bc9c35f4e03b398
2021-03-16 16:53:23 -07:00
Colin Cross
5334edd2f3 Check RuleBuilder temporaries for path errors
Output files in sandboxed RuleBuilder rules must be under the output
directory, but output paths that were marked as temporaries were
not error checked.

Bug: 182612695
Test: rule_builder_test.go
Change-Id: I09616402ef1637c2c455ec7d345a296711582e8f
2021-03-16 16:53:23 -07:00
Colin Cross
1c217fdc96 Fix WriteFileRule escaping
WriteFileRule shouldn't force the caller to ninja escape the input,
and should shell escape spaces.

Bug: 182612695
Test: manual
Change-Id: Ide2f1ed92783eef7883279238de209d992d8f735
2021-03-16 16:53:23 -07:00
Colin Cross
b70a1a900a Remove unescaped spans support from RuleBuilder
Now that rsp files use an explicit path instead of $out.rsp the
unescaped spans and NinjaEscapedCommands() support can be removed
from RuleBuilder.

Bug: 182612695
Test: rule_builder_test.go
Change-Id: I6705151ff0528c59aa1af56ee52c294da15a7a66
2021-03-16 16:53:20 -07:00
Colin Cross
70c4741215 Add explicit rspfile argument to RuleBuilderCommand.FlagWithRspFileInputList
Using $out.rsp as the rsp file adds extra complexity around keeping
the $ unescaped.  Make callers to FlagWithRspFileInputList provide
an explicit path for the rsp file instead.

Bug: 182612695
Test: rule_builder_test.go
Change-Id: I3f531d80c1efa8a9d09aac0a63790c5b11a9f0c6
2021-03-16 16:52:56 -07:00
Colin Cross
4502978bee Ninja escape RuleBuilder rule params
The CommandDeps and Rspfile properties can contain arbitrary paths
that may need ninja escaping.

Bug: 182612695
Test: genrule_test.go
Change-Id: I1426e9dfeab3bde9f65b61d0c47840f97c1c7526
2021-03-16 16:52:54 -07:00
Treehugger Robot
eb32d6c2a6 Merge "Fix removing partial zip file on error" 2021-03-16 23:46:53 +00:00
Christian Wailes
a537f721d5 Merge "Add test suite to legacy core platform allowlist." am: 7d1f1cf27c am: ae3f51b415
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634799

Change-Id: Ib38b47e0cd3579a0041a6446c12d2843607f77e5
2021-03-16 23:35:50 +00:00
Christian Wailes
ae3f51b415 Merge "Add test suite to legacy core platform allowlist." am: 7d1f1cf27c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634799

Change-Id: I562ae1aaa6421be7b1cf43fbd91870beb12652da
2021-03-16 23:16:42 +00:00
Bob Badour
2c75333a45 Minimal license feature. am: dc5be9099b
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/13879853

Change-Id: Ib49755e526c64d8cbaee4e6d26133321b66bd535
2021-03-16 23:15:55 +00:00
Christian Wailes
7d1f1cf27c Merge "Add test suite to legacy core platform allowlist." 2021-03-16 23:02:39 +00:00
Yuexi Ma
627263fece Export a few utility methods
Add a few utility methods to support generating TradeFed test plan in C-Suite

Test: go test .
Change-Id: I86a505068b5d5aa0f5a37b3e3a2465839a7480ef
2021-03-16 15:57:59 -07:00
Liz Kammer
f0946b0715 Merge "Temporarily disable cc_objects in mixed builds" am: 39d3830205 am: f84f690929
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1640582

Change-Id: I81922d74dedadca33819c479f2715b5a98cfd60f
2021-03-16 22:35:11 +00:00
Liz Kammer
dd93334831 Merge changes from topic "mixed-bp2build" am: a5f86249a4 am: 2b6af78207
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607554

Change-Id: I77644f950488e2d422497a274f584365f54c6dd0
2021-03-16 22:35:08 +00:00
Jaewoong Jung
b348954705 Merge "Improve java.go readability." am: 9f315dea28 am: b163cc04ce
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1627239

Change-Id: Ia0b76e8b4bb0c366a9254052e2f2fe5bfc74701d
2021-03-16 22:34:59 +00:00
Christopher Parsons
8e0d430822 Merge "Refactor and cleanup of cquery processing" am: bc3f7e0276 am: 70f670df1a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629139

Change-Id: I51364b6e51731743fb37abcb5043622aeecc8e75
2021-03-16 22:34:47 +00:00
Liz Kammer
f84f690929 Merge "Temporarily disable cc_objects in mixed builds" am: 39d3830205
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1640582

Change-Id: I7097cbeda45737ebec339ec4d4a51f4ea3d3fa7d
2021-03-16 21:54:54 +00:00
Liz Kammer
2b6af78207 Merge changes from topic "mixed-bp2build" am: a5f86249a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1607554

Change-Id: Ife9676229ca007e495bf9ed54d877f4d2cb3b9ea
2021-03-16 21:54:50 +00:00
Jaewoong Jung
b163cc04ce Merge "Improve java.go readability." am: 9f315dea28
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1627239

Change-Id: I6194d9aec2579cad62d497298c888d35f3d70cff
2021-03-16 21:54:34 +00:00
Christopher Parsons
70f670df1a Merge "Refactor and cleanup of cquery processing" am: bc3f7e0276
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1629139

Change-Id: I547f447372fbc4b40e72eef2d4f9f9c72fef47e6
2021-03-16 21:53:42 +00:00
Liz Kammer
39d3830205 Merge "Temporarily disable cc_objects in mixed builds" 2021-03-16 21:40:04 +00:00
Liz Kammer
a5f86249a4 Merge changes from topic "mixed-bp2build"
* changes:
  Support autoconverted modules in mixed builds
  Use handcrafted build targets in bp2build
2021-03-16 21:40:04 +00:00
Jaewoong Jung
9f315dea28 Merge "Improve java.go readability." 2021-03-16 21:32:48 +00:00
Christopher Parsons
bc3f7e0276 Merge "Refactor and cleanup of cquery processing" 2021-03-16 21:12:01 +00:00
Treehugger Robot
7be2dbdc41 Merge "Don't depend on nonexistent manifest when manifest_check is disabled." am: 8974f1706e am: da4eb03a9d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1640322

Change-Id: I493923edaea177492800a001dfd80a7d3ea17c3d
2021-03-16 21:11:26 +00:00
Treehugger Robot
da4eb03a9d Merge "Don't depend on nonexistent manifest when manifest_check is disabled." am: 8974f1706e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1640322

Change-Id: Ifdc914d783cca30b21f94e20d5da54a948536b75
2021-03-16 20:34:12 +00:00
Treehugger Robot
8974f1706e Merge "Don't depend on nonexistent manifest when manifest_check is disabled." 2021-03-16 20:02:42 +00:00
Liz Kammer
bdc609972c Support autoconverted modules in mixed builds
modules converted with bp2build_available are will also be available to
be used in mixed builds.

Test: build/bazel/scripts/milestone-2/demo.sh full
Test: go tests
Change-Id: I49f16ec3ba5bb11dfed8066af069c27eb04371fb
2021-03-16 15:11:49 -04:00
Bob Badour
dc5be9099b Minimal license feature.
Keeps license declarations from breaking the build without implementing
the full feature.

Test: m all

Bug: 181768532

Change-Id: Ic78672cd25da13aa9078a48b06446f66780c792d
Merged-in: If3fbc157c6ffed8e3ee4bdd9aa56fabe2c24444b
Merged-in: Ie7e1695ecb8cd943124426a0cad2c0d1db2b46ed
2021-03-16 18:53:03 +00:00
Chris Parsons
944e7d01aa Refactor and cleanup of cquery processing
Test: USE_BAZEL_ANALYSIS=1 m libc
Change-Id: Iaf9a92e84d39c132e2444a8aaafd79505a12b8ec
2021-03-16 14:39:16 -04:00
Liz Kammer
57355683d4 Temporarily disable cc_objects in mixed builds
Bug: 181794963
Test: generate bp2build targets and run mixed builds
Change-Id: If4562fe8ed7bde88141b40166eca9d01f6538106
2021-03-16 13:34:48 -04:00
Paul Duffin
db6fe68b71 Merge "Fix hiddenapi tests to work without javaMockFS()" am: 248f386558 am: 609df5c2ca
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634630

Change-Id: Ie65ddae0cde35a55da648eebd2ea76a37498963e
2021-03-16 16:20:24 +00:00
Paul Duffin
1a2f26004a Merge "Convert hiddenapi tests to use test fixtures" am: af0379ca9c am: 5308375fd4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634629

Change-Id: Ib6affe3d3dfa3808527aee36e4ce93c8e82283d3
2021-03-16 16:20:20 +00:00
Paul Duffin
971fbecedd Merge "Fix TestJavaSdkLibrary... tests to work without javaMockFS()" am: ebca5e6a68 am: a6ece5dde2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634628

Change-Id: Ieeb6d2e683a7b401a5d63c61085ca6e9110756a8
2021-03-16 16:20:16 +00:00
Paul Duffin
b75252399c Merge "Convert JavaSdkLibrary... tests in java package to test fixtures" am: fb3fc0cf40 am: dcdefb6b53
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1634627

Change-Id: Ib14f15d4b27741b92f51a2a17d738c993da88505
2021-03-16 16:20:12 +00:00
Justin DeMartino
1bbe7b54ec Merge "Allow extending of the list of directories to be scanned for VSDK" am: dd1decf7f6 am: e7c7a5e8d6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1603623

Change-Id: I90ee8cf8666361550b493cd5fe9082f719378baf
2021-03-16 16:20:02 +00:00