Commit graph

58605 commits

Author SHA1 Message Date
Martin Stjernholm
56d691eba9 Fixed error return condition when the toc is read.
Prior to this `getToc` could return (nil, nil) which caused a crash
later.

Test: m extract_apks && out/host/linux-x86/bin/extract_apks \
        -o foo.apks -sdk-version=33 \
        -abis=X86_64,X86,ARM64_V8A,ARMEABI_V7A \
        -screen-densities=all -extract-single test.apks
  where test.apks comes from ag/19673938
 Test: vendor/google/modules/ArtGoogle/build-with-prebuilt-art-module.sh droid
  with prebuilts in place for cf_x86_64_phone_prebuilt_art-userdebug
  chained build on git_master_throttled
Bug: 246562532
Change-Id: Id849371b4dea04f08c07b201c8a466735b5b0994
2022-09-16 00:22:52 +01:00
Vinh Tran
a3b8b784b5 Fix bp2build for cc_aidl_library to use LabelListAttribute.Partition
Using LabelListAttribute.Partition instead of Includes ensures the configuration axes are taken into account when iterating through the AIDL srcs and filegroups

This CI should not have any effect on the already converted modules and bp2build tests.

Bug: 243826707
Test: CI
Change-Id: Ifcd9a37fc1b0887635e69fe227c81893e09b4c47
2022-09-15 15:59:10 -04:00
Trevor Radcliffe
d82e8f6858 Delete SyspropMutator (again)
This CL essentially un-reverts aosp/2119952, now that the issue
has been resolved.

Bug: 226199990
Test: m
Change-Id: I3b828eb7f7cf54023c9e1d3229cf1ff7c85ab6dd
2022-09-15 17:41:58 +00:00
Yu Liu
609c3e074f Merge "Support proto modules with external references." 2022-09-15 16:00:32 +00:00
Treehugger Robot
f0e1a25217 Merge "Integrate gen_notice with Make for dist." 2022-09-15 14:50:12 +00:00
Yu Liu
274c5875e5 Merge "Improve error message when a module is double enabled." 2022-09-15 04:53:08 +00:00
Treehugger Robot
534b797cd7 Merge "Allowlist //frameworks/av/media/module/minijail/..." 2022-09-15 00:31:09 +00:00
Yu Liu
10853f90ef Improve error message when a module is double enabled.
Bug: None
Test: Manual
Change-Id: Ie96dd76d628e8ac3f0da06b949e9bfb9a3259dce
2022-09-14 16:15:43 -07:00
Bob Badour
4660a9824c Integrate gen_notice with Make for dist.
Most exempt module types have no output. Support exempt module types
with output by requiring they must be 0p and have no license metadata.

Disallow `licenses: []` property on gen_notice.

Test: m cts dist

Change-Id: Ic992bd6420fa6898495866eac43495002ef4b6c8
Merged-in: Ic992bd6420fa6898495866eac43495002ef4b6c8
2022-09-14 14:21:44 -07:00
William Escande
f03a3b00fe Remove obsolete com.android.bluetooth apex
Also remove the soong hack that allowed us to build during the
transition

Bug: 243054261
Test: build + TH
Merged-In: I60bac1ec687f03a38f38240969a1c38a8e5bf92c
Change-Id: I60bac1ec687f03a38f38240969a1c38a8e5bf92c
2022-09-14 21:09:50 +00:00
Sasha Smundak
8bea267caf Implement bp2build for the package module
* We are interested mostly in the conversion the `default_applicable_licenses`
  attribute, as `default_visibility` cannot be handled until every module's
  `visibility` is handled.
* Several referenced license modules had to be manually enabled for
  conversion, and likewise a few trivial Android.bp containing only
  package and license modules.
* As Bazel allows only a single `package` rule, the package rules in a
  manually converted BUILD.bazel files were removed (in
  external/protobuf and prebuilts/clang/host/linux-x86 trees).
* The converted package rule is emitted before the `load` statements per
  Bazel documentation.

Bug: 190817312
Test: treehugger
Change-Id: If8bf6fee1580177de3bb402923615bcd48923ed2
2022-09-14 13:49:27 -07:00
Sasha Smundak
a93c62b375 Implement bp2build for the license_kind module
Bug: 190817312
Test: treehugger
Change-Id: Id5bc9c1b7c5386d26ce0ebc33f63bc2665de7d54
2022-09-14 13:49:27 -07:00
Sasha Smundak
9d2f1743d2 Implement bp2build for the license module
Also, add ExpectedRuleTarget type to simplify bp2build testing

Bug: 190817312
Test: treehugger
Change-Id: Id3a642680d3518d36360ba957919a6fc96222672
2022-09-14 13:49:18 -07:00
Yu Liu
2aa806b52d Support proto modules with external references.
Bug: 236055697
Test: Manual testing and adding new unit tests.
Change-Id: I984c0ecb93f0023727a39a3af3921820337bf8c7
2022-09-14 13:02:53 -07:00
Colin Cross
bc2c8a7517 Move AllowMissingDependencies handling into processMainCert
I046d75dbbd4f21f4a2b6851f558e430e9879fcff fixed android_app modules
with missing certificate dependencies when AllowMissingDependencies
was set, but the same problem can occur in android_app_import and
android_rro modules.  Move the AllowMissingDependencies handling
into processMainCert so that it applies to all of them.

Bug: 246649647
Test: TestAppImportMissingCertificateAllowMissingDependencies
Change-Id: Ic7dd3e61e0e3af15c53b583cf680b1e52394a018
2022-09-14 12:48:17 -07:00
Alix Espino
ef47e54bec Revert^2 "deletion of clang_cflags & clang_asflags from Soong"
e9a6865bc7

Change-Id: I20be0561628ee9da5c1431975f364459b6184330
2022-09-14 19:10:51 +00:00
Treehugger Robot
2ba6d37e7b Merge "Increase javac heap to 4096M" 2022-09-14 17:55:51 +00:00
Vinh Tran
056ebde9b5 Merge "Allowlist libSurfaceFlingerProp which depends on cc_sysprop_library_static" 2022-09-14 17:45:13 +00:00
Treehugger Robot
a8b8c67b0a Merge "Allowlist NeuralNetworks' BlobCache_test and nnCache_test." 2022-09-14 17:24:32 +00:00
Paul Duffin
d0fe1307aa Revert "bootclasspath_fragment: Treat some specific modules as test"
This reverts commit ff9b6faba2.

Reason for revert: No longer needed
Bug: 194063708
Test: m nothing
Change-Id: Ic2f6761c9a0a00a612724cb429f002a16522e53f
2022-09-14 17:05:25 +00:00
Sasha Smundak
fb58949414 Handle nameless modules during bp2build conversion.
So far it is `package` module.

Test: treehugger
Change-Id: Ibf3af0b0bf0a532e2ea1d478275a5ac3784ef170
2022-09-14 09:32:17 -07:00
Paul Duffin
1938dba8b6 Exclude unsupported libraries from sdk snapshot
When an sdk snapshot is targeted at release X then it cannot include
bootclasspath fragment libraries which are not present in that build as
otherwise it causes build failures. It should also not include any
unsupported libraries, i.e. libraries that cannot work on that release.

This change causes sdk snapshot to exclude libraries that have a
    min_sdk_version > target build release

It also ensures that hidden API flags do not include any information
from excluded libraries.

Bug: 240406019
Test: BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh
      # Ran the previous command with and without this change to make
      # sure that this change excludes framework-connectivity-t library from the
      # tethering sdk snapshot for S, including from the hidden API flag files.
Change-Id: I57969b85a12e9e5a3fc76c055b260cec5d5f7d7f
2022-09-14 16:47:18 +01:00
Paul Duffin
887efdd779 Separate hidden API flag info for sdk from platform_bootclasspath
Previously, the sdk snapshot and platform_bootclasspath both used the
HiddenAPIInfo/Provider to retrieve the hidden API related information
they needed. This change separates them by adding a new
HiddenAPIInfoForSdk/Provider that is used to provide the information
needed by the sdk snapshot. This allows a follow up change to generate
different information for the sdk and for the platform depending on the
target build release of the sdk snapshot.

Bug: 240406019
Test: packages/modules/common/build/mainline_modules_sdks.sh
      # Ran the previous command with and without this change to make
      # sure that this change does not change the sdk snapshot
      # contents.
Change-Id: I30cea6cf8dae1be467b7063430d6197e5baa684b
2022-09-14 16:37:12 +01:00
Paul Duffin
af70518189 Separate hidden API flag generation from encoding
Previously, the rules for encoding hidden API flags into dex files were
generated in the hiddenAPIRulesForBootclasspathFragment alongside the
rules for creating the hidden API flag files.

This change separates the encoding from the generation of the flags.
This will allow a follow up change to generate API flags for the sdk
snapshot separately without affecting the encoded dex files.

Bug: 240406019
Test: m nothing
Change-Id: I3ab3ff5780e7b2e322665d3ea15f1438f2e403bd
2022-09-14 16:07:28 +01:00
Vinh Tran
8c6f4576ef Merge "Allowlist neuralnetworks_utils_hal_aidl" 2022-09-14 14:56:35 +00:00
Silvia Vinyes
d4b8f7eb0b Merge "Revert "Delete SyspropMutator"" 2022-09-14 14:00:10 +00:00
Chung-Kai (Michael) Mei
6a777b856f Revert "Delete SyspropMutator"
This reverts commit 2db49e3269.

Reason for revert: Break aosp build on git_tm-dev-plus-aosp and downstream branches

Change-Id: I0a86bf5e1e1f2ddf71308250f9110a9608ac2d8d
Bug: 246355583
2022-09-14 13:16:50 +00:00
Jingwen Chen
8ebc6204f4 Allowlist //frameworks/av/media/module/minijail/...
This builds libavservices_minijail and libavservices_minijail_unittest.

Bug: 239041723

Test: $ T="libavservices_minijail_unittest"; P="frameworks/avmedia/module/minijail"; b build //$P:$T --config=android; adb push bazel-bin/$P/. /data/tmp/$P/ && adb shell /data/tmp/$P/$T
Change-Id: Ief23a4aaf2e384503588074d411c5ef0b7e02c69
2022-09-14 11:48:21 +00:00
Jingwen Chen
6bffe55fcf Allowlist NeuralNetworks' BlobCache_test and nnCache_test.
Bug: 239041723

Test: b/239041723#comment10
Test: bp2build.sh
Change-Id: Ide4ec90a71ea169fc4126db83736d88fcc79e446
2022-09-14 11:34:34 +00:00
Sorin Basca
a1073a5ab5 Increase javac heap to 4096M
Bug: 246361502
Test: TH
Change-Id: I787871a8fe924857cde550700acd15682b924b8b
2022-09-14 11:33:58 +01:00
Vinh Tran
3853423e06 Allowlist neuralnetworks_utils_hal_aidl
hardware/interfaces/neuralnetworks/aidl/utils/include/nnapi/hal/aidl/Utils.h in neuralnetworks_utils_hal_aidl uses `IDevice::version` which requires the setting of `--version` flag in aild tool, which is added in aosp/2216684

Fix: 246645564
Test: b build //hardware/interfaces/neuralnetworks/aidl/utils:neuralnetworks_utils_hal_aidl
Change-Id: Ia246c4c47c8b4d52f3b37cccd4640ad862ab258c
2022-09-14 00:52:10 +00:00
Treehugger Robot
9a2d40c79f Merge "Allowlist unblocked cc modules" 2022-09-13 23:58:31 +00:00
Liz Kammer
91487d4099 Fix duplicate deps with stubs
Previously stubs were adding items that would later be removed as they
are handled in the Bazel rules.

Test: soong tests
Test: b build //frameworks/native/opengl/libs:libEGL_blobCache
    --platforms=//build/bazel/platforms:android_target
Bug: 246423126
Change-Id: I76187dd0900e2b1307b22ac5c3dde013bf370470
2022-09-13 16:43:46 -04:00
Chris Parsons
e4f148999b Remove build failure with USE_BAZEL_ANALYSIS usage
This verification was present to ensure that users previously using
USE_BAZEL_ANALYSIS=1 realized the change in usage. But this is now dead
code; USE_BAZEL_ANALYSIS=1 will be a complete no-op after this CL.

Test: USE_BAZEL_ANALYSIS=1 m nothing  (and verified this behaves as m
nothing)

Change-Id: I08f75a562c2fb3ce262646fb187f19f3d5857e40
2022-09-13 16:19:54 -04:00
Vinh Tran
c169c5446f Allowlist libSurfaceFlingerProp which depends on cc_sysprop_library_static
Test: CI
Change-Id: I8674dbe23b7d433841085dd9c813f5abec5f5ba0
2022-09-13 13:15:22 -04:00
Vinh Tran
99fd650fdb Allowlist unblocked cc modules
Bugs: 232480794 232541556
Test: CI
Change-Id: Idb0e9248c0ffc6ac51579c09eccaf08817927e48
2022-09-13 13:15:12 -04:00
Romain Jobredeaux
a2595a93fe Merge "Allowlist Kotlin-related libraries." 2022-09-13 13:28:39 +00:00
Treehugger Robot
eb30142616 Merge "Revert "deletion of clang_cflags & clang_asflags from Soong"" 2022-09-12 21:06:12 +00:00
Zimuzo Ezeozue
a610511bca Merge "Enable aidl#generate_traces by default for some Java SDK kinds" 2022-09-12 21:00:35 +00:00
Colin Cross
0a96c7db27 Copy cc_object output files to a name that matches the module
cc_object output files match the name of the module if there are any
postprocessing steps like partial linking or prefixing symbols.  If
there are no postprocessing steps the output file matches the name
of the source file with the extension changed to ".o".  Always copy
the object to an output file that matches the module name.

Bug: 242601708
Test: TestCcObjectOutputFile
Change-Id: I086bb0d14a3c02093515f55395aa7a11473f8040
2022-09-12 12:27:44 -07:00
Trevor Radcliffe
4c56946644 Merge "Delete SyspropMutator" 2022-09-12 18:59:24 +00:00
Alix Espino
e9a6865bc7 Revert "deletion of clang_cflags & clang_asflags from Soong"
Revert submission 2154033-delete clang_cflags clang_asflags

Reason for revert: Broke build on git_tm-dev-plus-aosp and downstream branches

Reverted Changes:
I5c499a37e:Default BuildBrokenClangCFlags &  BuildBrokenClang...
Ic1d90b72d:deletion of clang_cflags & clang_asflags from Soon...

Change-Id: Ic55dd85a824cf1a543249e0b00072b8c08a475b8
2022-09-12 18:51:23 +00:00
Usta Shrestha
607a995f8d typo
Test: N/A
Bug: N/A
Change-Id: I277c126e4e75c5068f0b6e29cff89e56b4bed840
2022-09-12 11:25:31 -04:00
Usta (Tsering) Shrestha
1b0939ab87 Merge "Mention SOONG_UI_NINJA_ARGS in perf.md" 2022-09-12 15:22:17 +00:00
Usta Shrestha
3ff3fe82c0 Mention SOONG_UI_NINJA_ARGS in perf.md
Test: N/A
Bug: N/A
Change-Id: I2516caa0389962665622fe80f568d8ff17b323dc
2022-09-12 15:21:30 +00:00
Alix Espino
68eeffbc40 Merge "deletion of clang_cflags & clang_asflags from Soong" 2022-09-12 15:11:20 +00:00
Sam Delmerico
43c0eb17ae Merge "add jacocoagent by default to Java modules" 2022-09-12 13:32:09 +00:00
Alix Espino
c0cca3f4e1 Merge changes I82d3a384,I3b03f0a3
* changes:
  product_variables srcs in prebuilt_etc
  refactoring build_conversion.go to remove panic
2022-09-12 13:31:46 +00:00
Jingwen Chen
3c0c2db93a Merge "Allowlist more modules under the adb package." 2022-09-12 04:52:20 +00:00
Treehugger Robot
797aa42e28 Merge "Don't close file descriptors when starting python program" 2022-09-10 00:54:48 +00:00