Commit Graph

46175 Commits

Author SHA1 Message Date
Paul Duffin
6546573ec9 Merge "Allow implementation details to be excluded from signature patterns file" 2021-10-06 12:19:23 +00:00
Cole Faust
c1172a2152 Remove mk2rbc's support for using a product name am: ebf79bfb4a am: 2a50c472f4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1845613

Change-Id: Ic1e8f9675af30dcd5cd0a47103e39e5d41a34968
2021-10-05 21:32:40 +00:00
Cole Faust
2a50c472f4 Remove mk2rbc's support for using a product name am: ebf79bfb4a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1845613

Change-Id: I3d464b450af8c1f79fdbee7e3a8593032ff53620
2021-10-05 21:18:29 +00:00
Paul Duffin
1f45d4a4d9 Retry: Separate hidden API flags needed in sdk snapshots for S and T am: 191be3a186 am: bf027e4e58
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844294

Change-Id: Icfe53ae9622656b4f900d769a7533e9f2a581caf
2021-10-05 18:18:59 +00:00
Cole Faust
ebf79bfb4a Remove mk2rbc's support for using a product name
Now that the product and board config pass makefiles
to mk2rbc, we don't need to support passing a product
name.

Bug: 201700692
Test: Manually
Change-Id: I787f0f98bc5ab3cefeefb7af8d342aba84769925
2021-10-05 11:05:02 -07:00
Paul Duffin
bf027e4e58 Retry: Separate hidden API flags needed in sdk snapshots for S and T am: 191be3a186
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844294

Change-Id: Id8977b8160f175b736214428cae94ea27f95675b
2021-10-05 18:04:10 +00:00
Pedro Loureiro
cc203505b9 Add module-lib to droidstubs' supported sdk types
If the android.jar is not found in the module-lib folder, it falls back
to searching it in the system folder and then falls back on the public
folder.

This only brings the functionality, we are not yet using it.

Test: m nothing
Bug: 202023154
Change-Id: I99c9004740c8e51faf53ebc3ba2444e8164215f3
2021-10-05 15:40:46 +00:00
Paul Duffin
1e18e98b14 Allow implementation details to be excluded from signature patterns file
Previously, the signature-patterns.csv file (which was output in an sdk
snapshot) included implementation details, e.g. the names of classes
that are not part of any API, including the hidden API. This change
allows a bootclasspath_fragment module owner to customize the generated
signature patterns file to remove as many implementation details as
possible from the sdk snapshot. That means that implementation only
changes would not require that sdk snapshots be updated in sync with
the corresponding APEX.

Module owners can remove implementation in the following ways:
1) Limit the number of packages that are treated as split packages by
   explicitly specifying the split packages in the split_packages
   property. A split package is one whose classes are provided by
   separate bootclasspath_fragment modules and so the signature
   patterns has to include every class in that package provided by a
   specific bootclasspath_fragment module, including implementation
   classes, instead of just listing the package.

   The default is to treat all packages as being split, so if no
   split_packages is specified then it defaults to ["*"] which matches
   all packages. Assuming that no package was split unless specifically
   stated would require that all the modules that had split packages
   explicitly list them before this change could be submitted as
   without them this change would break the build.

   Once all existing modules with split packages have been updated to
   include them then the default may be changed.

2) Adding package prefixes for any hierarchy of packages that are
   owned solely by that bootclasspath_fragment. This removes the need
   to list the packages in that hierarchy, including implementation
   specific packages.

Bug: 194063708
Test: atest --host verify_overlaps_test signature_patterns_test
      m out/soong/hiddenapi/hiddenapi-flags.csv
      - manually change files to cause difference in flags to check
        that it detects the differences.
Change-Id: If2f90cfc41b6fff9fa4ac8b9d4973110938b9392
2021-10-05 15:47:05 +01:00
Paul Duffin
191be3a186 Retry: Separate hidden API flags needed in sdk snapshots for S and T
Previous change that was reverted: https://r.android.com/1835222
An additional test was added that revealed a bug in the previous change
which has been fixed here.

Previously, the behavior of the stub_flags and all_flags properties
was different between S and T. In S they contained paths for the
complete set of stub flags and all the encoded flags. However, in T
they contained filtered sets of flags which if used in S would prevent
build checks from detecting possible inconsistencies. Also, a new
signature_patterns property was added in T that is not supported in S.

This change creates separate properties/files for T and reverts the
behavior of the properties/files that were added in S back to how they
behaved in S. The new properties are called filtered_stub_flags and
filtered_flags.

The S and T properties are tagged with the appropriate
supported_build_releases tag to ensure that they are only output when
specifically targeted.

Bug: 197842263
Test: m nothing
Change-Id: I1ce0a3d6623dabf73e32af1a7457b9b444fc3b7c
2021-10-05 15:27:42 +01:00
Sorin Basca
877376a55b Merge "OpenJDK 11: Adding jdk.internal.reflect to allowed package list" am: 6e06f911a5 am: d63116f5a9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1837335

Change-Id: I65ef938bd9ce5bb9b43a22ffdc3ed594a837c6bc
2021-10-05 12:51:10 +00:00
Sorin Basca
d63116f5a9 Merge "OpenJDK 11: Adding jdk.internal.reflect to allowed package list" am: 6e06f911a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1837335

Change-Id: I16588846c58c0bf8482e9f6002e5a07f8323cf51
2021-10-05 12:38:22 +00:00
Sorin Basca
6e06f911a5 Merge "OpenJDK 11: Adding jdk.internal.reflect to allowed package list" 2021-10-05 12:34:42 +00:00
Cole Faust
c33f3e7e88 Merge "Make rbc-run accept a makefile instead of a product" am: e5fbd7706c am: 5abbecbc0f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1843576

Change-Id: Ibc552d0e4168071cc973892fc1fe132547c6e02b
2021-10-05 01:18:57 +00:00
Cole Faust
5abbecbc0f Merge "Make rbc-run accept a makefile instead of a product" am: e5fbd7706c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1843576

Change-Id: I0fb0c2c33c847e3aaf4c7791c9956698206360e3
2021-10-05 01:01:45 +00:00
Cole Faust
e5fbd7706c Merge "Make rbc-run accept a makefile instead of a product" 2021-10-05 00:49:48 +00:00
Jiyong Park
d1e366a072 Installation routine for rust is similar to that of cc
This change makes the installation routine for rust be similar to that
of cc. Previously, rust.baseCompiler.install() (which internally calls
android.ModuleContext.InstallFile()) was not called when the module is
not installable. Although this may sound right at first glance, it is a
behavior different from that of cc and prevents an uninstallable rust
module from being packaged into a packaging module like
android_filesystem. This is because the packaging happens inside
InstallFile().

Fixing the issue by following the behavior of cc modules; Call
HideFromMake() or SkipInstall() when a rust module is not installable,
but call InstallFile() as long as the output file is valid.
InstallFile() internally skips the installation (but the packaging) when
HideFromMake() or SkipInstall() was called.

Bug: N/A
Test: atest MicrodroidHostTestCases
Change-Id: I15f4adc8544dac53647647d8bc4273f9f4acbeb2
2021-10-05 09:12:41 +09:00
Yu Liu
e737a9912b Store build targets in the soong metrics.
Bug: 194519312
Test: Added unit test and verified the soong metrics file generated.
Change-Id: I832da2501e0e8d3435d4f92642cf45ddccb7f2ea
2021-10-04 13:24:48 -07:00
Christopher Parsons
800a24facb Merge "Remove more out-of-date items from denylist" am: b19d4cda2e am: f5a385f171
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844513

Change-Id: I9ae2603d301456372730216a257b460b7fc98cda
2021-10-04 20:02:53 +00:00
Christopher Parsons
f5a385f171 Merge "Remove more out-of-date items from denylist" am: b19d4cda2e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844513

Change-Id: Ic7a0cebac496ca1d07145b4cd28439b4fd373e70
2021-10-04 19:44:07 +00:00
Treehugger Robot
98f0fd07ca Merge "Bp2Build common properties auto-handling" am: d905146590 am: 3e745e63f3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1815376

Change-Id: I165d91ffff808ac085a440598c779a69d7c3cb3b
2021-10-04 19:34:38 +00:00
Christopher Parsons
b19d4cda2e Merge "Remove more out-of-date items from denylist" 2021-10-04 19:31:36 +00:00
Treehugger Robot
3e745e63f3 Merge "Bp2Build common properties auto-handling" am: d905146590
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1815376

Change-Id: I38f1063302ea90583a51e625076e6232b4364ab7
2021-10-04 19:20:28 +00:00
Treehugger Robot
d905146590 Merge "Bp2Build common properties auto-handling" 2021-10-04 19:02:07 +00:00
Colin Cross
a385e8aa55 Merge "Export SOONG_CC_API_XML to Make outside androidmk" am: f79f4c3199 am: fec737d6fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1842574

Change-Id: I20342c1809266b0ede08a3497e9a04fd1067abd7
2021-10-04 19:01:23 +00:00
Colin Cross
fec737d6fe Merge "Export SOONG_CC_API_XML to Make outside androidmk" am: f79f4c3199
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1842574

Change-Id: Ie7312e0928bfe7692454f8d9a074c10f90fa3f2e
2021-10-04 18:44:31 +00:00
Treehugger Robot
8361d2a052 Merge "Make RuleBuilder fail fast when passed a nil Path" am: b5e3a79358 am: 70e2b79d9c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844300

Change-Id: I382261cb9d645d56b7b952ff4391217c3097b71f
2021-10-04 18:40:11 +00:00
Cole Faust
cdf521316b Merge "Make mk2rbc accept either a makefile or product" am: 00364b6114 am: c089a8c62c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1842579

Change-Id: I34c9d316896ac290dbeaf1ce24ae5bc731b7230e
2021-10-04 18:40:02 +00:00
Colin Cross
f79f4c3199 Merge "Export SOONG_CC_API_XML to Make outside androidmk" 2021-10-04 18:32:15 +00:00
Treehugger Robot
70e2b79d9c Merge "Make RuleBuilder fail fast when passed a nil Path" am: b5e3a79358
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844300

Change-Id: I6fe77f48ff5fd9b225bf577bc20821a05633067f
2021-10-04 18:25:44 +00:00
Cole Faust
c089a8c62c Merge "Make mk2rbc accept either a makefile or product" am: 00364b6114
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1842579

Change-Id: I4b3439e87f90be880da0e883b5a9f02707e04934
2021-10-04 18:25:31 +00:00
Cole Faust
057828d348 Make rbc-run accept a makefile instead of a product
Needed for the board configuration.

rbc-run will also now pass any extra arguments it receives
to rbcrun. (The real program, not the script)

Bug: 201700692
Test: rbc_product_config.py aosp_arm64-userdebug
Change-Id: Ic9869f693f1d28bafee59050b6ae7b1fba14dbdd
2021-10-04 11:16:55 -07:00
Treehugger Robot
b5e3a79358 Merge "Make RuleBuilder fail fast when passed a nil Path" 2021-10-04 18:12:04 +00:00
Cole Faust
00364b6114 Merge "Make mk2rbc accept either a makefile or product" 2021-10-04 18:11:47 +00:00
Cole Faust
07ea503ab3 Make mk2rbc accept either a makefile or product
The current behavior of mk2rbc is that it can accept either
a makefile to convert, or if it's also generating a launcher,
it must accept a product name instead of a makefile.

For board configuration, we need to convert a specific makefile,
but we also want to generate a launcher. Change mk2rbc so that
its non-flag arguments can be either makefiles or product names.

Bug: 201700692
Test: ./build/bazel/ci/rbc_product_config.sh aosp_arm64-userdebug
      with board config changes patched in
Change-Id: I521e31fe0bdc608b8f26c9aa803ca690dd1c538e
2021-10-04 18:09:48 +00:00
Liz Kammer
dff00ea509 Handle arch-variant in prebuilt_etc
For cc_binary, changing the handling of version_script to no longer be a
LabelAttribute, which reduces test coverage of that type. Expand
prebuilt_etc to handle arch-variant srcs and correct a bug in
LabelAttribute.

Test: build/bazel/ci/bp2build.sh
Change-Id: I620bc3a43b28c1873f335e30099844ca79ce94c1
2021-10-04 13:44:34 -04:00
Treehugger Robot
87b3b3f27b Merge "Fix script for package check to work on macOS" am: 7df231fab8 am: bc30d9704a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844277

Change-Id: I8d6baeb0a55f58166fce0a29b8511d0330164a08
2021-10-04 17:34:09 +00:00
Treehugger Robot
bc30d9704a Merge "Fix script for package check to work on macOS" am: 7df231fab8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844277

Change-Id: Ia00014bf0cd9300056331e2ee0234e804cb20fad
2021-10-04 17:22:09 +00:00
Treehugger Robot
7df231fab8 Merge "Fix script for package check to work on macOS" 2021-10-04 17:05:33 +00:00
Chris Parsons
b97a817fdb Remove more out-of-date items from denylist
Test: mixed_droid CI
Change-Id: Ifc5bb10328860a5d979eb627a5347d8c23203155
2021-10-04 12:48:29 -04:00
Ulya Trafimovich
1fae1299cd Update variable name in error messages. am: e5b2b49a73 am: ef92591c59
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844308

Change-Id: Ia51a1f66f59c73acd04f3821ba3f9990c411b30d
2021-10-04 16:32:26 +00:00
Ulya Trafimovich
ef92591c59 Update variable name in error messages. am: e5b2b49a73
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844308

Change-Id: Icb57f58d9efdf8793162254eefe8e3150d6d9cf5
2021-10-04 16:18:58 +00:00
Jerome Gaillard
03c64c87a4 Fix script for package check to work on macOS
The behaviour of shell parameter expansion on linux and macOS is
different:
- on linux "\/" in the replaced string is interpreted as simply "/"
- on macOS it is interpreted as the full string "\/"
For example, "android.package.example" would be changed to:
- "android/package/example" on linux
- "android\/package\/example" on macOS

The character / is not a special character for pattern matching in bash,
so it doesn't need to be escaped. Hence using / instead of \/ in the
replaced string works on both linux and macOS.

Change-Id: Id6a5cf32afc53d5ffd989c0ac8aa0b9e0fcbaf82
Fixes: 201947033
2021-10-04 15:29:06 +00:00
Christopher Parsons
d799253307 Merge "Remove out-of-date items from bp2build denylist" am: 9c03ef7790 am: 349f4963df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1843716

Change-Id: I9fd600b9fb71ae417fa31ffcb0ba9599ad383ece
2021-10-04 14:59:07 +00:00
Christopher Parsons
349f4963df Merge "Remove out-of-date items from bp2build denylist" am: 9c03ef7790
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1843716

Change-Id: I611dc8b307b7ac38e97f84a3bf4139e1260e1bd3
2021-10-04 14:45:06 +00:00
Ulya Trafimovich
e5b2b49a73 Update variable name in error messages.
Variable PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS was renamed to
PRODUCT_APEX_SYSTEM_SERVER_JARS in https://r.android.com/1779472.

Bug: 191127295
Test: m nothing
Change-Id: I0c8ae839cab443c824760b40d30b4374982010f9
2021-10-04 15:43:39 +01:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
447f6c99c9 Bp2Build common properties auto-handling
Introduce `commonAttributes` & `fillCommonBp2BuildModuleAttrs used in
CreateBazelTargetModule

Adapt `bp2BuildInfo` to use `commonAttrs` instead of `Name`.
And thus also all downstream users of `CreateBazelTargetModule`.

As initial user, the Soong `required` property will be
translated to Bazel's `data`.

Bug: 198146582, 196091467
Test: build_converstion_test.go:TestCommonBp2BuildModuleAttrs
Test: go test
Test: mixed_{libc,droid}.sh
Change-Id: Ib500e40f7e2cb48c459f1ebe3188962fc41ec124
2021-10-04 14:43:04 +00:00
Christopher Parsons
9c03ef7790 Merge "Remove out-of-date items from bp2build denylist" 2021-10-04 14:33:19 +00:00
Paul Duffin
bf2abb4e27 Merge "Retry: Support generating sdk snapshot for specific build release" am: 06fde417bf am: 534e7e87ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844293

Change-Id: Ic50f422b498a26ca4aa90d015f3c26638cd8ca33
2021-10-04 14:20:10 +00:00
Paul Duffin
534e7e87ac Merge "Retry: Support generating sdk snapshot for specific build release" am: 06fde417bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844293

Change-Id: I827b879327e7976309a1c1252d516ce7c073f807
2021-10-04 14:02:32 +00:00
Paul Duffin
06fde417bf Merge "Retry: Support generating sdk snapshot for specific build release" 2021-10-04 13:49:31 +00:00