Commit graph

50691 commits

Author SHA1 Message Date
Paul Duffin
54e0bb61f0 Merge "Check that API is up-to-date when building java_sdk_library" 2022-05-27 16:01:57 +00:00
Paul Duffin
c166b68589 Check that API is up-to-date when building java_sdk_library
Previously, the checked in version of an API was only checked to make
sure it was up-to-date when running the checkapi target. This change
adds a validation dependency to the ninja rule that generates the API
from source so that up-to-date check is always performed every time
the API is generated. However, because it is a validation dependency
it does not lengthen the build's critical path.

Bug: 234113632
Test: echo > packages/modules/SdkExtensions/java/android/os/ext/api/current.txt
      m framework-sdkextension
      # Passes without this change even though the checked in API is
      # not up-to-date.
      # With this change the build fails reporting correctly that the
      # checked in API is not up-to-date.
Change-Id: I8e65cf716d94aecd61bd943f1485468664ad4a22
2022-05-27 14:03:44 +00:00
Treehugger Robot
0e3d36c582 Merge "Add filegroup srcs to json module graph" 2022-05-27 13:29:54 +00:00
Liz Kammer
5edc1411ee Add filegroup srcs to json module graph
This will allow us to do json analysis on a filegroup's inputs as they
will now have a corresponding phony action.

Test: m json-module-graph and check module-actions.json
Change-Id: Id1ab681c01689eef06205d4a7fe8cf8b9110c628
2022-05-26 16:14:33 -04:00
Treehugger Robot
ec6c065af6 Merge "Adding .iml files to .gitignore" 2022-05-26 19:19:43 +00:00
Usta Shrestha
2712ef07a0 Adding .iml files to .gitignore
Bug: N/A
Test: N/A
Change-Id: Ica348d16e96addb2ef407655bc98de695cec7824
2022-05-26 12:16:03 -04:00
David Drysdale
95cf8e935a Merge "Add new system/keymint Rust directory" 2022-05-26 09:32:22 +00:00
Trevor Radcliffe
5731d0fffd Merge "Generate genlex rules from bp2build for cc targets" 2022-05-25 19:38:15 +00:00
Treehugger Robot
bf04adae7c Merge "sdkLibraryProperties: fix typo" 2022-05-25 16:29:47 +00:00
Mårten Kongstad
81d909525d sdkLibraryProperties: fix typo
Test: m nothing
Change-Id: Id9a0ba0a1123a298b8713f6dd6526ccb54fe5c46
2022-05-25 16:27:55 +02:00
David Drysdale
21252b460a Add new system/keymint Rust directory
Bug: 195310053
Test: build, TreeHugger
Change-Id: I5bb3c000324fb8150bdd00ec8b8ca9ed79ceba06
2022-05-25 13:57:13 +01:00
Treehugger Robot
86db8821bb Merge "raw_binary output should not be executable." 2022-05-25 12:28:27 +00:00
Lukács T. Berki
3ef0581cda Merge "Remove support for generating versioned snapshots" 2022-05-25 10:59:32 +00:00
Yi Kong
f13a66adfd Merge "Enable string-compare warning" 2022-05-25 07:02:34 +00:00
Muhammad Haseeb Ahmad
53a129db89 Merge "Make IsSanitizerEnabledForJni return false" 2022-05-25 06:18:18 +00:00
Muhammad Haseeb Ahmad
e6567fe56b Make IsSanitizerEnabledForJni return false
Change-Id: I5e1722bc32b63649fc9973d11e9fd5bdea72ddbe
Test: m
2022-05-25 00:13:08 +00:00
Paul Duffin
b01ac4b6ba Remove support for generating versioned snapshots
Previously, the code for selecting specific versions of sdk snapshots
was removed (along with the uses_sdks property). That makes versioned
snapshots useless so this change removes all the code and tests that
generated those versioned snapshots.

Bug: 232546567
Test: m nothing
      packages/modules/common/build/mainline_modules_sdks.sh
Change-Id: Ib6d1b72bc8399fbb39075494ae37da92f4b28d03
2022-05-24 20:10:05 +00:00
Chris Parsons
027881cf35 Add extraNinjaDeps to mixed builds depfile
This was accidentally removed in aosp/2094705. Among other possible
issues, this caused the "used environment variable" file to be omitted
from the depfile of soong_build during mixed builds, which would result
in soong_build not being subsequently retriggered during env var
changes.

Sendng this out as a quickfix, regression test to follow.

Bug: 233774464
Test: Manual `m nothing && USE_BAZEL_ANALYSIS=1 m nothing && m nothing`,
verifying that a rebuild was retriggered in each invocation.

Change-Id: I1d9dbd1bc4696df760ebb9be262bc165c161bb21
2022-05-24 19:41:17 +00:00
Sorin Basca
78ce8c23de Merge "Add experimental option to target Java 17" 2022-05-24 15:12:14 +00:00
Trevor Radcliffe
ef9c900ec3 Generate genlex rules from bp2build for cc targets
This change will cause bp2build to generate genlex targets any
time a .l or .ll file is present in the srcs for a cc target and
add those genlex targets to the srcs attribute of the original
target.

Bug: 207408632
Test: unit tests
Change-Id: I1bce82c9d3c3d458eae1cef547ffae3d6e975134
2022-05-24 14:42:51 +00:00
Liz Kammer
91f10eccc6 Merge "Handle multiple linkages in sdk snapshots" 2022-05-24 14:13:19 +00:00
Andrew Walbran
79c3b77ea2 raw_binary output should not be executable.
If it is, rust_test (wrongly) tries to execute it when it is used as
data.

Also fixed description and a lint warning while I was at it.

Bug: 233732515
Test: atest vmbase_example.integration_test
Change-Id: I49bf5147a9908549b0f37bdb0678e77676148db8
2022-05-24 13:57:17 +00:00
Sorin Basca
ce720c3663 Add experimental option to target Java 17
Bug: 233029164
Test: EXPERIMENTAL_TARGET_JAVA_VERSION_17=true \
      EXPERIMENTAL_USE_OPENJDK17_TOOLCHAIN=true m
Change-Id: I80a9ba9eb356a460c1036e711e793c2ca6620f53
2022-05-24 13:05:17 +01:00
Yi Kong
8ecb22d402 Enable string-compare warning
Test: presubmit
Bug: 153764102
Change-Id: I6fbf7a841cb6ea7bc8433fd2fddd5a825f68aa22
2022-05-24 16:16:21 +08:00
Wei Li
40f9873612 Convert the property "manifest" properly for override_apex.
1) When it is not set in base apex, default file name should be set explicitly in bp2build converter of apex
2) The manifest file path should be used as-is when base apex and override_apex is in the same Android.bp
3) The manifest file path should be prepended with package of base apex when base apex and override_apex is in different Android.bp

Bug: 216442475
Test: m nothing
Change-Id: Icd3523ebc31d885f67bea02aec05dbfc77671e87
2022-05-23 17:22:35 -07:00
Liz Kammer
707f65d3d5 Merge "Remove library decorator for extracting headers" 2022-05-23 19:36:57 +00:00
Cole Faust
bd4c14a7f9 Merge "Add imports property to py_library rules" 2022-05-23 18:55:51 +00:00
Treehugger Robot
52edad230a Merge "Add blockers of cc mainline modules to allowlist" 2022-05-23 18:55:01 +00:00
Christopher Parsons
b002f87d2e Merge "cc bazel handlers: use better interface checking" 2022-05-23 18:54:50 +00:00
Treehugger Robot
5bec8d41ea Merge "Clean up some bp2build technical debt" 2022-05-23 18:01:04 +00:00
Liz Kammer
96320dfff8 Handle multiple linkages in sdk snapshots
Currently, if the same library is specified for multiple of native_libs,
native_shared_libs, and native_static_libs for different arch/oses,
there can be a few errors:

1. specifying a .so file as `srcs` within a cc_prebuilt_library rather
than being specified only for shared
2. the final type of prebuilt library is dependent on the arch/os

This change introduces:
* an ability for a member type to override the type for specified
  properties
  * checks for a library being used with incompatible member types
  * basing linkage nesting on the member type in addition to variants

  This will ensure that the correct library type is used, regardless of
  the order of iteration over oses/arches, and support nesting linkages
  where necessary but only one linkage variant exists.

Test: soong tests
Test: CI
Change-Id: I81dee013b09b99c34ca6c18f9cfcc12ee56d33d1
2022-05-23 10:51:22 -04:00
Jingwen Chen
d9d096ec7c queryview: don't generate 'for' attributes
'for' is a reserved keyword

Test: CI
Fixes: b/233579439
Change-Id: I7b94250574465353bbd6bfb82a7ea37ce9ae17a3
2022-05-23 09:38:39 +00:00
Treehugger Robot
14b500daba Merge "Revert "Use D8 by default for android_test"" 2022-05-23 05:49:40 +00:00
Jared Duke
4e445be558 Revert "Use D8 by default for android_test"
This reverts commit 02edc10047.

Reason for revert: Breaks test_suites_x86_64_coverage

Bug: 233421462
Change-Id: I7b04d3fd7802be0f271ea3c29ef25e3d08ab1389
2022-05-23 04:00:44 +00:00
Bob Badour
0507921dcf gen_module visibility tests.
Test: m cts dist reportmissinglicenses

Change-Id: Ib2f8d0ad46ffe795d392166a74a7c6309b1246e2
2022-05-20 16:54:13 -07:00
Bob Badour
a5ea2479d3 Fix bug: allow multiple gen_notice modules.
Test: m cts dist reportmissinglicenses

Change-Id: I07963c83eaddfe363a04871e813b56fe7f1465ad
2022-05-20 16:54:00 -07:00
Treehugger Robot
1811ed3764 Merge "Use D8 by default for android_test" 2022-05-20 22:46:15 +00:00
Wei Li
440c66a799 Merge "Change init process of bp2buildAllowlist so the Soong plugin of bp2build allowlist can hookup properly." 2022-05-20 20:36:40 +00:00
Jared Duke
02edc10047 Use D8 by default for android_test
android_test defaults to using R8, but with shrinking, optimization and
obfuscation disabled, eliminating most of the benefits of R8. Instead,
use D8 by default, improving build performance and avoiding any other
issues that may arise in test-specific code related to whole-program R8
execution. An initial audit shows that android_test targets that *do*
enable shrinking or optimization also explicitly opt in to R8.

A follow-up CL will do the same for android_test_helper_app, but that
requires some additional auditing of downstream targets.

Bug: 192032291
Test: m + presubmit
Change-Id: I5b14a0986dde210f241a77c3a93daacf9e53d667
2022-05-20 12:02:13 -07:00
Lukács T. Berki
4668e9968c Merge "Remove memberInterVersionMutator." 2022-05-20 15:21:00 +00:00
Chris Parsons
6ce2cf9b69 cc bazel handlers: use better interface checking
This is a far better approach for ensuring that bazel handlers implement
the BazelHandler interface, as it causes a compile error if they do not
implement the appropriate interface methods.

Test: Manually verified no change in ninja file
Change-Id: I63a4f8b57e3aedd4c0915c2fd2eb7029e9a993aa
2022-05-20 10:54:17 -04:00
Christopher Parsons
489128b8ef Merge "Refactor mixed builds to only take one pass" 2022-05-20 14:13:49 +00:00
Chris Parsons
f874e46153 Refactor mixed builds to only take one pass
This large refactoring has both immense performance implications and
improves mixed builds complexity / usability. Summary:

1. Queueing calls to Bazel is done in a new mutator instead of a full
   soong_build pass. Normal soong_build flow is interrupted (via a
   functional hook in blueprint) to invoke bazel and parse its response.
2. Implementing mixed build support for additional modules is as simple
   as implementing MixedBuildsBuildable. In this interface, define the
   request that must be queued to Bazel, and then subsequently define
   how to handle the returned bazel cquery metadata.
3. Mixed builds consists of only a single pass. This greatly
   improves mixed build performance.

Result:
  A 33% runtime improvement on soong analysis phase with mixed builds.

Caveats:
  C++ BazelHandler handling still remains a bit of a mess; I did what
  I could within this CL's scope, but this may require additional cleanup.

Test: Treehugger
Test: Verified that aosp_arm ninja file is bit-for-bit identical with or
without this change.

Change-Id: I412d9c94d429105f4ebfafc84100d546069e6621
2022-05-20 10:04:13 -04:00
Paul Duffin
e73d52cb9b Merge "Add custom java_sdk_library info to the SDK info file" 2022-05-20 13:59:19 +00:00
Lukacs T. Berki
ab392edc47 Remove memberInterVersionMutator.
paulduffin@ says it's not necessary anymore.

Test: Presubmits.
Bug: 232546567
Change-Id: I6ac69fbdc7a202ac54f250ea6cde0ea99d75864c
2022-05-20 15:23:06 +02:00
Md Shahriar Hossain Sajib
cf5161be7c Merge "Revert "Turn gtest isolated true by default"" 2022-05-20 08:16:01 +00:00
Md Shahriar Hossain Sajib
d8b58663ff Revert "Turn gtest isolated true by default"
This reverts commit d2a9d88410.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=aosp_bramble-userdebug&lkgb=8618360&lkbb=8620137&fkbb=8618374, bug b/233280626

Bug: 233280626
Change-Id: If56b36ea1c883415b90bd2153707cb69df29776e
2022-05-20 08:02:50 +00:00
Yi Kong
8e836ba4b7 Merge "Rename modulesAddedWall to modulesWarningsAllowed" 2022-05-20 00:26:18 +00:00
Colin Cross
6c04c66b7e Merge "Don't call dexpreopter methods on host modules" 2022-05-19 20:46:23 +00:00
Julien Desprez
754edfa660 Merge "Turn gtest isolated true by default" 2022-05-19 20:38:45 +00:00