Commit graph

31784 commits

Author SHA1 Message Date
Christopher Parsons
f7fd7642f5 Merge "Improve commenting of cc/binary.go." am: dc71a6e28a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507117

Change-Id: I367db221d4e901a7dbb05fc0d1ed61d7ded8bb70
2020-11-24 20:51:03 +00:00
Christopher Parsons
dc71a6e28a Merge "Improve commenting of cc/binary.go." 2020-11-24 20:34:39 +00:00
Colin Cross
f9db940d1d Merge changes I8af00c8c,Ia526ae89 am: 38214f5ac5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507118

Change-Id: I54570474a0d1322834a99a4f11e8589b72429af8
2020-11-24 20:04:30 +00:00
Colin Cross
38214f5ac5 Merge changes I8af00c8c,Ia526ae89
* changes:
  Reland: Rewrite sbox to use a textproto manifest
  Fix gensrcs subdirs
2020-11-24 19:27:35 +00:00
Colin Cross
d1b7d243f6 Merge "Annotate dependency tags for dependencies of installed files" am: e5218b6be6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501613

Change-Id: I29f5c5530533bb622d794d92b78ec5b097068d34
2020-11-24 16:39:06 +00:00
Colin Cross
e5218b6be6 Merge "Annotate dependency tags for dependencies of installed files" 2020-11-24 16:01:35 +00:00
Thiébaud Weksteen
406eb4de58 Merge "Add comments to {cc,rust}/strip.go" am: f503dc3ba1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505851

Change-Id: I545206ed4a1ae09a31ed3a4a83104fb69189808c
2020-11-24 09:57:40 +00:00
Treehugger Robot
193f196b28 Merge "Refactor queryview templates into a different file." am: fbb138cd7e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502735

Change-Id: Ia0ab3ff3454644257206c3add9627c16557654b1
2020-11-24 09:56:16 +00:00
Treehugger Robot
e858060189 Merge "Fail if non-allowlisted host system tool is used." am: 5bca812a4e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508062

Change-Id: Id458d82f57fece0a03f6ef04345a1b7721d21d65
2020-11-24 09:52:40 +00:00
Thiébaud Weksteen
f503dc3ba1 Merge "Add comments to {cc,rust}/strip.go" 2020-11-24 08:39:28 +00:00
Treehugger Robot
fbb138cd7e Merge "Refactor queryview templates into a different file." 2020-11-24 07:54:51 +00:00
Treehugger Robot
5bca812a4e Merge "Fail if non-allowlisted host system tool is used." 2020-11-24 07:02:30 +00:00
Treehugger Robot
8f80c21ddd Merge "Remove restriction on exported plugins that generate APIs" am: 547471cffc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506204

Change-Id: I7d736d2ee08b1f80bedde2e02eccae2678706e6d
2020-11-24 05:46:39 +00:00
Treehugger Robot
bca26b52d2 Merge "Documenting apex/apex.go" am: 333d235475
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505673

Change-Id: I6159382d3975aa089239e07d5b6a0d95bc834734
2020-11-24 05:45:55 +00:00
Treehugger Robot
547471cffc Merge "Remove restriction on exported plugins that generate APIs" 2020-11-24 05:06:40 +00:00
Treehugger Robot
333d235475 Merge "Documenting apex/apex.go" 2020-11-24 05:05:30 +00:00
Jingwen Chen
628217737c Merge "Refactor 'in_make' to mean Kati is not skipped." am: f87a720101
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508061

Change-Id: I30df954a9783c2957062444afc7c2cddf35eee6f
2020-11-24 02:25:46 +00:00
Jingwen Chen
f87a720101 Merge "Refactor 'in_make' to mean Kati is not skipped." 2020-11-24 02:09:21 +00:00
Colin Cross
e9fe2949b8 Annotate dependency tags for dependencies of installed files
Relands Ic22603a5c0718b5a21686672a7471f952b4d1017 with a minor
change to track libc++ dependencies for python hosts and after
a fix to an internal genrule that depended on transitively
installed java libraries (ag/13068670).

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: I725871249d561428e6f67bba6a7c65b580012b72
2020-11-23 18:06:08 -08:00
Jingwen Chen
b8d050b344 Merge "Move bazel_module property to a common file, and add it to filegroup." am: 1b461e41bd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505511

Change-Id: I0db3056a3c95c97782dd3d8fd8796a8527954143
2020-11-24 02:01:40 +00:00
Jingwen Chen
8ad45eb9c0 Merge "Delete check for EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." am: 1ad9dc00a0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507554

Change-Id: I667ff5aba524a637f7451389857436adab2ef9cf
2020-11-24 02:00:45 +00:00
Jingwen Chen
1b461e41bd Merge "Move bazel_module property to a common file, and add it to filegroup." 2020-11-24 01:54:43 +00:00
Jingwen Chen
2838c818da Fail if non-allowlisted host system tool is used.
This CL improves the clarity of the non-hermetic nature of using
HostSystemTools, and make the build fail if a caller tries to use a host
system tool that isn't allowlisted in config.go.

The only caller seems to be for xcrun, which is a special case that is
pretty hard to remove.

Test: TH presubmit
Change-Id: Icd3e7330406a08c00ac9682e37e2d42669f2e6b7
2020-11-23 20:43:41 -05:00
Jingwen Chen
1ad9dc00a0 Merge "Delete check for EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9." 2020-11-24 01:12:02 +00:00
Jiyong Park
c0ec6f99d7 Documenting apex/apex.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reording functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m

Change-Id: Ie1799c0972d63da823ad375f008018de782529d1
2020-11-24 09:28:50 +09:00
Colin Cross
c215e19b15 Merge changes I0f2f0e41,Ib034140c,I4b2ca283 am: d2d8fd6f51
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1508060

Change-Id: I83b847b67e4fd0ed5a19866b83a7ba7314cdb464
2020-11-24 00:09:38 +00:00
Colin Cross
d2d8fd6f51 Merge changes I0f2f0e41,Ib034140c,I4b2ca283
* changes:
  Add java_data parameter to python modules
  Use local variations for python version splits
  Support SourceFileProducer in android.OutputFilesForModule
2020-11-23 23:20:06 +00:00
Colin Cross
c9fe10f5b8 Remove restriction on exported plugins that generate APIs
hilt_android requires seven separate annotation processors, which
is only feasible to support using exported_plugins to avoid having
to list all seven in every module that uses it.  Unfortunately they
all set generates_api: true.  Turbine is already disabled for modules
that directly use a plugin that sets generates_api: true, because
turbine doesn't run annotation processors.  Also add support for
disabling turbine if a module transitively uses a plugin that
generates APIs via exported_plugins.

Bug: 173397767
Test: TestExportedPlugins
Change-Id: If70354a3dd67efb4ce88bc9c934d41ccb6241b28
2020-11-23 11:42:26 -08:00
Xin Li
5bdb16b6b4 Mark ab/6881855 as merged
Bug: 172690556
Change-Id: Icfc9a629b7231567922930a46c2f2dc6878f8414
2020-11-23 11:27:06 -08:00
Colin Cross
1bc63938f0 Add java_data parameter to python modules
csuite has a python module that wants to embed the outputs of java
modules.  This has caused issues with mismatched variants bewteen
the arch-specific python module and the common java modules.  Add
a java_data property that is similar to the data property but
uses the common arch variant.

Bug: 173977903
Test: m checkbuild
Change-Id: I0f2f0e4159650cd5d42b510d5177678e7ee91b4d
2020-11-23 18:35:55 +00:00
Colin Cross
e20113d8ab Use local variations for python version splits
Use a local variation for python version splits.  This causes
dependencies from python modules not to look for variations
that match the version split, which will simplify a python module
depending on a java module (for example for test data) because
Soong won't look for a python version variant of the java module.

Bug: 173977903
Test: go test ./python
Change-Id: Ib034140c478ffbc7467ab830d3cfa5683c31d05c
2020-11-23 18:35:49 +00:00
Colin Cross
74b1e2b880 Support SourceFileProducer in android.OutputFilesForModule
Add support to android.OutputFilesForModule to get paths from a
SourceFileProducer as well as an OutputFileProducer.

Bug: 173977903
Test: m checkbuild
Change-Id: I4b2ca2837342ddbb4210bee8f549a636d8b8b049
2020-11-23 18:35:17 +00:00
Paul Duffin
bcd26ea516 Merge "java_sdk_library: Allow dist artifacts to be named" am: 0dabd31057
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507582

Change-Id: Ibbd4b8b08f6dfc75fbd41c63f8ee0f34ed9144bf
2020-11-23 12:54:53 +00:00
Paul Duffin
0dabd31057 Merge "java_sdk_library: Allow dist artifacts to be named" 2020-11-23 12:17:45 +00:00
Mathew Inwood
c16bcd3efb Merge "Explicitly tag max-target-o APIs as "lo-prio"." am: 6ba603c8a1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1494180

Change-Id: Id4d85787ab7bbe8a740664857063501701eb9d36
2020-11-23 10:03:05 +00:00
Yo Chiang
baaf45f2d6 Merge "prebuilt_etc: Refactoring" am: bb7895c85a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502551

Change-Id: I1a129ec7f64de66ad06eee3bd62540f6718234d9
2020-11-23 10:02:27 +00:00
Jingwen Chen
17d690c8b0 Delete check for EXPERIMENTAL_JAVA_LANGUAGE_LEVEL_9.
This has been a no-op for a year now. a1c9e9da55

Test: TH presubmit
Change-Id: Id9cc56045cbca4ebae64170e5443501b9ccc8260
2020-11-23 05:00:42 -05:00
Mathew Inwood
6ba603c8a1 Merge "Explicitly tag max-target-o APIs as "lo-prio"." 2020-11-23 09:45:48 +00:00
Yo Chiang
bb7895c85a Merge "prebuilt_etc: Refactoring" 2020-11-23 09:28:55 +00:00
Jingwen Chen
cda22c9bb9 Refactor 'in_make' to mean Kati is not skipped.
In Nougat and before, Make wrote a marker file to indicate that
soong_build was invoked from Make to change certain behaviors of Soong
at build time.
https://cs.android.com/android/platform/superproject/+/android-7.1.2_r36:build/core/soong.mk;l=70-73;drc=ae18638b0406ad107b0882a02a13cdd8b92f2a4e

Things have changed, and now soong_build is invoked from soong_ui, which
supports a --skip-make configuration flag:
https://cs.android.com/android/platform/superproject/+/master:build/soong/ui/build/build.go;l=31-33;drc=680387bf1d3ce7cbc77f535be7c42cec411b1687

Thus, the various remnants of 'EmbeddedInMake' and 'inMake'
configuration are misleading, since soong_build is no longer invoked
from Make. This CL refactors all instances to actually mean that
Kati is enabled (not skipped with --skip-make), and will run after
soong_build finishes, so Kati-specific behavior like the AndroidMk
singleton should run.

Test: TH presubmit

Change-Id: I576ab8e54f99f5c8ddf9feaf9a828019b279e266
2020-11-23 00:29:18 -05:00
Jingwen Chen
30f5aaaa77 Move bazel_module property to a common file, and add it to filegroup.
This enables prototyping against aosp/1441774 to demonstrate mixed
builds with converted BUILD files.

Test: TH Presubmit
Test: 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 build actions
Bug: 171263886

Change-Id: I7b5cd0449d043ba26a339a0ef98b562fc62e13c8
2020-11-22 22:01:44 -05:00
Treehugger Robot
7ea5837252 Merge "Documenting android/apex.go" am: b26070efef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502070

Change-Id: I00437162d053047481144084fdba9036e2dc227f
2020-11-23 01:03:10 +00:00
Treehugger Robot
b26070efef Merge "Documenting android/apex.go" 2020-11-23 00:44:35 +00:00
Treehugger Robot
fa5a5f6a09 Merge "soong_ui ninja.go: comment and refactor." am: 5898d56912
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501592

Change-Id: I40c5f838c3063a11c40cc4b71236ae22b999becb
2020-11-22 21:05:57 +00:00
Treehugger Robot
5898d56912 Merge "soong_ui ninja.go: comment and refactor." 2020-11-22 20:15:46 +00:00
Jingwen Chen
9d1cb491c3 soong_ui ninja.go: comment and refactor.
On top of improving the comments, I also refactored the status checker
to simplify and clarify its use case to be a ninja stuckness checker,
since it doesn't appear to have other purposes.

Test: TH presubmit
Bug: b/173474588
Change-Id: I2cf51a1ebf16071a24a1c13c06c7b1adf60256de
2020-11-21 07:37:28 -05:00
Colin Cross
e16ce36818 Reland: Rewrite sbox to use a textproto manifest
This relands I3b918a6643cea77199fd39577ef71e34cdeacdb1 with a fix
to create the directory for the output depfile if doesn't exist.

In preparation for more complicated sandboxing that copies tools
and/or inputs into the sandbox directory, make sbox use a textproto
input that describes the commands to be run and the files to copy
in or out of the sandbox.

Bug: 124313442
Test: m checkbuild
Test: rule_builder_test.go
Test: genrule_test.go
Change-Id: I8af00c8c0b25a92f55a5032fcb525715ae8297c2
2020-11-20 15:45:04 -08:00
Colin Cross
f18859626c Fix gensrcs subdirs
The depfile was intended to be placed alongside the per-shard
output file, but was in the final directory instead.  Move
it into the per-shard directory.

Also clean up and comment how shards and shard directories
work.

Test: m framework-cppstream-protos
Test: TestGenSrcs
Change-Id: Ia526ae8997314998814ed8e35598cc2a5bc4aabd
2020-11-20 15:37:04 -08:00
Paul Duffin
3131025d61 java_sdk_library: Allow dist artifacts to be named
Unless no_dist: true is specified the java_sdk_library will
automatically copy the stubs jar and the API specification file (but
not the removed API specification file) for each scope to the apistubs/
directory in the dist from which the sub-directories in prebuilts/sdk
are populated. Previously, the name of those artifacts was based on the
name of the module. This change adds the dist_stem property to allow
the name of those artifacts to be specified separately to the module.

The purpose of this is to allow the art.module.public.api,
conscrypt.module.public.api and i18n.module.public.api java_sdk_library
modules to use a different name when copying to the dist,
e.g. conscrypt.module.public.api should use conscrypt.

Additionally, as the artifacts in the dist end up being copied verbatim
to prebuilts/sdk and the prebuilt_apis module uses those names to
create a filegroup referencing the latest released version of the API
and removed API specification files the dist_stem property is also
used in constructing the name of those filegroups.

Bug: 173715943
Test: lunch sdk-eng && m dist sdk
      Compare the results of the above before and after the change to
      ensure that this change does not affect the contents of the dist.
      See the topic's other change in external/conscrypt for testing
      the behavior of this new property.
Change-Id: Ie81345021991ff91ca55fec15b02627135293308
2020-11-20 22:43:21 +00:00
Chris Parsons
e0f2ab3f3c Improve commenting of cc/binary.go.
Test: N/A
Change-Id: If4a1be0a0f111cd08fc1e8762702c32115562cf1
2020-11-20 17:27:25 -05:00