Commit Graph

87306 Commits

Author SHA1 Message Date
Mårten Kongstad
00cf045c85 aconfig: restrict valid namespace and flag names
The namespace and flag names will be used as identifiers in the
auto-generated code. Place restrictions on what constitutes a valid
name.

Valid identifiers are those that match /[a-z][a-z0-9_]/. aconfig
explicitly does not implement any automatic translation to make names
valid identifiers: this sidesteps potential conflicts such as "foo.bar"
and "foo_bar" mapping to the same name if dots were translated to
underscores.

Bug: b/284252015
Test: atest aconfig.test
Change-Id: I38d005a74311e5829e540063404d1565071e6e96
2023-05-26 17:09:10 +02:00
Mårten Kongstad
e144b18ab9 Merge changes from topic "aconfig-create-rust-lib" am: aa977fb083 am: 5c2756c13a am: e6c068798d
Original change: https://android-review.googlesource.com/c/platform/build/+/2602726

Change-Id: I84c5ac6dc692612f1caa9c45fc99be8319287c3f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 09:01:35 +00:00
Mårten Kongstad
e6c068798d Merge changes from topic "aconfig-create-rust-lib" am: aa977fb083 am: 5c2756c13a
Original change: https://android-review.googlesource.com/c/platform/build/+/2602726

Change-Id: Ia9af25e2b899d7f5cef5c06cfd22ad90c33ab22f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 07:49:56 +00:00
Mårten Kongstad
5c2756c13a Merge changes from topic "aconfig-create-rust-lib" am: aa977fb083
Original change: https://android-review.googlesource.com/c/platform/build/+/2602726

Change-Id: I2e708156312d2274c430a698b983b5cfe73c20ab
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 07:08:20 +00:00
Mårten Kongstad
aa977fb083 Merge changes from topic "aconfig-create-rust-lib"
* changes:
  aconfig: first iteration of Rust codegen
  aconfig: improve dump --format=debug output
2023-05-26 06:00:47 +00:00
Spandan Das
7c4129e4f5 [automerger skipped] Create default PRODUCT_INCLUDE_TAGS in product_config am: 593b2e5ce4 -s ours
am skip reason: Merged-In I322b52c34ed339989207609dd0fd23c27ed1f697 with SHA-1 2e69ea6228 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/23435198

Change-Id: If8fe0992ae2a33b6c872ce5d94e90c91b7354210
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-26 02:40:51 +00:00
Spandan Das
89fe4dd6f0 Merge "Create default PRODUCT_INCLUDE_TAGS in product_config" am: 90673eb224 am: 3639919c3b am: 6c7fad39da
Original change: https://android-review.googlesource.com/c/platform/build/+/2601327

Change-Id: I58412f3acf7d19fc211b30734a907bc7636e56f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 19:03:02 +00:00
Spandan Das
6c7fad39da Merge "Create default PRODUCT_INCLUDE_TAGS in product_config" am: 90673eb224 am: 3639919c3b
Original change: https://android-review.googlesource.com/c/platform/build/+/2601327

Change-Id: I9bf82a97d32e4e018e11b7e3ae6e1e9f96230166
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 18:18:44 +00:00
Spandan Das
3639919c3b Merge "Create default PRODUCT_INCLUDE_TAGS in product_config" am: 90673eb224
Original change: https://android-review.googlesource.com/c/platform/build/+/2601327

Change-Id: I46fa139988d8170231cca15c8421248a1efc480c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 17:34:34 +00:00
Spandan Das
593b2e5ce4 Create default PRODUCT_INCLUDE_TAGS in product_config
In the current setup in partner branch, we
1. Add blueprint_package_includes to prebuilts/module_sdk/*
2. Add the correct PRODUCT_INCLUDE_TAGS to partner_modules

This means in those setups,none of the prebuilts are visible to aosp products since
they they do not inherit partner_module makefiles.
```
e.g.
prebuilts/module_sdk/art/current/Android.bp
prebuilts/module_sdk/art/<go_specific>/current/Android.bp

// aosp_arm cannot find either

```

To solve this, this CL creates a default inclusion tag for all products
that do not set any PRODUCT_INCLUDE_TAGS explicitly.
In the previous example, Soong analysis of aosp_* will use
prebuilts/module_sdk/art/current/Android.bp. This should be a no-op for
aosp and internal branches since none of the Android.bp files today contains
blueprint_package_includes

Test: m nothing for aosp_arm in the test branch of b/278604467#comment20
Test: m nothing for partner product that uses big android sdk
Test: m nothing for partner product that uses go sdk

Bug: 278604467
(cherry picked from https://android-review.googlesource.com/q/commit:2e69ea622877e7f88b82db4adbc284b9342f8c2c)
Merged-In: I322b52c34ed339989207609dd0fd23c27ed1f697
Change-Id: I322b52c34ed339989207609dd0fd23c27ed1f697
cp required as per b/278604467#comment25
2023-05-25 16:50:39 +00:00
Spandan Das
90673eb224 Merge "Create default PRODUCT_INCLUDE_TAGS in product_config" 2023-05-25 16:46:42 +00:00
Mårten Kongstad
f73b963283 aconfig: first iteration of Rust codegen
Add a new `create-rust-lib` command to generate Rust code. The output is
a src/lib.rs file; the build system is assumed to set the generated
crate's name.

For READ_ONLY flags, the generated code returns a hard-coded true or false.

For READ_WRITE flags, the generated code reaches out to DeviceConfig via
the cc_library server_configurable_flags via the
libprofcollect_libflags_rust Rust bindings. The build system is assumed
to add this to the generated crate's dependencies.

Note: libprofcollect_libflags_rust seems generic enough that it should
be moved to an official Rust wrapper for server_configurable_flags. This
is tracked in b/284096062.

Summary of module the built system is assumed to wrap the auto-generated
code in:

  rust_library {
      name: "lib<namespace>_rs",
      crate_name: "<namespace>_rs",
      edition: "2021",
      clippy_lints: "none",
      no_stdlibs: true,
      lints: "none",
      srcs: ["src/lib.rs"],
      rustlibs: [
          "libprofcollect_libflags_rust",
      ],
  }

Also add a set of test input to be used in the unit tests for a more
coherent test strategy. A follow-up CL will migrate the code in
commands.rs, codegen_java.rs and codegen_cpp.rs.

Bug: 279483360
Bug: 283907905
Test: atest aconfig.test
Test: manual: create cache from files in testdata, create rust lib, add to module template above, verify the module builds
Change-Id: I02606aa3686eda921116e33f7e2df8fd1156a7aa
2023-05-25 16:18:59 +02:00
Treehugger Robot
f0b33778d1 Merge "Add a copy of AB OTA partition list prop in vendor partition" am: 6f74957c19 am: b7bf0eb30b am: 8530c7f582
Original change: https://android-review.googlesource.com/c/platform/build/+/2595649

Change-Id: I013e166cb03ef927a5af08fb6969301d0d69850b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 13:06:22 +00:00
Treehugger Robot
26fda7e335 Merge "Fix merge_target_files in GRF case" am: b3adc24301 am: 592ad2cb13 am: 7c629dbb53
Original change: https://android-review.googlesource.com/c/platform/build/+/2564310

Change-Id: I5a0f0236e07f50b7d8cfa05b476734ed3f98300a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 13:06:05 +00:00
Treehugger Robot
8530c7f582 Merge "Add a copy of AB OTA partition list prop in vendor partition" am: 6f74957c19 am: b7bf0eb30b
Original change: https://android-review.googlesource.com/c/platform/build/+/2595649

Change-Id: I1e4bf81cc64a0876a4f8a7e0c022a62233a9e744
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 12:21:06 +00:00
Treehugger Robot
7c629dbb53 Merge "Fix merge_target_files in GRF case" am: b3adc24301 am: 592ad2cb13
Original change: https://android-review.googlesource.com/c/platform/build/+/2564310

Change-Id: Icbbb3f0aea90b72d62590bed1e540ab67709c7a8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 12:20:50 +00:00
Treehugger Robot
b7bf0eb30b Merge "Add a copy of AB OTA partition list prop in vendor partition" am: 6f74957c19
Original change: https://android-review.googlesource.com/c/platform/build/+/2595649

Change-Id: Ia7bf4f85f58b628bc94b37610fca072bfc44d302
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 11:38:09 +00:00
Treehugger Robot
592ad2cb13 Merge "Fix merge_target_files in GRF case" am: b3adc24301
Original change: https://android-review.googlesource.com/c/platform/build/+/2564310

Change-Id: I564bb6d43bfa5b9cb79463f0ba50038d03ef6abb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 11:37:45 +00:00
Treehugger Robot
6f74957c19 Merge "Add a copy of AB OTA partition list prop in vendor partition" 2023-05-25 11:14:40 +00:00
Treehugger Robot
b3adc24301 Merge "Fix merge_target_files in GRF case" 2023-05-25 10:46:32 +00:00
Nikolas Havrikov
15ba4a9bc6 Do not include SoundPicker on Android TV
This CL leverages the PRODUCT_IS_ATV build time variable to selectively
exclude the SoundPicker package from the PRODUCT_PACKAGES. This also
paves the way to approach the removal of other unused packages from TV.

Bug: 276897441
Test: make
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:413b614d0d7bc1b412c87672f995fabfadbb6bc8)
Merged-In: Ifb25c1f26df545d31fb80f8e43c217fa8806e021
Change-Id: Ifb25c1f26df545d31fb80f8e43c217fa8806e021
2023-05-25 09:00:18 +00:00
Treehugger Robot
173bfad7c9 Merge "Support dynamic 64-bit drmserver" am: 95ad4d4ba0 am: 6c716889f9 am: 979255934c
Original change: https://android-review.googlesource.com/c/platform/build/+/2588496

Change-Id: Ic7cde71f181a5b437d77e28e07147fd73978dc3a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 03:50:01 +00:00
Treehugger Robot
979255934c Merge "Support dynamic 64-bit drmserver" am: 95ad4d4ba0 am: 6c716889f9
Original change: https://android-review.googlesource.com/c/platform/build/+/2588496

Change-Id: Ia815c1f9b220848a96ce25b735dde5b1ccc80293
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 03:05:16 +00:00
Treehugger Robot
6c716889f9 Merge "Support dynamic 64-bit drmserver" am: 95ad4d4ba0
Original change: https://android-review.googlesource.com/c/platform/build/+/2588496

Change-Id: I05f061809b34064602aaec04e3403890f8b7c739
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-25 02:46:47 +00:00
Treehugger Robot
95ad4d4ba0 Merge "Support dynamic 64-bit drmserver" 2023-05-25 02:22:45 +00:00
Kelvin Zhang
ef158a9a51 Add a copy of AB OTA partition list prop in vendor partition
The sysprop to enable/disable AB OTA update is in vendor partition,
but the sysprop which stores list of AB partitions is in product(which
is on system side of treble boundary). This is inconsistent and might
cause problems during mixed build. To mitigate, add a copy of AB
partition list prop in vendor, and readers of this prop will prefer the
vendor copy instead.

Bug: 283042235
Test: th
Change-Id: Idd73971817f663b08824e285d840ed8d8dd60d2c
2023-05-24 18:26:27 -07:00
Wei Li
66a49abbf9 [automerger skipped] Add upstream package of a prebuilt fork package, which will have the package information from the METADATA file. am: 6284936f20 -s ours
am skip reason: Merged-In Ic8eb42c369de8c94c7977b9631ff4b9084dfef01 with SHA-1 16e7aa3c2e is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/+/23397981

Change-Id: I77be618e08a1d35fc7804da0bbcc21b1ad8dbf80
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-24 21:22:34 +00:00
Mårten Kongstad
993111f91c aconfig: improve dump --format=debug output
Use Rust's {:#?} formatter for more readable output.

Bug: 279485059
Test: atest aconfig.test
Change-Id: I127f413e3d7aebfba96cad1dd58d9e261dd613a4
2023-05-24 14:56:45 +02:00
Vinh Tran
ae816fa64f Merge "Support sandboxing genrule" am: 2c5fb95f32 am: 4f86347cdd am: 9dee8b31b3
Original change: https://android-review.googlesource.com/c/platform/build/+/2585206

Change-Id: I00e04c04ae900b9e31bd9f5f18ad37c166eb9a8a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 23:13:28 +00:00
Wei Li
6284936f20 Add upstream package of a prebuilt fork package, which will have the package information from the METADATA file.
Bug: 266726655
Test: CIs
Test: lunch barbet-user && m sbom
(cherry picked from https://android-review.googlesource.com/q/commit:16e7aa3c2ea779ff91a0d88b431a2437964ae1a6)
Merged-In: Ic8eb42c369de8c94c7977b9631ff4b9084dfef01
Change-Id: Ic8eb42c369de8c94c7977b9631ff4b9084dfef01
2023-05-23 23:12:36 +00:00
Treehugger Robot
4f4da804bf Merge "Unsparse images before generating OTA" am: b4406d06f0 am: 74ad39125c am: 8b55fd52a0
Original change: https://android-review.googlesource.com/c/platform/build/+/2598008

Change-Id: Ib062901d1b91380b98da95f38666c66f1205f587
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 23:11:17 +00:00
Vinh Tran
9dee8b31b3 Merge "Support sandboxing genrule" am: 2c5fb95f32 am: 4f86347cdd
Original change: https://android-review.googlesource.com/c/platform/build/+/2585206

Change-Id: Ib3a49f4d1e7ccb7d5459a688e0b0eef6fea4da76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 22:08:05 +00:00
Treehugger Robot
8b55fd52a0 Merge "Unsparse images before generating OTA" am: b4406d06f0 am: 74ad39125c
Original change: https://android-review.googlesource.com/c/platform/build/+/2598008

Change-Id: Id41c2d6dab065e00e7451658da465729295d368a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 22:07:32 +00:00
Vinh Tran
4f86347cdd Merge "Support sandboxing genrule" am: 2c5fb95f32
Original change: https://android-review.googlesource.com/c/platform/build/+/2585206

Change-Id: Iafc5c069b70153ee24b721c8bf4c806c0bbbbc51
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 21:47:27 +00:00
Vinh Tran
2c5fb95f32 Merge "Support sandboxing genrule" 2023-05-23 21:29:27 +00:00
Treehugger Robot
74ad39125c Merge "Unsparse images before generating OTA" am: b4406d06f0
Original change: https://android-review.googlesource.com/c/platform/build/+/2598008

Change-Id: I40ac20dd7b30d11e1eda77688718566af4c1c416
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 21:22:54 +00:00
Treehugger Robot
b4406d06f0 Merge "Unsparse images before generating OTA" 2023-05-23 20:51:10 +00:00
Spandan Das
2e69ea6228 Create default PRODUCT_INCLUDE_TAGS in product_config
In the current setup in partner branch, we
1. Add blueprint_package_includes to prebuilts/module_sdk/*
2. Add the correct PRODUCT_INCLUDE_TAGS to partner_modules

This means in those setups,none of the prebuilts are visible to aosp products since
they they do not inherit partner_module makefiles.
```
e.g.
prebuilts/module_sdk/art/current/Android.bp
prebuilts/module_sdk/art/<go_specific>/current/Android.bp

// aosp_arm cannot find either

```

To solve this, this CL creates a default inclusion tag for all products
that do not set any PRODUCT_INCLUDE_TAGS explicitly.
In the previous example, Soong analysis of aosp_* will use
prebuilts/module_sdk/art/current/Android.bp. This should be a no-op for
aosp and internal branches since none of the Android.bp files today contains
blueprint_package_includes

Test: m nothing for aosp_arm in the test branch of b/278604467#comment20
Test: m nothing for partner product that uses big android sdk
Test: m nothing for partner product that uses go sdk

Bug: 278604467
Change-Id: I322b52c34ed339989207609dd0fd23c27ed1f697
2023-05-23 20:01:39 +00:00
Treehugger Robot
7f2b944d45 [automerger skipped] Merge "Add BUILD_BROKEN_PLUGIN_VALIDATION flag" am: 2014bbb8e7 am: 43201c9e99 -s ours am: d2794ee8c9 -s ours
am skip reason: Merged-In Ia2fe83d82ead618e480e99a82b1b825ed08d3eab with SHA-1 03bd5812e8 is already in history

Original change: https://android-review.googlesource.com/c/platform/build/+/2595975

Change-Id: Ia66cc144982b71ce87538004c36f54a6954896d8
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 18:16:53 +00:00
Treehugger Robot
f2ed62b4df Merge "Update vndk with update-vndk-list.sh" am: 910393d5a3 am: 23f56b980e am: 6a6be31ed4
Original change: https://android-review.googlesource.com/c/platform/build/+/2599605

Change-Id: I923a6aa1fcd32272adb5359857402a45c4859160
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 18:16:34 +00:00
Treehugger Robot
d2794ee8c9 [automerger skipped] Merge "Add BUILD_BROKEN_PLUGIN_VALIDATION flag" am: 2014bbb8e7 am: 43201c9e99 -s ours
am skip reason: Merged-In Ia2fe83d82ead618e480e99a82b1b825ed08d3eab with SHA-1 03bd5812e8 is already in history

Original change: https://android-review.googlesource.com/c/platform/build/+/2595975

Change-Id: I2e26094cc8ea8a191587947126959172fb0ef360
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 17:34:16 +00:00
Treehugger Robot
6a6be31ed4 Merge "Update vndk with update-vndk-list.sh" am: 910393d5a3 am: 23f56b980e
Original change: https://android-review.googlesource.com/c/platform/build/+/2599605

Change-Id: I942fce4cd2c06a1b7c67abefd40e7dfcaed78232
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 17:33:57 +00:00
Treehugger Robot
43201c9e99 Merge "Add BUILD_BROKEN_PLUGIN_VALIDATION flag" am: 2014bbb8e7
Original change: https://android-review.googlesource.com/c/platform/build/+/2595975

Change-Id: I326eafff5ddf8197c9f4dc9906aafdaecd93d1b1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 17:13:29 +00:00
Treehugger Robot
23f56b980e Merge "Update vndk with update-vndk-list.sh" am: 910393d5a3
Original change: https://android-review.googlesource.com/c/platform/build/+/2599605

Change-Id: Ia1900ade879f7647dd38310583362c92c7f18d46
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 17:11:46 +00:00
Treehugger Robot
2014bbb8e7 Merge "Add BUILD_BROKEN_PLUGIN_VALIDATION flag" 2023-05-23 17:08:46 +00:00
Treehugger Robot
910393d5a3 Merge "Update vndk with update-vndk-list.sh" 2023-05-23 16:33:31 +00:00
Treehugger Robot
346fd2c62e Merge "Fix build error about jar manifest" am: 27efd6e1eb am: 231a7e7741 am: c3ec285605
Original change: https://android-review.googlesource.com/c/platform/build/+/2599886

Change-Id: I68307bc290786a70781be56111f717b81d5889e5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 14:44:43 +00:00
Treehugger Robot
c3ec285605 Merge "Fix build error about jar manifest" am: 27efd6e1eb am: 231a7e7741
Original change: https://android-review.googlesource.com/c/platform/build/+/2599886

Change-Id: Ib152f2e71b9387de6b89d8460bc629cd0e2b497f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 13:59:01 +00:00
Treehugger Robot
231a7e7741 Merge "Fix build error about jar manifest" am: 27efd6e1eb
Original change: https://android-review.googlesource.com/c/platform/build/+/2599886

Change-Id: Icce798dca20864e8901121de8f5c07162b0c3703
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-23 13:19:03 +00:00
Treehugger Robot
27efd6e1eb Merge "Fix build error about jar manifest" 2023-05-23 12:44:10 +00:00