Commit Graph

31843 Commits

Author SHA1 Message Date
Jiyong Park b81b99032d Documenting apex/builer.go
Mostly documentation changes, but includes a few refactorings like
changing the variable names, reordering functions, reordering statements
in logical order, etc.

Bug: 173472337
Test: m
Change-Id: Iefdc8e463bcda60187b98e8c90661e220e8cdf40
2020-11-25 09:53:46 +09:00
Colin Cross 3ea4eb8d35 Use a unique depfile for each gensrcs command
gensrcs modules run the same command once for each input file to
produce each output file.  Each command needs its own depfile instead
of reusing one per shard.  The depfiles will be merged together
by RuleBuilder into one depfile per shard.

Test: TestGenSrcs
Change-Id: Iaf4f2cf9f5592c20e32944ddf34e0a61aff17ba8
2020-11-24 15:05:28 -08:00
Liz Kammer e2a17a5a40 Convert csuite config to use AndroidMkEntries
This is to facilitate consolidation of compatibility suite logic.

Test: m nothing and compare soong Android mk files -- no diffs
Change-Id: Ibc60d14fdde93835124e18a5c484bbda496bdb9e
2020-11-24 13:41:28 -08:00
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
Liz Kammer d8dceb0f2d Refactor python to use AndroidMkEntries.
This is to enable consolidating test compatibility suite handling in
Soong's AndroidMk files.

Test: go test soong tests
Test: m nothing and compare soong/Android mk files -- only diffs is that
      lines matching "^LOCAL_SHARED_LIBRARIES := $" are absent
Change-Id: I4922a1c8b0231cd98ebd2bc7257956eb9c0d240c
2020-11-24 10:10:03 -08:00
Liz Kammer 4018a8d4d7 Refactor rust to use AndroidMkEntries
This is to facilitate consolidation of compatibility suite logic.

Test: go soong tests
Test: m nothing & compare soong Android mk files -- only diffs are
      elimination of duplicate LOCAL_UNINSTALLABLE_MODULE := true lines
Change-Id: I76211505b2b6afde5d0431586b77d799cf70c6b9
2020-11-24 09:44:51 -08: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
Rupert Shuttleworth 1f304e674d Minor cleanup of cleanbuild.go (and partially build.go).
Test: TH presubmit.
Change-Id: I439c16687b1877d367ff3d0f27e30c9bac97ef58
2020-11-24 14:50:25 +00:00
Rupert Shuttleworth 80115fa6b0 Minor cleanup of environment.go.
Test: TH presubmit.
Change-Id: I89415d6b1219d2204b4fcce4b3a7456250cd0967
2020-11-24 13:16:30 +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
Inseob Kim 07def12d50 Add comments about sysprop_library
Bug: 173473767
Test: m nothing
Change-Id: I96395742ae369baf9d54be8f92b01860ee0351ab
2020-11-24 14:13:31 +09: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 c711fecfc1 Comment android/config.go
Fixes: 173973687
Test: TH presubmit
Change-Id: I4bab950e92a69b12cb7738515a6c516e5b273745
2020-11-23 20:27:45 -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