Commit Graph

83534 Commits

Author SHA1 Message Date
Neill Kapron
50a7bf8610 Soong: BPF: Cflag and btf defaults
Currently, all bpf programs require a cflags field which defines -Wall
and -Werror. This change enables this by default, and also enables
-Wextra. This removes boilerplate required for every bpf program, and
improves code quality.

Additionally, this change enables the default of 'btf: true' further
reducing the boilerplate required for most bpf programs in their
Android.bp file. BTF should be enabled by default, with only limited
mainlined bpf programs requiring BTF being disabled for compatibility
with older bpfloader releases.

Test: Treehugger
Change-Id: I8efd0f63115030d40c0ff7fe81d5345ff3436e5a
Signed-off-by: Neill Kapron <nkapron@google.com>
2024-07-30 22:03:27 +00:00
Inseob Kim
e1234e51b8 Merge changes from topic "revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA" into main
* changes:
  Conditionally pass kernel version to build.prop
  Revert^4 "Use Soong-built system/build.prop"
  Revert^4 "Sync gen_build_prop.py to sysprop.mk"
  Revert^4 "Add TARGET_SYSTEM_PROP to system build.prop"
  Revert^2 "Set output for build_prop even on Soong only build"
2024-07-30 03:51:03 +00:00
Treehugger Robot
77cd0a0080 Merge "Introduce build_from_text_stubs property in java_sdk_library" into main 2024-07-29 23:13:52 +00:00
Liana Kazanova
8effb623fd Merge "Revert "Switch NDK libc++ from prebuilts/ndk to prebuilts/clang"" into main 2024-07-29 23:05:00 +00:00
Liana Kazanova
08d5d260db Revert "Switch NDK libc++ from prebuilts/ndk to prebuilts/clang"
Revert submission 3195358-ndk-libcxx

Reason for revert: Droidmonitor created revert due to b/356220894. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3195358-ndk-libcxx

Change-Id: Ic9cd3d30637d5ac187d3fc80b34d45083f37064e
2024-07-29 22:58:39 +00:00
Jihoon Kang
48e2ac926b Introduce build_from_text_stubs property in java_sdk_library
Note that this property is currently a no-op. This change is submitted
separately in order to prevent submitting the entire topic in git_main
to mark a main-only module with this property.

Test: m nothing
Bug: 327507877
Change-Id: I62c2e3522bf9d0c5f7955e7c9bd2e0f66458e48c
2024-07-29 21:38:11 +00:00
Treehugger Robot
ea6451a03a Merge "Fix run_tool_with_logging_test in CI" into main 2024-07-29 20:57:46 +00:00
Treehugger Robot
c6f1fe0861 Merge "Cleanup configurable getter usages" into main 2024-07-29 20:49:06 +00:00
Ryan Prichard
02d80236a3 Merge "Switch NDK libc++ from prebuilts/ndk to prebuilts/clang" into main 2024-07-29 20:46:39 +00:00
Cole Faust
bf1d92ad20 Cleanup configurable getter usages
You don't have to call module.ConfigurableEvaluator(ctx) if ctx is
already a ModuleContext, you only need to do that for more restricted
contexts like SingletonContext.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I7612290d43dae7decfae283a341882d9016c98a3
2024-07-29 12:24:25 -07:00
Treehugger Robot
2487d8daf4 Merge "cc: Enable select syntax for cppflags" into main 2024-07-29 19:11:46 +00:00
Treehugger Robot
5089a18035 Merge "Make vbmeta Partitions property configurable" into main 2024-07-29 01:58:40 +00:00
Treehugger Robot
9aa84c6110 Merge "Do not rename prebuilt apexes for product packaging" into main 2024-07-26 21:08:31 +00:00
Spandan Das
a8e2d6173d Do not rename prebuilt apexes for product packaging
https://r.android.com/2901309 added support for handling installation
rules for multiple prebuilts. One of the implementation details there
was to change LOCAL_MODULE name to the source apex name in the generated
.mk files.

This causes issues in partner builds where the google singed apex
com.google.android.foo gets renamed to com.android.foo in
out/soong/Android-$PRODUCT.mk. If the partner builds does not include
the aosp apex in its PRODUCT_PACAKGES, then the google signed apex gets
elided from packaging.

This CL undoes that change. After this CL, the name of the module as it
appears in Android.bp will match the LOCAL_MODULE name emitted for
product packaging.

Test: in build/soong, go test ./apex
Bug: 355682304
Change-Id: Icadbb75609174cff5326f52baf7d53e901f9f1c0
2024-07-26 19:24:27 +00:00
Christopher Ferris
cdd872a5be Merge "Update tests to expect RBE not supported on linux." into main 2024-07-26 17:58:26 +00:00
Aleks Todorov
0384c97337 cc: Enable select syntax for cppflags
Bug: 325444956
Test: m
Test: m [custom build target with select in cppflags]
Change-Id: I7d27096526ce5b37afe447f900613a6fbb639986
2024-07-26 17:20:23 +01:00
Andrea Marchini
49ce87ef75 Soong cc proto fix for grpc plugin
- Update output file names when using grpc plugin (grpc.pb instead of pb)

Change-Id: I702553713d1a667f90a5502291bd15b7cedd7eb7
Signed-off-by: Andrea Marchini <amarchini@google.com>
2024-07-26 06:00:30 +00:00
Inseob Kim
4daca6b242 Make vbmeta Partitions property configurable
This allows using select statements.

Bug: 354824866
Test: boot
Change-Id: I6cb41177620f85697eeaa77d3aec79f21674e245
2024-07-26 11:17:52 +09:00
Treehugger Robot
cce2ca725d Merge "Enable select syntax support for phony_deps in phony_rule" into main 2024-07-26 02:08:09 +00:00
Ryan Prichard
5228aebbde Switch NDK libc++ from prebuilts/ndk to prebuilts/clang
Remove old NDK libc++ Soong modules, and use libunwind instead of
ndk_libunwind.

Bug: http://b/332594828
Test: m nothing --no-skip-soong-tests
Test: m blueprint_tests
Change-Id: I6763a4dbba660240e47a4a2eb179382c0a0a9840
2024-07-25 18:31:23 -07:00
Wei Li
9f13555225 Merge "Generate SBOM of products in Soong." into main 2024-07-26 00:45:43 +00:00
Treehugger Robot
a2f2e80c08 Merge "Fix mistake made when moving installmod from shell function standalone script" into main 2024-07-26 00:15:44 +00:00
Christopher Ferris
1db36e3888 Update tests to expect RBE not supported on linux.
Bug: 354280127

Test: Passes on linux
Test: Treehugger for the rest.
Change-Id: Ic1546a153e7e761a2132409743650cbf0a0b1ba6
2024-07-25 16:52:31 -07:00
Joe Onorato
8726dcd228 Fix mistake made when moving installmod from shell function standalone script
Bug: 355509078
Test: run installmod
Change-Id: I6ac58e8b2d58463f50eef54c6c29ce3bd399d0da
2024-07-25 16:21:28 -07:00
Makoto Onuki
7c52907acf Merge "Support resource APKs" into main 2024-07-25 22:18:19 +00:00
Treehugger Robot
38f97d7a08 Merge changes from topic "fix-presigned-apk-validation" into main
* changes:
  Fix presigned apk check for privileged apps
  Convert TestAndroidAppImport_Preprocessed to test fixtures
2024-07-25 21:17:25 +00:00
Taylor Santiago
dd65d3e672 Merge "Add ABFS (Android Build Filesystem) configuration option to Soong" into main 2024-07-25 21:04:06 +00:00
Makoto Onuki
3380f6deb3 Support resource APKs
- android_ravenwood_test can now have `resource_apk: "ANDROID_APP_MODULE"`.
This will copy the APK to the test directory as "ravenwood-res.apk".

- android_ravenwood_libgroup can now have `data: ["MODULE"]`.
We use this to add framework-res.apk (as `data:["framework-res"]`)
to the ravenwood runtime path.

Bug: 339614874
Test: m nothing --no-skip-soong-tests
Test: ATEST="atest --no-bazel-mode" $ANDROID_BUILD_TOP/frameworks/base/ravenwood/run-ravenwood-tests.sh
   Do it on both aosp/main and goog/main

Flag: EXEMPT: Host side change only

Change-Id: I36516fec068a6359688a1dbedcb10a49c4631441
2024-07-25 12:41:07 -07:00
Rashid Zaman
3bd28705f4 Fix presigned apk check for privileged apps
The validation checks that run for presigned apps currently expect that
privileged apps have uncompressed dex files but if
DONT_UNCOMPRESS_PRIV_APPS_DEXS is true (UncompressPrivAppDex false) this
doesn't have to be the case so make the validation consistent with this.
Also make TestAndroidAppImport_Preprocessed verify that extra arguments
to 'check_prebuilt_presigned_apk.py' are correct for both privileged and
non-privileged apps.

Test: m nothing --no-skip-soong-tests
Test: Add presigned, privileged android_app_import module with
compressed dex to PRODUCT_PACKAGES for aosp_cf_x86_64_phone,
lunch aosp_cf_x86_64_phone-trunk_staging-userdebug &&
m DONT_UNCOMPRESS_PRIV_APPS_DEXS=true no longer fails due to validation
error.

Change-Id: I7e22cf525cd9d99d1ecb24e4e2e99c3f9de48146
2024-07-25 12:04:26 -07:00
Rashid Zaman
5800d421c3 Convert TestAndroidAppImport_Preprocessed to test fixtures
In preparation for a subsequent CL convert the test to use test
fixtures.

Test: m nothing --no-skip-soong-tests
Change-Id: I12f3802419105c7ffc8e00e95a069432c6b99d53
2024-07-25 11:27:58 -07:00
Inseob Kim
036d9e6744 Conditionally pass kernel version to build.prop
This is to replicate Makefile's behavior as-is.

Bug: 322090587
Test: build and compare build command
Change-Id: Ib9ebec920701ea561a007bf2a1ae092ae1b4ff28
2024-07-25 20:15:54 +09:00
Inseob Kim
45ed4c2f9c Revert^4 "Use Soong-built system/build.prop"
ea04e564c2

Change-Id: I621be841ba5715479e321537866f8b3a880da397
2024-07-25 10:58:08 +00:00
Inseob Kim
2c7e13ea37 Revert^4 "Sync gen_build_prop.py to sysprop.mk"
c13856eb1d

Change-Id: I4af6737c9d96821b524e34f271e92b610430a8d4
2024-07-25 10:58:08 +00:00
Inseob Kim
26756a86c1 Revert^4 "Add TARGET_SYSTEM_PROP to system build.prop"
072c0e4fcb

Change-Id: I53a36f415a9bd472170f030f115039e623769acf
2024-07-25 10:58:08 +00:00
Inseob Kim
bf3222593a Revert^2 "Set output for build_prop even on Soong only build"
13c6231218

Change-Id: Ief5fd04e4ddb2fa884b16946b5b8baecc9da03ae
2024-07-25 10:58:08 +00:00
Pechetty Sravani (xWF)
13c6231218 Revert "Set output for build_prop even on Soong only build"
Revert submission 3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR

Reason for revert: Droidmonitor created revert due to b/355379515. Will be verifying through ABTD before submission.

Reverted changes: /q/submissionid:3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR

Change-Id: Iedc3434401d358ca4e716cdc056ff403eb3c5194
2024-07-25 09:21:09 +00:00
Pechetty Sravani (xWF)
072c0e4fcb Revert^3 "Add TARGET_SYSTEM_PROP to system build.prop"
ff506d1af2

Change-Id: I5659e93d4c45fdca20357b4fc61f936cfd0e748d
2024-07-25 09:21:09 +00:00
Pechetty Sravani (xWF)
c13856eb1d Revert^3 "Sync gen_build_prop.py to sysprop.mk"
e176dc9ee2

Change-Id: I8cf265281ff16ad65d1fe8d6084a6fd49adc294c
2024-07-25 09:21:09 +00:00
Pechetty Sravani (xWF)
ea04e564c2 Revert^3 "Use Soong-built system/build.prop"
625f66136d

Change-Id: I69b09646fb3286dcc5df638f87625f4eb8dcfcb2
2024-07-25 09:21:09 +00:00
Inseob Kim
b302108252 Merge "Set output for build_prop even on Soong only build" into main 2024-07-25 07:27:59 +00:00
Inseob Kim
625f66136d Revert^2 "Use Soong-built system/build.prop"
3ef9ed9848

Change-Id: I132ea8c2feabedc8b5e9bb8c0adb8f0995b9a2ec
2024-07-25 03:27:49 +00:00
Inseob Kim
e176dc9ee2 Revert^2 "Sync gen_build_prop.py to sysprop.mk"
0e7cde59c8

Change-Id: If8b60802c8bdc62689d8939d5efa9007ad814d85
2024-07-25 03:27:49 +00:00
Inseob Kim
ff506d1af2 Revert^2 "Add TARGET_SYSTEM_PROP to system build.prop"
027f50246f

Change-Id: I3e2e8d90029f897f1dbf76a829518cb7fe4a47b1
2024-07-25 03:27:49 +00:00
Inseob Kim
3a69282271 Set output for build_prop even on Soong only build
Without this change, Soong only build may break unexpectedly if some
modules refer to the build_prop module.

Bug: 322090587
Test: soong only build
Change-Id: I7571bdf0aa6c08ade8f130842c84c02bb0233acb
2024-07-25 11:54:28 +09:00
Inseob Kim
7d7baf7220 Merge changes from topic "revert-3184480-system_build_prop_soong-BZIDUTEOOC" into main
* changes:
  Revert "Add TARGET_SYSTEM_PROP to system build.prop"
  Revert "Sync gen_build_prop.py to sysprop.mk"
  Revert "Use Soong-built system/build.prop"
2024-07-25 02:48:23 +00:00
Inseob Kim
027f50246f Revert "Add TARGET_SYSTEM_PROP to system build.prop"
Revert submission 3184480-system_build_prop_soong

Reason for revert: breaks ndk and mainline build 

Reverted changes: /q/submissionid:3184480-system_build_prop_soong

Change-Id: Ic089dc3dfcbf2083d1bcf2413be432dcb61ce525
2024-07-25 02:45:53 +00:00
Inseob Kim
0e7cde59c8 Revert "Sync gen_build_prop.py to sysprop.mk"
Revert submission 3184480-system_build_prop_soong

Reason for revert: breaks ndk and mainline build 

Reverted changes: /q/submissionid:3184480-system_build_prop_soong

Change-Id: I833aacf23bbe7cd16b6aad0b7d94a9b46a8192e4
2024-07-25 02:45:53 +00:00
Inseob Kim
3ef9ed9848 Revert "Use Soong-built system/build.prop"
Revert submission 3184480-system_build_prop_soong

Reason for revert: breaks ndk and mainline build 

Reverted changes: /q/submissionid:3184480-system_build_prop_soong

Change-Id: I1738cc0a85428d3fd0a0ee196fa6d54270e6f1ec
2024-07-25 02:45:53 +00:00
Inseob Kim
b93b9f0b3a Merge changes from topic "system_build_prop_soong" into main
* changes:
  Use Soong-built system/build.prop
  Sync gen_build_prop.py to sysprop.mk
  Add TARGET_SYSTEM_PROP to system build.prop
2024-07-25 02:07:00 +00:00
Treehugger Robot
6899b7ed22 Merge changes from topic "avf_apex_android_bp_select" into main
* changes:
  Make more apex properties configurable
  Make genrule's srcs property configurable
  Make some apex properties configurable
  Make the vintf_fragments property configurable
  Make the defaults property configurable
2024-07-25 01:52:54 +00:00