Commit graph

81988 commits

Author SHA1 Message Date
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
Joe Onorato
5a62e76561 get_build_var and get_abs_build_var are now scripts
Bug: 340648588
Test: run the scripts. lunch.
Change-Id: Idc3395afe0dbec88abe7e8f46994eb2c5a22ee98
2024-05-24 14:37:52 -07:00
Joe Onorato
ded5d2de15 More envsetup.sh cleanup -- move these to standalone scripts
Bug: 340648588
Test: Run them
Change-Id: I11d086bcaa2f9eb52f7c556d94666321010b75fa
2024-05-24 14:37:52 -07:00
Joe Onorato
d636ea12bf build/soong side of move the module-info.json commands into standalone scripts.
Bug: 340648588
Test: run them
Change-Id: I5c072ee8481630327be9dccbbca501293a7b34cd
2024-05-24 14:37:52 -07:00
Treehugger Robot
c6b5fdbc5c Merge "Convert some properties to Configurable properties" into main 2024-05-24 20:52:27 +00:00
Treehugger Robot
ce15fb72bf Merge "Bump go.mod file to go 1.22" into main 2024-05-24 18:57:09 +00:00
Devin Moore
570d72b1cf Let Release_aidl_use_unfrozen add vintf_fragments
The product_config variable can be used to add different
vintf_fragments.

Ignore-AOSP-First: this is required for vFRC finalization and needs to be submitted ASAP. This can be cherry-picked to aosp after finalization.

Test: launch_cvd && atest hal_implementation_test
Test: lunch `next` && atest vts_treble_vintf_framework_test
Bug: 279809333
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b93c1a74cf89caef950c63d64b93f2ccfefcbce8)
Merged-In: Ied17ad4c4564a5d97f93001734fba7cc6648bbc2
Change-Id: Ied17ad4c4564a5d97f93001734fba7cc6648bbc2
2024-05-24 10:12:52 +00:00
Aditya Kumar
5735ef6777 Enable -Wfortify-source
Workaround for the post-submit failures
in b/341339765 has been merged.

Test: woodchipper and presubmit
Fixes: 315245071
Change-Id: I840f545cc0892cfdf9c896fd45761ba5308ff1ca
2024-05-24 04:43:18 +00:00
Kiyoung Kim
22152f6cda Remove VndkUseCoreVariant related code from build
VndkUseCoreVariant feature is deprecated along with VNDK. This change
removes related code from Soong.

Bug: 330100430
Test: AOSP CF build succeeded
Change-Id: Ie182c9e4dc9cf0a4fe9d5fddf5b36754ddb53d18
2024-05-24 10:45:28 +09:00
Jihoon Kang
d02bd377da Merge "Propagate DirectlyInAnyApex to transitive dependencies" into main 2024-05-24 00:58:05 +00:00
Kiyoung Kim
41a1ff1a28 Merge "Move sanitizer.libraries.txt logic into Soong" into main 2024-05-24 00:39:00 +00:00
Cole Faust
2afb7746c2 Bump go.mod file to go 1.22
When building with blueprint, go 1.22 will be used, but if you used
go build or go test manually, the version in the go.mod will be used.

Go 1.22 has a subtle change that we want to make sure we're always
using: https://go.dev/blog/loopvar-preview

Bug: 330574836
Test: Presubmits
Change-Id: Idf46b77c4f817345c1f9aca039d8735bb101967f
2024-05-23 16:26:49 -07:00
Treehugger Robot
7e2490ef4b Merge "Fix post command of clang_verify." into main 2024-05-23 22:59:37 +00:00