Commit graph

82001 commits

Author SHA1 Message Date
Zi Wang
6c9fa02204 Merge "Use OutputFilesProvider on bpf" into main 2024-06-05 15:55:34 +00:00
mrziwang
e6c8581fbe Use OutputFilesProvider on bpf
This changes makes bpf module type uses OutputFilesProvider,
instead of current OutputFileProducer for inter-module-
communication.

Test: CI
Bug: 339477385
Bug: 342406930
Change-Id: I85d1141e9f6583cc5427756107da99f56b0c7ea1
2024-06-04 22:09:13 -07:00
LaMont Jones
7bd25635aa Merge "Allow product-specific release configs." into main 2024-06-05 00:07:28 +00:00
Cole Faust
3f7b73c639 Merge "genrule: Make cmd configurable" into main 2024-06-04 23:23:32 +00:00
Cole Faust
83838b6297 Merge "Cleanup dirmods, outmod, and pathmod" into main 2024-06-04 22:03:22 +00:00
Treehugger Robot
2e264ce8e1 Merge "Ignore_max_page_size option." into main 2024-06-04 21:29:47 +00:00
LaMont Jones
b4f866c73c Allow product-specific release configs.
Bug: 343794062
Test: manual
Change-Id: Ifdfab5978221f1396681a2c851bad7be502b6ea7
2024-06-04 14:27:07 -07:00
Cole Faust
ec701ded12 Cleanup dirmods, outmod, and pathmod
- Use argparse for parsing
- Correct copy/pasted documentation
- Misc small tweaks

Bug: 340648588
Test: manually
Change-Id: I11373bd25712b6880517efbb7aefabf70d29a771
2024-06-04 12:30:55 -07:00
Cole Faust
5f2be11396 Make pathmod give absolute paths
This was broken when pathmod was turned into a standalone script.

Bug: 340648588
Test: gomod frameworks-minus-apex from build/soong
Change-Id: Ibd5eaf2c29d232c1a7da432723f7c6b6fa8bce83
2024-06-04 12:14:35 -07:00
Yu Liu
fba4e70227 Merge "Upload build.trace.gz for user builds." into main 2024-06-04 17:24:50 +00:00
Aleks Todorov
1eb06c4a67 genrule: Make cmd configurable
Bug: 325067608
Bug: 325444956
Test: m
Test: m [custom genrule with select]
Change-Id: I3a2307a8d0f65ee419b935a30742f96e5733a81f
2024-06-04 18:20:29 +01:00
Steven Moreland
dabe2d4336 Ignore_max_page_size option.
Option for specific prebuilts to opt out of
the prebuilt page size check.

Like allow_undefined_symbols.

Bug: 342466032
Test: build using this to opt out
Change-Id: I335c0beb66c10b260e7c3e405f05027e7718fe07
2024-06-04 01:27:30 +00:00
Ronald Braunstein
01d31bdc98 Reapply "Change test_module_config from copying files to symlink ..."
This reverts commit c6a321e4de.

Original commit broke whe building sdk/ndk in postsubmit because of
missing target arch.

See: https://android-build.corp.google.com/artifact/submitted/11914755/mainline_modules_sdks-trunk_staging-userdebug/latest/view/logs%2Fbuild_error.log

Reapplying originaly commit and adding fix in patchest.

Test: DIST_DIR=/usr/local/google/dist/bug TARGET_RELEASE=trunk_staging TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true packages/modules/common/build/mainline_modules_sdks.sh
Test: m general-tests
Change-Id: Id844feb7ff9750bcd5af890a9fd26f7342344965
2024-06-02 07:24:51 -07:00
Priyanka Advani
d5e16ac52b Merge "Revert "Change test_module_config from copying files to symlink ..."" into main 2024-05-31 23:39:49 +00:00
Priyanka Advani
c6a321e4de Revert "Change test_module_config from copying files to symlink ..."
Revert submission 3060229-ron-tmc-symlinks

Reason for revert: Droidmonitor created revert due to b/344045516

Reverted changes: /q/submissionid:3060229-ron-tmc-symlinks

Change-Id: If5045366677163560cdae95c0ab74256b4b49b9a
2024-05-31 23:31:13 +00:00
Ronald Braunstein
fb9191bcfe Merge "Change test_module_config from copying files to symlink files." into main 2024-05-31 22:58:10 +00:00
Joe Onorato
5219ed0b4b Merge changes from topic "list_releases" into main
* changes:
  Add list_releases command
  Add standalone list_products and list_variants commands.
2024-05-31 20:22:06 +00:00
Treehugger Robot
1d903eb078 Merge "Update exportable to handle documentation issues being errors" into main 2024-05-31 18:02:54 +00:00
Paul Duffin
71527b76f6 Update exportable to handle documentation issues being errors
Follow-up to https://r.android.com/3106478 to have exportable handle
documentation issues being errors in the same way as everything does.

Bug: 343157584
Test: ./gradlew
Change-Id: Iba490e46e2ff202e2ef78f49389319ee8549fe3f
2024-05-31 17:41:10 +01:00
Treehugger Robot
9b8cfd5144 Merge "Add prior_stages: to release config" into main 2024-05-31 16:40:49 +00:00
LaMont Jones
ff1d27d5b4 Merge "Limit release config inheritance from aliases" into main 2024-05-31 15:47:30 +00:00
Ronald Braunstein
f216af5653 Change test_module_config from copying files to symlink files.
Now the derived modules will have symlink's to base's testcase dir
rather than copyfile files from base's intermediates dir.

I also removed storing the "base" module as dependency and only use
data from the provider in GenerateAndroidBuildActions and
AndroidMkEntries.
I did have to add two fields to the provider for this.

To ensure the symlinks always resolve to a physical file, I also added
goals such that building `derived-target` will also build `build-target`

Create new Make variable: LOCAL_SOONG_INSTALLED_COMPATIBILITY_SUPPORT_FILES
for tasks/general-tests.mk,device-tests.mk to read.
This allows "support" files that are installed with soong rules rather
than make rules to still end up in the zips.

Sample dir structure:
% tree -ls testcases                                                                                                                                                                                                                                                   aosp_cf_x86_64_phone[4:31:54]/0
[       4096]  testcases
├── [       4096]  FrameworksServicesTests
│   ├── [       4096]  data
│   │   └── [        851]  broken_shortcut.xml
│   ├── [       2800]  FrameworksServicesTests.config
│   ├── [      12695]  JobTestApp.apk
│   ├── [       8599]  MediaButtonReceiverHolderTestHelperApp.apk
│   ├── [      16791]  SimpleServiceTestApp1.apk
│   ├── [      16791]  SimpleServiceTestApp2.apk
│   ├── [      16791]  SimpleServiceTestApp3.apk
│   ├── [    1017763]  SuspendTestApp.apk
│   └── [       4096]  x86_64
│       └── [   79827767]  FrameworksServicesTests.apk
└── [       4096]  FrameworksServicesTests_contentprotection
    ├── [       4096]  data
    │   └── [         54]  broken_shortcut.xml -> ../../FrameworksServicesTests/data/broken_shortcut.xml
    ├── [       3005]  FrameworksServicesTests_contentprotection.config
    ├── [         41]  JobTestApp.apk -> ../FrameworksServicesTests/JobTestApp.apk
    ├── [         69]  MediaButtonReceiverHolderTestHelperApp.apk -> ../FrameworksServicesTests/MediaButtonReceiverHolderTestHelperApp.apk
    ├── [         52]  SimpleServiceTestApp1.apk -> ../FrameworksServicesTests/SimpleServiceTestApp1.apk
    ├── [         52]  SimpleServiceTestApp2.apk -> ../FrameworksServicesTests/SimpleServiceTestApp2.apk
    ├── [         52]  SimpleServiceTestApp3.apk -> ../FrameworksServicesTests/SimpleServiceTestApp3.apk
    ├── [         45]  SuspendTestApp.apk -> ../FrameworksServicesTests/SuspendTestApp.apk
    ├── [         36]  test_module_config.manifest
    └── [       4096]  x86_64
        ├── [         64]  FrameworksServicesTests.apk -> ../../FrameworksServicesTests/x86_64/FrameworksServicesTests.apk
        └── [         36]  UNUSED-FrameworksServicesTests.apk

Test: m clean && atest FrameworksServicesTests_contentprotection
Test: m clean && atest CtsDevicePolicyManagerTestCases_ParentProfileApiDisabled

Bug: b/332320956
Change-Id: I8466f253fa559bc74cef4533edf263650e96bbfb
2024-05-31 08:24:11 -07:00
Alyssa Ketpreechasawat
4aff462533 Merge "Add RELEASE_APEX_CONTRIBUTIONS_TELEMETRY_TVP build flag" into main 2024-05-31 08:36:43 +00:00
LaMont Jones
756bd68cde Limit release config inheritance from aliases
If the release config has a name matching build prefixes, it may not
inherit from an alias.

Bug: 340208722
Bug: 328495189
Test: manual
Change-Id: Idb7b1fa372db980c5732b700663553b7a9bf4a36
2024-05-30 20:23:01 -07:00
LaMont Jones
5195b82f42 Add prior_stages: to release config
Include those paths in the inheritance graph.

Bug: 348495189
Test: manual
Merged-In: I993af3a34ab7dd9a3346c6ffccb17e7abff23545
Change-Id: I993af3a34ab7dd9a3346c6ffccb17e7abff23545
2024-05-30 20:22:49 -07:00
Treehugger Robot
6e1a3815d8 Merge "Make dex_preopt.enable_prof_rewrite=false an error for optimized apps" into main 2024-05-31 02:28:03 +00:00
Treehugger Robot
55ee3fcef6 Merge "Create inheritance graph" into main 2024-05-31 00:38:07 +00:00
Treehugger Robot
fd0715b5e9 Merge "Better default value for RELEASE_PLATFORM_VERSION" into main 2024-05-31 00:32:45 +00:00
LaMont Jones
ed22f82c01 Create inheritance graph
release-config now creates `inhertance_graph-${TARGET_PRODUCT}.dot`
showing the inheritance graph for all release configs present for
${TARGET_PRODUCT}.

Bug: 328495189
Test: manual, TH
Change-Id: I79242eaa848e0374b33f376e44d8938e9d398e21
2024-05-30 16:11:58 -07:00
Joe Onorato
53f3057037 Add list_releases command
Bug: 340648588
Test: list_releases
Change-Id: Ibce4704c64620b74c24952f16c2be902d8483f02
2024-05-30 15:52:09 -07:00
Joe Onorato
c6e5a45667 Add standalone list_products and list_variants commands.
get_releases coming soon

Test: build/make/tools/envsetup/run_envsetup_tests
Bug: 340648588
Change-Id: I32e7b868d04656e39f277bb37661eadab9751d7c
2024-05-30 15:39:21 -07:00
LaMont Jones
5a48f0d7f2 Better default value for RELEASE_PLATFORM_VERSION
If the release config name is a build prefix and different from the
inherited value, set RELEASE_PLATFORM_VERSION based on the release
config name.

Bug: 348495189
Test: manual
Change-Id: I95d715150cba9b57e343a8b8364d36f38dcc18a3
2024-05-30 14:43:48 -07:00
Spandan Das
15a67111f8 Make dex_preopt.enable_prof_rewrite=false an error for optimized apps
If profile guided dexpreopt _and_ optimization/obfuscation is true, then
apps must use the rewritten profile created by r8/d8

Bug: 335418838
Test: m nothing --no-skip-soong-tests
Change-Id: Iac45b614f43e52ac40ad1d13df0338bcafa788c3
2024-05-30 20:44:44 +00:00
Alyssa Ketpreechasawat
dcda1c8906 Add RELEASE_APEX_CONTRIBUTIONS_TELEMETRY_TVP build flag
Bug: 342624660
Test: check com.google.mainline.go.telemetry_tplus in out/soong/prebuilt_info.json (go target)
Change-Id: I201b58c08772669b54c396b4c4dbeccbb4b5147c
2024-05-30 20:24:29 +00:00
Spandan Das
a866713ddb Handle missing apex_contributions
Some minimal branches have v/g_s/build/release (where apex_contibutions
have been set to mainline prebuilts), but not v/g/b (where the apex_contributions
for prebuilts have been defined). These minimal branches are unsuitable
for building a product that consume mainline prebuilts, but they would
still like to do aosp product builds.

aosp products should not use the mainline prebuilts anyways, but this
has been implemented as
- always create the dependency edge to the selected apex contributions
- do not visit the dependency edge subsequently if
  IgnoreApexContributions is set set to true

To support aosp product builds in minimal branches, this CL updates the
implementation to skip creating the dependency edge when
IgnoreApexContributions is set to true

Test: go test ./android
Change-Id: Iaa0971760e64f9b7a03542f179231ce2268b6616
2024-05-30 16:51:51 +00:00
Spandan Das
2f9af23734 Merge "Override modules should always override source modules" into main 2024-05-29 16:25:45 +00:00
Jiyong Park
a03e16f1b9 Merge "Required deps don't track native bridge architectures" into main 2024-05-29 03:59:58 +00:00
Treehugger Robot
8723705fad Merge "Use r8/d8 optimized profile for dexpreopt" into main 2024-05-29 02:15:37 +00:00
Spandan Das
3dbda18e80 Use r8/d8 optimized profile for dexpreopt
Currently, dexpreopt supports profile guided optimization. This does not
work well with r8/d8 optimization, since the checked-in profile will not
match the dex signatures after r8/d8 has optimized the dex code.

This CL introduces a new property `dex_preopt.enable_profile_rewrting`.
If set, the checked-in profile will passed as `input` to r8 via
`--art-profile <input> <output>`. The <output> from the previous command
will be used as the profile for dexpreopt.

Test: m nothing --no-skip-soong-tests
Test: m CredentialManager with https://ag.corp.google.com/27448930
and obfuscation turned on
Test: nm -U symbol.odex # contains obfuscated methods

Bug: 335418838

Change-Id: I53beed9ed76f013262f1c503de0f2b74997c2a7f
2024-05-29 01:05:05 +00:00
Liana Kazanova
f820c3beda Merge "Revert "Enable -Wfortify-source"" into main 2024-05-29 00:26:24 +00:00
Treehugger Robot
89341ed9ad Merge "Build build_flags.json in soong" into main 2024-05-29 00:18:16 +00:00
Spandan Das
0b28fa0b84 Override modules should always override source modules
Since overrides are implemented as variants of the source module, the
override module should not be replaced with prebuilts of the source
module even when the prebuilt is preferred.

Test: go test ./apex
Change-Id: I26e97f700276e7beaf6d1bd61b164f11d57a5e09
2024-05-29 00:06:32 +00:00
Liana Kazanova
885f2eec3c Revert "Enable -Wfortify-source"
This reverts commit 5735ef6777.

Reason for revert: DroidMonitor: Potential culprit for b/343287447 - verifying through ABTD before revert submission. This is part of the standard investigation process, and does not mean your CL will be reverted.

Change-Id: I1aeeddc251db760e2ab01c734733d351514ec5b0
2024-05-28 23:33:24 +00:00
Treehugger Robot
1705676dd0 Merge "Update build to handle documentation issues being errors" into main 2024-05-28 22:59:33 +00:00
Aditya Kumar
3775725af2 Merge "Enable -Wfortify-source" into main 2024-05-28 22:58:46 +00:00
LaMont Jones
194d492d55 all_flags.pb: Properly handle intermediate files
Bug: 343203557
Test: manual, TH
Change-Id: I9a4ef39b0c2a641ccd996187ce5f7629520dffc0
2024-05-28 13:24:19 -07:00
Paul Duffin
baf34783a4 Update build to handle documentation issues being errors
Previously, documentation issues had `lint` severity (which was between
`warning` and `hide`) by default. However, a recent change in Metalava
switched documentation issues to `error`. That broke some `droidstubs`
modules that either did not specify `api_lint` or were previously allow
listed to not use `--lints-as-errors`.

This change adds `--error-when-new-category Documentation` to the
Metalava arguments on any use of `droidstubs` that did not previously
specify `--lints-as-errors` to prevent the build breakage while still
warning developers of the problem and preventing new cases being added.

Bug: 343157584
Test: ./gradlew
Change-Id: Id80bc05e2dade580b2f3ac6416aeeed6b64ba22a
2024-05-28 17:37:20 +01:00
Jiyong Park
8db4415616 Required deps don't track native bridge architectures
Bug: 342945184
Test: build aosp_cf_x86_64_only_phone and check if
out/target/product/vsoc_x86_64_only/system/lib64/arm64 directory doesn't
exist.

Change-Id: I1638610ac686b369b23390768af1564b3cf38d9b
2024-05-28 14:29:22 +09:00
yangbill
585564cab2 Allow required property be conditional for release_aidl_use_unfrozen
Bug: 342336921
Test: cd build/soong/android ; go test -run TestProductVariables
Test: add product_variables.release_aidl_use_unfrozen.required to the
phony module.

Change-Id: I9b934a8fb6245b9b6fd0f2db1e67d5e2876490b2
2024-05-27 02:35:49 +00:00
Kiyoung Kim
60cec95e01 Merge "Remove VndkUseCoreVariant related code from build" into main 2024-05-27 00:59:37 +00:00