Commit graph

50144 commits

Author SHA1 Message Date
Cole Faust
542905a280 Prevent unspecified values in soong_config_string_variable
Currently, setting a soong config string variable to a value
that's not listed just does nothing. Change it so it's an
error instead.

Bug: 220375749
Test: Presubmits
Change-Id: I14c1c76ac556ccb0cbd167c95eb3fd7625a6a52c
2022-03-17 17:01:26 -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
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
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
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
Sam Gilbert
28e41289fb Suppress ChangedDefault (in another location)
Change-Id: I71fe558bd379818e254bb031a6a8dc855bb8235d
Test: N/A
Bug: 223382732
2022-03-09 17:01:29 +00:00
Paul Duffin
1f8a6b2f27 Extract Node superclass of Leaf and InteriorNode
Adds a Node superclass to declare and documented the methods that need
to be implemented by Leaf and InteriorNode. Also uses @dataclasses to
make it easy to declare and document the properties of each class.

This refactoring is in preparation for future changes that will need to
add common behavior to both Leaf and InteriorNode so having a
superclass will make that easier.

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: If660855f6b1f45a8ea5b90b3cc0236da9e07d090
2022-03-09 15:43:57 +00:00
Colin Cross
ce73506a85 Merge changes Iac0f4ca9,I4a56efb2
* changes:
  Support BUILD_HOST_static=1 for musl and linux_bionic builds
  Support building python pars against static or shared musl libc
2022-03-09 15:40:26 +00:00
Paul Duffin
b5cd522053 Extract signature_trie.py from verify_overlaps.py
Makes the efficient pattern matching of hidden API flags that is used
by verify_overlaps.py available for use in other scripts.

As part of the move this cleans up the python to use consistent quotes,
and fix pylint issues.

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: I758ca70bb5b7e6806f14b72fd04f821a069f188f

Change-Id: I73fdb7e02127a8c0171a285221d9e6024310953d
2022-03-09 14:04:23 +00:00
Hsin-Yi Chen
ee68c43d4b Check ABI regardless of arch variants
The ABI reference dump directory names contained TARGET_ARCH_VARIANT
or TARGET_2ND_ARCH_VARIANT. The builds with non-generic arch variant
could not find the reference dumps for their arches. This commit renames
the directories to <TARGET_ARCH> and <TARGET_2ND_ARCH>_<TARGET_ARCH> to
ensure that all arch variants are checked.

Bug: 213127415
Test: lunch aosp_cf_x86_64_phone-userdebug && make

Change-Id: I7617f3ffc0e1bc423eea8c39e0f2b745276b4244
2022-03-09 18:16:36 +08:00
Pirama Arumuga Nainar
fac98b5c8e [rust] Add path for coverage tests to allowed list
Bug: http://b/214396112

The goal is to run this smoke test in presubmit on all platform changes.

Test: build with aosp/
Change-Id: I4abb7f46905bd4160a2d628be2761874df6b1b34
2022-03-08 23:08:33 -08:00
Colin Cross
5ffb223ebb Merge "Add host_linux target properties" 2022-03-09 02:05:38 +00:00
Colin Cross
7e2092a274 Support BUILD_HOST_static=1 for musl and linux_bionic builds
BUILD_HOST_static=1 is useful for musl and linux_bionic builds to
produce standalone static binaries.

Bug: 179809553
Test: m USE_HOST_MUSL=true BUILD_HOST_static=1 apexer deapexer
Change-Id: Iac0f4ca92c3ffb27bccd4cac15a6ef9fa5924471
2022-03-08 15:15:56 -08:00
Colin Cross
4111c52fa2 Support building python pars against static or shared musl libc
Support building python pars against musl libc by either adding
libc_musl as an install dependency or using the static version
of the python launchers.

Bug: 179809553
Test: m USE_HOST_MUSL=true apexer deapexer
Test: m USE_HOST_MUSL=true BUILD_HOST_static=true apexer deapexer
Change-Id: I4a56efb227bea746836eb785d929eb4b5d8e15f1
2022-03-08 15:15:56 -08:00
Cole Faust
7d49b1e70a Merge "Call rblf.setDefault() when appending to a variable without +=" 2022-03-08 22:58:58 +00:00
Cole Faust
816e080c4d Call rblf.setDefault() when appending to a variable without +=
Bug: 222737841
Test: go test
Change-Id: I10e9e994fb1979e2e06ad30bbe66a21657d1e3db
2022-03-08 22:58:42 +00:00
Treehugger Robot
4a5110f046 Merge "Disable ChangedDefault" 2022-03-08 21:15:44 +00:00
Treehugger Robot
28080ea3b0 Merge "Support variables with dashes in their names" 2022-03-08 21:08:09 +00:00
Treehugger Robot
86ac783d8e Merge changes from topic "vsdk_ramdisk"
* changes:
  Add InstallInRoot property to snapshot binary json file.
  Fix for duplicate modules across vendor and ramdisk snapshots.
2022-03-08 17:10:54 +00:00
Sam Gilbert
675f0b41be Disable ChangedDefault
Bug: 223382732
Test: N/A
Change-Id: I45b70824650544b465fa656cb09983bf90f923b6
2022-03-08 11:24:44 -05:00
Andrew Walbran
1e17a78c55 Merge "Add stdlibs property for Rust build rules." 2022-03-08 16:07:16 +00:00
Romain Jobredeaux
d9eba6611f Merge "Add source extension information for java_*/android_* modules in module-graph.json." 2022-03-08 14:52:17 +00:00
Paul Duffin
d94e4f5554 Merge "List bootclasspath_fragments in module-info.json" 2022-03-08 11:50:54 +00:00
Jingwen Chen
3889da5fea Merge "Allowlist //external/auto/android-annotation-stubs for bp2build." 2022-03-08 10:55:49 +00:00
Ulya Trofimovich
6a71babc48 Merge "Add markdown docs for dexpreopt." 2022-03-08 10:05:44 +00:00
Jingwen Chen
398a32d9b0 Allowlist //external/auto/android-annotation-stubs for bp2build.
Fixes breakage for bp2build-incremental.

Test: b build //external/...
Change-Id: Id493c119b6ba0f383c9d1e8bade8b8a0acf3efe6
2022-03-08 08:03:28 +00:00
Xin Li
c7c0b9e4ec Merge "Merge Android 12L" 2022-03-08 06:52:32 +00:00
Colin Cross
3c66771c62 Merge "Use single module for clang runtime libraries" 2022-03-08 06:51:43 +00:00
Colin Cross
91729bd2ba Merge "Add musl_x86 and glibc_x86 style properties to bazel configurations" 2022-03-08 06:50:53 +00:00
Treehugger Robot
c8a6487153 Merge "Memory mapped coverage (take 2)" 2022-03-08 06:37:02 +00:00