Commit Graph

31843 Commits

Author SHA1 Message Date
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
Colin Cross bcd0b74aae Merge "Revert "Rewrite sbox to use a textproto manifest"" am: b893f8766c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1507524

Change-Id: I8f58c4611f8e159fa4ec03708f631c3bcb22df94
2020-11-20 19:21:22 +00:00
Colin Cross b893f8766c Merge "Revert "Rewrite sbox to use a textproto manifest"" 2020-11-20 18:45:35 +00:00
Colin Cross 619b9ab260 Revert "Rewrite sbox to use a textproto manifest"
This reverts commit 151b9ff0cf.

Reason for revert: broke builds

Change-Id: I69b3b8795d5a36b4fa0debb1af2d433be3c15d6c
2020-11-20 18:44:31 +00:00
Colin Cross 71e74ba200 Merge "Rewrite sbox to use a textproto manifest" am: 60d06cf8df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1498171

Change-Id: I078aad149558df64a6311c957c4429cbfb144fc0
2020-11-20 18:14:11 +00:00
Colin Cross 3bd058a9de Merge "Add more comments to path_properties.go" am: 4181322f0a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506242

Change-Id: Iab1c0c94044be49415f4dad43f79833a4022093a
2020-11-20 18:13:31 +00:00
Colin Cross 60d06cf8df Merge "Rewrite sbox to use a textproto manifest" 2020-11-20 17:43:29 +00:00
Colin Cross 4181322f0a Merge "Add more comments to path_properties.go" 2020-11-20 17:43:00 +00:00
Cindy Zhou 07b9b74371 Merge "Add CFI support for assembly heavy libraries" am: 1cfd8af0a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500330

Change-Id: Icc31acef62998b571a17e73ce28f2d11dfeed0d9
2020-11-20 13:21:13 +00:00
Paul Duffin d94bd1ddff Merge "java_sdk_library: Stop disabling copy to dist when sdk_version: none" am: 05c2f3e29a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506239

Change-Id: Ia489108dd4b4a95fb28f74b06799213c57264feb
2020-11-20 13:20:32 +00:00
Cindy Zhou 1cfd8af0a8 Merge "Add CFI support for assembly heavy libraries" 2020-11-20 13:11:33 +00:00
Paul Duffin fb873a3048 Merge "java_sdk_library: Allow no_dist to be explicitly set in .bp file" am: de6df73b44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506238

Change-Id: Ie90ce1be6797e9effea153995862b79d5f93b8f5
2020-11-20 13:04:14 +00:00
Paul Duffin 05c2f3e29a Merge "java_sdk_library: Stop disabling copy to dist when sdk_version: none" 2020-11-20 12:48:11 +00:00
Paul Duffin de6df73b44 Merge "java_sdk_library: Allow no_dist to be explicitly set in .bp file" 2020-11-20 12:47:43 +00:00
Paul Duffin 21ba518097 Merge "java_sdk_library: Remove unused SetNoDist method" am: defa9403a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506237

Change-Id: I8edb718f9d0a6d8f957e50ad92e15f0ec5e47c91
2020-11-20 10:29:34 +00:00
Paul Duffin defa9403a3 Merge "java_sdk_library: Remove unused SetNoDist method" 2020-11-20 10:02:13 +00:00
Jingwen Chen e6f2194126 Merge "soong_ui path.go: improve comments." am: 55e0022fc0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1502731

Change-Id: Id91fb286b18739f485b8b021c91bd548701c8694
2020-11-20 05:24:13 +00:00
Jingwen Chen 3ce704efaa Merge "soong_ui kati.go: write more comments." am: 19362b16c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501164

Change-Id: Ia5da2551c2a48e2ef7abf2bff2405c1449654b1c
2020-11-20 05:23:39 +00:00
Jingwen Chen 55e0022fc0 Merge "soong_ui path.go: improve comments." 2020-11-20 04:47:51 +00:00
Jingwen Chen 19362b16c3 Merge "soong_ui kati.go: write more comments." 2020-11-20 04:46:18 +00:00
Colin Cross b742386721 Merge "Support extra checks for ErrorProne in a dedicated property" am: 18e3e8fbc2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1506659

Change-Id: Icf745bf337d7b5900396e74303c1e59ce597d8c6
2020-11-20 02:28:55 +00:00
Colin Cross 18e3e8fbc2 Merge "Support extra checks for ErrorProne in a dedicated property" 2020-11-20 02:06:19 +00:00
Jiyong Park 5bd5a3a9f8 Merge "Reorganize apex/apex.go" am: 09e9cb547a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1504833

Change-Id: Ia872975419e9eddb68c7e82efc5ff7a41598d3fa
2020-11-20 01:22:37 +00:00
Julien Desprez 706ee179ae Merge "Use java host unit tests template for unit tests" am: 62aa21508c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505512

Change-Id: Ieff5faa54a6908051987cda7ad46a3d0e050f97a
2020-11-20 01:20:28 +00:00
Jiyong Park 09e9cb547a Merge "Reorganize apex/apex.go" 2020-11-20 01:18:51 +00:00
Treehugger Robot 23d5b6de26 Merge "Add more comments to arch.go" am: 44e2559f0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1500978

Change-Id: I056ef563320bc6e8851edecf99dd30a8e7972b0e
2020-11-20 01:18:40 +00:00
Sasha Smundak 9e447a7a27 Fix comments with continuation am: 7890211d58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1505513

Change-Id: Ic8af398cdfe92ea78471f59ca79b400dfc389f98
2020-11-20 01:16:41 +00:00
Jiyong Park e4758ed844 Documenting android/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: I000c76e818722ed06bac03d9de87588b23552b08
2020-11-20 10:07:19 +09:00
Julien Desprez 62aa21508c Merge "Use java host unit tests template for unit tests" 2020-11-20 00:07:41 +00:00
Jiyong Park 8e6d52f362 Reorganize apex/apex.go
The source code is reorganized following the order of the execution for
better readability. The order is as follows:

1) init
2) properties
3) module struct
4) deps mutator
5) post-deps mutator
6) generate build actions
7) module initialization for different sub types
8) misc (e.g. apex_available check, etc.)

Behavior is not touched.

Bug: 173472337
Test: m
Merged-In: I919fca468fa376273d498029e6ac2fa37998a4a6
Change-Id: I919fca468fa376273d498029e6ac2fa37998a4a6
2020-11-20 08:44:55 +09:00
Treehugger Robot 44e2559f0f Merge "Add more comments to arch.go" 2020-11-19 22:45:15 +00:00
Colin Cross 11c89c0e9e Add more comments to path_properties.go
Bug: 173449605
Test: m checkbuild
Change-Id: I2638da9cc56726f5d646424e72f52289ad093781
2020-11-19 14:28:46 -08:00
Colin Cross 748b2d829a Support extra checks for ErrorProne in a dedicated property
Previous extra checks for ErrorProne were added using the plugins
proeprty to get them into the -processorpath argument.  This works
fine for java-only modules, but fails for mixed java+kotlin modules
because the processorpath is given to kapt and not javac.

Add a dedicated errorprone.extra_check_modules property (mirroring
the lint.extra_check_modules property), and add that to a separate
processorpath that is used only for errorprone rules and not cleared
when kotlin is used.

Test: TestKapt/errorprone
Change-Id: Id6ef02ce758532d1df8b8d969fad83bb44fe93ab
2020-11-19 14:20:12 -08:00
Sasha Smundak 7890211d58 Fix comments with continuation
Backgound: aog/919954 tried to handle
```
   second line
```

but did it incorrectly. The parser works correctly (so this change
reverts aog/919954), it returns multiline comment, but the serializer
converting the internal representation to Blueprint was not emitting
'//' on the lines after the first.

Test: treehugger
Bug: 127521510
Change-Id: I0257a8b3cc4ffcaa6bea44113ceba66bb99d7e43
2020-11-19 11:52:20 -08:00
Paul Duffin 3aef8d2c1f java_sdk_library: Stop disabling copy to dist when sdk_version: none
Previously, setting "sdk_version: none" would have a side effect of
disabling copying to dist by default. This change removes that behavior
and will copy to dist by default unless explicitly specified.

This will have no impact on the dist because all java_sdk_library
modules that relied on the previous behavior to disable copying to
dist have been modified to explicitly disable copying to dist.

Test: lunch sdk-eng && m dist sdk
      compare out/dist/apistubs directories before and after this
      change to make sure that they have not changed.
Bug: 173715943
Change-Id: I376546b5a8b03de6c944961f7408dad22184fe49
2020-11-19 19:28:10 +00:00
Paul Duffin 4f5c1ef229 java_sdk_library: Allow no_dist to be explicitly set in .bp file
Currently, the no_dist property cannot be set in a .bp file and
defaults to true if the sdk_version property is set to none. That
behavior was added to prevent the output files from the libcore,
conscrypt and icu java_sdk_library modules from being copied to the
dist. It worked because they were the only java_sdk_library modules to
set "sdk_version: none".

Unfortunately, that default behavior is no longer required because
we want to be able to convert "conscrypt" module to a java_sdk_library
and have its public API output files be copied to the dist
automatically. This change allows the no_dist property to be explicitly
set in the .bp file so that those modules that rely on the implicit
behavior can explicitly specify it and allow the default behavior to
be removed.

This change:
* Removes the `blueprint:"mutated"` tag from the No_dist property which
  allows it to be specified in a .bp file.
* Only sets the default if the property has not been explicitly
  specified in a .bp file.

Test: lunch sdk-eng && m dist sdk
      compare out/dist/apistubs directories before and after this
      change to make sure that they have not changed.
Bug: 173715943
Change-Id: I8a1c97b690ae05bfe71ea72acc0831fa51aca7e9
2020-11-19 19:28:10 +00:00
Paul Duffin e3ecd6c7a8 java_sdk_library: Remove unused SetNoDist method
This method was added for use in sysprop_library.go but it is no longer
used there. So, this change removes it.

Bug: 173715943
Test: m nothing
Change-Id: I0c2ae8a8d515faf2692eca2aaed63475fdb6a196
2020-11-19 19:28:05 +00:00
Colin Cross a684540945 Add more comments to arch.go
Make sure every exported function or type has a godoc comment.

Also makes minor changes like unexporting functions that are not used
outside the package and fixing minor style warnings.

Bug: 173449605
Test: m checkbuild
Change-Id: I533a595d02035aae8b2b603590be639826d2d4c8
2020-11-19 11:20:05 -08:00
Paul Duffin 5248161eaf Merge changes from topic "fix-stubs-source-snapshot" am: b479459ac9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1503793

Change-Id: I710d7a4c235b5912b46edf690f44c04babf841bb
2020-11-19 19:16:35 +00:00
Treehugger Robot a5fc86f799 Merge "java link time error improve" am: e63ab5ea02
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1501002

Change-Id: I6b896382dfe8137a93e349a50f38001b4ac8a984
2020-11-19 19:15:04 +00:00
Thiébaud Weksteen 588ed66364 Add comments to {cc,rust}/strip.go
Bug: 173695621
Test: n/a
Change-Id: If3086aa711507c3be6db23e3691163cdd68710bf
2020-11-19 20:02:34 +01:00
Paul Duffin b479459ac9 Merge changes from topic "fix-stubs-source-snapshot"
* changes:
  Fix prebuilt_stubs_sources to work with no stubs sources
  Revert "Use glob for java_sdk_library_import stub_srcs"
2020-11-19 18:39:02 +00:00