Commit graph

50169 commits

Author SHA1 Message Date
Treehugger Robot
bc1217b4e7 Merge "Revert "225341614: Enforce ExtraText in platform builds"" 2022-03-21 21:40:12 +00:00
Treehugger Robot
2f39f7dacd Merge "Don't pass static libs to r8" 2022-03-21 19:21:02 +00:00
Tor Norbye
73dca5c905 Revert "225341614: Enforce ExtraText in platform builds"
This reverts commit 4c471458ec.

Reason for revert: There were failures in some build targets that
must not have run during presubmit checks (for example,
aosp-master/errorprone@8332220)

Change-Id: I220fd70df663ba49d876fb3ebf841fa9f3f06b97
2022-03-21 18:56:14 +00:00
Tor Norbye
6014299148 Merge "225341614: Enforce ExtraText in platform builds" 2022-03-21 17:58:32 +00:00
Tor Norbye
4c471458ec 225341614: Enforce ExtraText in platform builds
Bug: 225341614
Test: N/A
Change-Id: Ic2ed5006643f3646315f16fe77552398f38c0265
2022-03-21 08:12:25 -07:00
Treehugger Robot
13642d4735 Merge "Do not dump metrics if reproxy was never started" 2022-03-21 07:05:41 +00:00
Treehugger Robot
ca8e93e79d Merge "Add google_prod_creds to the list of auth mechanisms" 2022-03-21 07:01:31 +00:00
Yu Liu
ba4638f529 Merge "Support tailoring clang --target flag based on min sdk version." 2022-03-19 15:52:15 +00:00
Colin Cross
9bb9bfb349 Don't pass static libs to r8
r8 gets the static libs in the program jar, it shouldn't also get
them as library jars.  Keep a separate classpath for dexing that
includes libs but not static_libs.

Bug: 222468116
Test: m checkbuild
Test: TestD8
Test: TestR8
Change-Id: Icca3393f496cbcadcc633f3b156761e6c145f975
2022-03-18 20:48:27 +00:00
Treehugger Robot
3f57c6a2c8 Merge "Adds min_sdk_version to device_kernel_headers headers lib." 2022-03-18 18:52:27 +00:00
Paul Duffin
2cb89166df Merge "Make bootclasspath_fragment hidden API package checks exhaustive" 2022-03-18 18:42:37 +00:00
Nicolas Geoffray
1a9df2604c Merge "Pass --preloaded-classes to boot image compilation." 2022-03-18 13:41:59 +00:00
Jingwen Chen
c35fbdcd90 Merge changes from topics "e2fsdroid", "e2fsprogs-bazel"
* changes:
  Allowlist //external/e2fsprogs/...
  Build e2fsdroid with Bazel.
2022-03-18 11:34:31 +00:00
Paul Duffin
846beb7f54 Make bootclasspath_fragment hidden API package checks exhaustive
Previously, the bootclasspath_fragment's hidden_api.split_packages and
hidden_api.package_prefixes properties did not specify an exhaustive
set of packages that were provided by the fragment. They excluded
packages which were either not split or which could not be used as a
package prefix because it would match sub-packages provided by other
bootclasspath modules.

This change adds the hidden_api.single_packages list to specify those
additional packages and then uses that information to verify that any
bootclasspath_fragment that specifies at least one of split_packages,
single_packages or package_prefixes properties only contains classes
from a package that matches one of those properties. That will
prevent a module from accidentally including unexpected classes, such
as might happen when statically including a common utility library.

It also adds coverage specific versions of the properties as additional
packages are added to the art-bootclasspath-fragment when building
coverage builds.

Bug: 194063708
Test: atest signature_patterns_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true out/soong/hiddenapi/hiddenapi-flags.csv
      # Breaks without corresponding change to add android.system to
      # the art-bootclasspath-fragment.
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc scripts/hiddenapi/signature_patterns*.py
      pyformat -s 4 --force_quote_type single -i scripts/hiddenapi/signature_patterns*.py
Change-Id: Iddf6c59cd4dc8c36dde7943a9840ccef5794b320
2022-03-18 10:54:51 +00:00
Kousik Kumar
a1d8fa9961 Do not dump metrics if reproxy was never started
Dumping of RBE metrics should only happen when reproxy was started.
Reproxy is started only when Soong is run in make / build mode and not
in dumpvars mode.

Doc: https://docs.google.com/document/d/1Iqhu5QgozB_rA9fucMHO6X4U6A8e8qFtZyub9j83ICQ/edit#
Test: Ran a build with / without RBE. No metrics dumped during lunch
without RBE and metrics dumping worked as expected with RBE.
Bug: b/197213143

Change-Id: Ic3403331e1f4ac2c7c72fd9169aa7b82a7545c75
2022-03-18 02:53:36 -04:00
Kousik Kumar
93d192cc6a Add google_prod_creds to the list of auth mechanisms
This is to ensure that we don't default to using
application_default_creds when it is not set and rather
"RBE_use_google_prod_creds" variable is set. This is necessary to
rollout RBE gcert auth.

Bug: b/224446621
Change-Id: I51e3f1aefadf282240b8f861efafde6b9b61d305
2022-03-18 01:39:56 -04:00
Yu Liu
fc603167f4 Support tailoring clang --target flag based on min sdk version.
Bug: 215748260
Test: Tested using aquery to verify the --target flag; add added unit

Change-Id: Ifb13509db7d1e110316aa44d55ec9cccaa4b83d1
2022-03-18 01:16:52 +00:00
Cole Faust
2d6e6a1338 Merge "Convert values to strings when assigning to a string variable" 2022-03-17 17:01:45 +00:00
Jingwen Chen
f2504b64eb Allowlist //external/e2fsprogs/...
Test: CI
Bug: 204244290
Change-Id: Ie18b555fb165cd3b869a3d7fb2c4ad73aef4bad5
2022-03-17 16:52:13 +00:00
Jingwen Chen
53c29e2467 Build e2fsdroid with Bazel.
Test: CI
Bug: 204244290
Change-Id: If5f01da62cff2913fefc98aed7fe7b986e6e7a33
2022-03-17 15:33:38 +00:00
Paul Duffin
1024f1d72b Cleanup signature_patterns*.py
Fix issues reported by pylint, Intellij Python checks and also try and
adhere to the Google Python Style Guide.

Bug: 194063708
Test: atest signature_patterns_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc scripts/hiddenapi/signature_patterns*.py
      pyformat -s 4 --force_quote_type single -i scripts/hiddenapi/signature_patterns*.py
Change-Id: I64d64e9cb269f58d65f4e10ec2f0e874154919e6
2022-03-17 10:36:29 +00:00
Colin Cross
143b8d4eb1 Merge "Export the license metadata files for dexpreopted bootjars to Make" 2022-03-17 01:48:47 +00:00
Cole Faust
421a192d05 Convert values to strings when assigning to a string variable
Currently, a string variable can easily be reassigned to
a different type. Make it so that the value it's being
reassigned to is converted to a string first.

Bug: 224601891
Test: go test
Change-Id: I82252cf9e106b5a3677458cf1df2e9d1dfefe0f6
2022-03-16 14:35:45 -07:00
Colin Cross
2316240547 Merge "Don't export Soong path as a Make variable" 2022-03-16 17:24:00 +00:00
Patrick Rohr
f6337e86f7 Merge "Remove ethernet-service jar dependency." 2022-03-16 16:03:30 +00:00
Paul Duffin
be74a9fa01 Merge "Allow traversal over the trie structure" 2022-03-16 10:54:45 +00:00
Paul Duffin
f8ccd16516 Merge "Switch signature_to_elements to use tuple" 2022-03-16 10:54:21 +00:00
Paul Duffin
6104b25b72 Merge "Make signature_to_elements stricter and more consistent" 2022-03-16 10:53:54 +00:00
Colin Cross
e7fe0962f4 Export the license metadata files for dexpreopted bootjars to Make
Track the license metadata file of the module used to dexpreopt
bootjars and pass it to Make.

Bug: 224612665
Test: m alllicensemetadata reportmissinglicenses
Change-Id: I8466c3d8edf7dc44976c2a343bd38799c6617db2
2022-03-15 19:56:45 -07:00
Hsin-Yi Chen
66a357df9e Merge "Check ABI regardless of arch variants" 2022-03-16 02:09:40 +00:00
Xiao Ma
488ecd2999 Remove ethernet-service jar dependency.
ethernet service source code is going to be moved into Connectivity
mainline module, and start the ethernet service from the module. The
old ethernet-service lib will be deprecated, remove it from soong
build rule.

Bug: 210586283
Test: m
Change-Id: I8de35246dabba8eb2dda3a154436e43fe19cf384
Merged-In: I19697d13f3809d91c83e37c6d0d403e79eb28664
2022-03-16 00:52:40 +00:00
Treehugger Robot
0ddc5724b0 Merge "Add type hints to mk2rbc" 2022-03-16 00:40:11 +00:00
Colin Cross
8a195897d1 Don't export Soong path as a Make variable
Make is being changed to use the copy at LOCAL_BUILT_MODULE, the
Soong path is no longer necessary.

Test: m alllicensemetadata reportmissinglicenses
Change-Id: I030539473a05e94bec1623ab54fbbcdf43d42cf3
2022-03-15 15:07:55 -07:00
Cole Faust
f92c9f2809 Add type hints to mk2rbc
Type hints have the format #RBC# type_hint MY_VAR list
and must be specified at the top of the Makefile. Setting
one will cause that variable to have that type for the
remainder of the Makefile. This can be used where mk2rbc's
type inference detects the wrong type and it must be
manually changed.

Bug: 224601891
Test: go test
Change-Id: I6db2c50056d0298227e1d2801a522adf8bbd1df8
2022-03-15 12:52:20 -07:00
Paul Duffin
92532e72a1 Allow traversal over the trie structure
Previously, there was no way to traverse the trie structure and no way
to identify specific nodes in the trie. That made it impossible to
analyze the trie structure resulting from loading a set of flags. This
change adds type and selector properties to nodes as well as access to
the child nodes of a node to allow for the structure to be analyzed.

Bug: 202154151
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
      atest --host signature_trie_test verify_overlaps_test
      pyformat -s 4 --force_quote_type double -i scripts/hiddenapi/signature_trie*
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc scripts/hiddenapi/signature_trie*
Change-Id: Ia4714dbf59f6fd143aa3bf3ad1a59cd073d2175b
2022-03-15 15:33:51 +00:00
Paul Duffin
ea93542e90 Switch signature_to_elements to use tuple
Previously, it used a structured string of format <type>:<value>. A
tuple is more efficient and less prone to edge cases, such as when the
value is a field signature which itself contains a ":".

Bug: 202154151
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
      atest --host signature_trie_test verify_overlaps_test
      pyformat -s 4 --force_quote_type double -i scripts/hiddenapi/signature_trie*
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc scripts/hiddenapi/signature_trie*
Change-Id: I80abaff243d98aad325df1b5a655bba7f9d04e2c
2022-03-15 15:16:04 +00:00
Paul Duffin
19255f1d91 Make signature_to_elements stricter and more consistent
Previously, signature_to_elements would return a string array where
non-wildcard strings were of the form <type>:<value> but wildcard
strings were just * or **. This change makes it handle wildcards
consistently with the other element types and adds some extra
checking for edge cases.

Bug: 202154151
Test: m out/soong/hiddenapi/hiddenapi-flags.csv
      atest --host signature_trie_test verify_overlaps_test
      pyformat -s 4 --force_quote_type double -i scripts/hiddenapi/signature_trie*
      /usr/bin/pylint --rcfile $ANDROID_BUILD_TOP/tools/repohooks/tools/pylintrc scripts/hiddenapi/signature_trie*
Change-Id: I5bfaf5e75c7da54b6241f68e03231939c9d65501
2022-03-15 15:16:04 +00:00
Nicolas Geoffray
b9a46fb624 Pass --preloaded-classes to boot image compilation.
Test: m
Bug: 162110941
Change-Id: I0df016c5d170ca101cd18cacc331499ae76677a6
2022-03-15 14:28:38 +00:00
Treehugger Robot
b6a55c53e7 Merge "Add new team member to OWNERS" 2022-03-14 22:03:34 +00:00
Cole Faust
14f91b26b0 Add new team member to OWNERS
Test: N/A
Change-Id: Ife6be2ad1997c052e3e67038d4a3f3a84ecbde91
2022-03-14 11:59:46 -07:00
Treehugger Robot
7db79508c7 Merge "bp2build supports arch variant srcs for java_library" 2022-03-14 17:06:01 +00:00
Daniel Norman
ca2ed385a0 Adds min_sdk_version to device_kernel_headers headers lib.
Bug: 222618150
Change-Id: Ic0a9dfc59322ca236b978f31cf68dffbc0fc9bf0
2022-03-14 16:15:46 +00:00
Pirama Arumuga Nainar
f1346fce85 Merge "[rust] Add path for coverage tests to allowed list" 2022-03-14 16:11:22 +00:00
Paul Duffin
1917c84dd6 Merge "Extract Node superclass of Leaf and InteriorNode" 2022-03-14 15:26:19 +00:00
Paul Duffin
e25815954d Merge "Extract signature_trie.py from verify_overlaps.py" 2022-03-14 15:26:06 +00:00
Treehugger Robot
8af3a5a38d Merge "Simplify and correct variable assignments" 2022-03-11 02:32:11 +00:00
Treehugger Robot
1785c88a4f Merge "add type to modules created by LoadHookContext" 2022-03-10 23:37:08 +00:00
Cole Faust
e2a37988ff Simplify and correct variable assignments
- Remove asgnMaybeAppend, it was only used to indicate
  that the asignment needs a setDefault. But really, all
  types of variable assignments need setDefault if they're
  self-referential.
- Remove local_append/local_set_default because there was
  no implementation for them written in product_config.rbc
  anyways.
- Correct productConfigVariable.emitDefined using the global
  variables instead of the product config variables.
- Emit setDefaults for all types of assignments if they're
  self referential.

Bug: 222737841
Test: go test
Change-Id: I06a0f90f16d5900049d473281e6d5ef5e93e67da
2022-03-10 15:00:57 -08:00
Sam Delmerico
286bf26c2c add type to modules created by LoadHookContext
Modules created by a LoadHookContext do not currently set a module type
when creating new modules, but it would make analysis of the
module-graph.json much easier if this module type information was available.

Bug: 174879786
Test: m json-module-graph && check that module which previously had a
    blank module type now have the field populated
Change-Id: I3be5d259694a1540d21deb8a665ec7bea3464054
2022-03-10 20:59:45 +00:00
Treehugger Robot
1571419fab Merge "Suppress ChangedDefault (in another location)" 2022-03-09 22:00:44 +00:00