Commit graph

62277 commits

Author SHA1 Message Date
Cole Faust
328770db88 Merge "Remove tzdata from staging allowlist." 2022-12-15 00:15:55 +00:00
MarkDacek
421a4d6d28 Remove tzdata from staging allowlist.
This is redundant as it's already in prod.
Test: m nothing

Change-Id: I49f75ce9ed514b77df8089a90a0339a4ab3f1d0b
2022-12-14 16:26:30 +00:00
Treehugger Robot
ccfe6022d4 Merge "Pass -t epoch to jetifier" 2022-12-14 16:15:18 +00:00
Sam Delmerico
5a67ad19da Merge "add APEX transitive dependency validation" 2022-12-14 15:40:47 +00:00
Jingwen Chen
90fff77810 Merge "Fix "--version_script" typo in doc." 2022-12-14 12:38:24 +00:00
Treehugger Robot
1f9ca39a5a Merge "Remove linkerconfig from bionic list." 2022-12-14 07:16:13 +00:00
Treehugger Robot
7853388422 Merge "Add arch variants for Intel Atom CPUs" 2022-12-14 03:32:13 +00:00
Colin Cross
db9f1af579 Pass -t epoch to jetifier
Pass -t epoch to jetifier to get reproducible output files from it.

Bug: 262448304
Test: builds
Change-Id: I65d42e5d556f27e15e6700363840857c1a25da74
2022-12-13 15:57:01 -08:00
Treehugger Robot
b3b43822f9 Merge "Workaround bazel command too long" 2022-12-13 23:13:15 +00:00
Yabin Cui
4abd2ca5b4 Merge "Update clang version to clang-r475365b" 2022-12-13 21:35:04 +00:00
Greg Kaiser
796469bb6f Merge "mk2rbc support for clear_var_list" 2022-12-13 20:50:00 +00:00
Colin Cross
d5c7ddb4df Workaround bazel command too long
Write long bazel commands returned by aquery to a shell script
before executing them to work around command line length limits.

Bug: 261536423
Test: USE_HOST_MUSL=true build/bazel/ci/mixed_libc.sh
Change-Id: Id98a07800df82d1538e6b16b733488a1b9943bf3
2022-12-13 12:40:03 -08:00
Colin Cross
7a9803cbde Merge "Add external/musl to the bp2build allowlists" 2022-12-13 20:00:55 +00:00
Treehugger Robot
16d87f33a2 Merge "Streamline AndroidMk generation" 2022-12-13 19:39:20 +00:00
Sam Delmerico
eddd3c0ba4 add APEX transitive dependency validation
Bug: 218419109
Test: b build //packages/modules/adb/apex:com.android.adbd
Change-Id: I93b0c99d6521e419e52c63271646448f6d708c22
2022-12-13 14:32:19 -05:00
Paul Duffin
f0efd5da1a Merge "Allow building against prerelease prebuilt APEXes" 2022-12-13 16:28:07 +00:00
Treehugger Robot
6441a125cf Merge changes from topics "bp2build_cc_object_dynamic_deps", "bp2build_cc_prebuilt_object"
* changes:
  Add support for headers from dependencies to bazel cc_object
  Add bp2build support for cc_prebuilt_object
2022-12-13 16:25:58 +00:00
Usta (Tsering) Shrestha
b545f49f06 Merge "scan and run test_ methods" 2022-12-13 15:46:08 +00:00
Paul Duffin
cb4438ff19 Merge "Make apex_set support ":<apex>" syntax to access the apex file" 2022-12-13 15:04:35 +00:00
Jooyung Han
bff7335056 Remove linkerconfig from bionic list.
Note that the list is used to install symlinks to com.android.runtime
and also install "bootstrap" copy in subdir.

We don't need bootstrap/linkerconfig since linker itself provides a
default config for those early processes.

This removes both symlink and bootstrap copy from /system.

Bug: 260982509
Bug: 262330207
Test: MicrodroidAppTest
Test: vm run-microdroid
Change-Id: I7c62db96bd3acc91214340d4beed9b561ff6663f
2022-12-13 18:29:44 +09:00
Jingwen Chen
b582e61a31 Fix "--version_script" typo in doc.
The linker flag is --version-script.

Change-Id: I3bc66e848cc27ca6eebc004c662152faef6f8076
Test: N/A
Bug: 257226023
2022-12-13 06:53:08 +00:00
Treehugger Robot
d3dfb89934 Merge changes I80af8ace,I04130648
* changes:
  Add to-lower/to-upper
  Add support for and/or in mk2rbc
2022-12-13 04:52:04 +00:00
Cole Faust
5a3449f11c mk2rbc support for clear_var_list
Bug: 262303006
Test: Manually (Added usage to aosp_arm64 and ran rbc_dashboard.py on it)
Change-Id: I3cba8f1d69ba4f42b4bc125f0a1131c1d33f7efb
2022-12-12 19:02:42 -08:00
Cole Faust
2dee63d9a8 Add to-lower/to-upper
Bug: 262303006
Test: go test
Change-Id: I80af8ace90556e58676adac4cb90d5d62c5b7b96
2022-12-12 18:18:15 -08:00
Cole Faust
d2daabfa02 Add support for and/or in mk2rbc
Bug: 262303006
Test: go test
Change-Id: I04130648084775c0828e95cd18a82e348c3f09eb
2022-12-12 18:17:37 -08:00
Sasha Smundak
dcb6129269 Streamline AndroidMk generation
Add AndroidMkEmitAssignList to emit a line to assign the items from
the given list of string arrays.

Test: treehugger
Change-Id: Id5acbef38ea4e91349bd2461f226db352d4b8123
2022-12-12 18:06:49 -08:00
Vinh Tran
6916999cd0 Merge changes from topic "afdo-in-cc-rules"
* changes:
  Change out path to android_target-opt in bazel integration tests
  Add check for handcrafted BUILD file in bp2build
  Add bp2build conversion to reference to fdo_profile targets
2022-12-13 00:12:03 +00:00
Treehugger Robot
331360e7d6 Merge "Add support for variant_prepend properties in bp2build for cc library" 2022-12-12 22:46:33 +00:00
Paul Duffin
a499dfdf95 Merge "Fix deapexer usage in prebuilt_apex/apex_set" 2022-12-12 21:08:55 +00:00
Matt Gilbride
18ac53b4d0 Merge "Always run AndroidGlobalLintChecker.jar with lint invocations" 2022-12-12 18:48:21 +00:00
Trevor Radcliffe
8e360f1119 Merge "Revert "bp2build conversion for Sanitize.Integer_overflow"" 2022-12-12 18:47:57 +00:00
Yabin Cui
8e6aeb7682 Update clang version to clang-r475365b
Bug: 253033919
Test: build

Change-Id: Id0fc8e1b135c9478b73d0e0cb5a249c5bd3474ea
2022-12-12 10:02:04 -08:00
Paul Duffin
76fdd67f9f Allow building against prerelease prebuilt APEXes
Generally, when building system images from prebuilt APEXes the APEXes
should be released versions and the build ensures that is the case when
extracting .apex files from prebuilt .apks files. However, it is useful
to test building against prebuilt APEXes before finalization to flush
out any issues early on. Previously, the build would fail in that case.
This change adds support for using the SOONG_ALLOW_PRERELEASE_APEXES
environment variable to allow prerelease APEXes to be suppported.

Bug: 259958590
Test: m MODULE_BUILD_FROM_SOURCE=false droid
      # Above fails because it could not find non-prelease APEXes in the
      # prebuilt .apks files.
      m SOONG_ALLOW_PRERELEASE_APEXES=true MODULE_BUILD_FROM_SOURCE=false droid
      # Above works.
Change-Id: I20b8e5db0b9fd2a21434be25652195fae929bd3f
2022-12-12 18:00:47 +00:00
Paul Duffin
4f2282c2d8 Make apex_set support ":<apex>" syntax to access the apex file
The apex and prebuilt_apex module types make the output APEX available
using ":<apex>" syntax, e.g. for use as a data file in a test. This
change adds compatible behavior to apex_set to ensure consistent
behavior when building against prebuilts.

Bug: 259958590
Test: m MODULE_BUILD_FROM_SOURCE=false nothing
Change-Id: Ic6f105976cfdd6af4920cc1e11ab0b4ff72e6a6f
2022-12-12 17:44:33 +00:00
Paul Duffin
e17c31611a Fix deapexer usage in prebuilt_apex/apex_set
A previous change to the deapexer script to check that blkid_path and
fsckerofs_path were set broke the scripts/unpack-prebuilt-apex.sh
scripts use of deapexer. This change fixes it by passing the paths
through to the script which then passes it on to deapexer.

Bug: 255963179
Bug: 240288941
Bug: 259958590
Test: m MODULE_BUILD_FROM_SOURCE=false droid
Change-Id: Ief7f36219b7fe1cf7104c08163e10d8e39f181d0
2022-12-12 17:40:26 +00:00
Vinh Tran
cc1a017240 Change out path to android_target-opt in bazel integration tests
ag/c/platform/build/bazel/+/20584767/15/common.bazelrc#116 defaulted our build to opt compilation mode which affects bazel's output path. This change fixes the tests to reflect that.

Test: ./tests/apex_comparison_tests.sh
Test: ./tests/bp2build_bazel_test.sh
Bug: 253540178
Change-Id: Idc42a2c3173800db0d6155ef3d74e33c15d220d0
Merged-In: Idc42a2c3173800db0d6155ef3d74e33c15d220d0
2022-12-12 12:20:05 -05:00
Vinh Tran
bc9c8b494c Add check for handcrafted BUILD file in bp2build
ag/20469925 added a handcrafted BUILD file (allowlisted in ag/20597986)
to internal master. ag/c/platform/build/soong/+/20583593/12/cc/bp2build.go#818 generates references to the targets in the BUILD file. However in tm-dev, the BUILD file doesn't exist while the .afdo files do.

One solution is to cherry-pick the BUILD file to tm-dev. However, tm-dev doesn't have vendor/google/build/soong/bp2build_allowlist.go to check in the BUILD file in bp2build.

This CL adds a check that the BUILD file exists to avoid the failure as in https://android-build.googleplex.com/builds/pending/P45724500/aosp_cf_x86_64_phone-userdebug/latest/view/logs/build_error.log in tm-qpr-dev-plus-aosp branch.

Bug: 253540178
Test: go test
Change-Id: I47fb853015ca230afe3cefe1d37728bf714624be
Merged-In: I47fb853015ca230afe3cefe1d37728bf714624be
2022-12-12 12:17:49 -05:00
Vinh Tran
99270ea3c3 Add bp2build conversion to reference to fdo_profile targets
The fdo_profile targets are handcrafted in ag/20469925. Bp2build creates fdo_profile attribute on cc_library_shared and references to the fdo_profile target if the profile exists. This works under assumption that all afdo profiles have an associated Bazel fdo_profile target declared in the same folder/package.

As noted in b/253540178, this won't work when we check in the BUILD files (which is likely 6+ months away) because some profiles might only exist internally but not in AOSP. We will implement a long-term solution once we figure out all the requirements we need to support afdo both in Soong and Bazel.

Bug: 253540178
Test: go tests
Change-Id: Iebd5dd7a76583b4b2bf0d9ee56d58f247d313a54
Merged-In: Iebd5dd7a76583b4b2bf0d9ee56d58f247d313a54
2022-12-12 12:16:43 -05:00
Jason Wu
92c6c2b2ef Merge "Upload soong_build_metrics" 2022-12-12 16:22:16 +00:00
mattgilbride
5aecabec50 Always run AndroidGlobalLintChecker.jar with lint invocations
AndroidGlobalLintChecker.jar provides a set of lint checks
that should be run across the entire tree.

Bug: 236558918
Test: manually tested, treehugger
Change-Id: I2a868f1d78c969eefa2c29477fc8ecab1043df39
2022-12-10 01:07:29 +00:00
Zi Wang
1cb11800f7 Add support for variant_prepend properties in bp2build for cc library
Some properties in soong are marked "variant_prepend", which means
in bp2build output, variant properties(select ...) should come before
general properties.
Prepend property is added in StringListAttribute
stuct so that bp2build can handlle variant_prepend properly, if
Prepend is properly set in different module logics.
This change also coordinates cc library with Prepend.
Coordination with other module types will be in separate CLs.

Bug: 261644490
Test: TestCcLibraryHeadersSimple,
TestCcLibraryHeadersArchAndTargetExportSystemIncludes and TH

Change-Id: I3b61c491c54bbe91ba9aa2af9b4c84193c91ae7f
2022-12-09 16:41:23 -08:00
Colin Cross
20c89f1adf Add external/musl to the bp2build allowlists
Add external/musl to the bp2build allowlists.  Disable libc_musl_sysroot,
which fails due to a $(locations) reference to a glob that is
unsupported in bazel.

Bug: 259266326
Test: //external/musl:libc_musl builds
Change-Id: Icf0ea2f89854ba3605096dcaa95c1c829af34dc3
2022-12-09 13:58:58 -08:00
Colin Cross
65ebc429e0 Add support for headers from dependencies to bazel cc_object
The libc_musl_crt* cc_object modules use header_libs to add
headers to the search path.  Propagate static_libs, shared_libs
and header_libs to includes_deps.

Bug: 259266326
Test: TestCcObjectHeaderLib
Change-Id: I8db4d6886761426d3ece38c43ac868d3248f7a9f
2022-12-09 13:58:58 -08:00
Colin Cross
c5075e917e Add bp2build support for cc_prebuilt_object
Add bp2build support for cc_prebuilt_object to allow buiiding
musl crt objects that use prebuilt clang_rt.crtbegin and
clang_rt.crtend.

Bug: 259266326
Test: //extenral/musl:libc_musl builds
Change-Id: Ic2b0375bc6e7336d31c9e2cf51bdc2ea894185aa
2022-12-09 13:58:58 -08:00
Trevor Radcliffe
682bfb2923 Revert "bp2build conversion for Sanitize.Integer_overflow"
This reverts commit f82482db31.

Reason for revert: http://b/261935841

Change-Id: I8155c2b17c6052b734efea43be06b1099ffedd32
2022-12-09 20:39:12 +00:00
Xin Li
c0f432edfd Merge Android 13 QPR1
Bug: 261731544
Merged-In: Ic5a553e1442b22ad2a57456d34cbec6a14e8a950
Change-Id: I225d7c223d7851298f376051dd7c0c21ccf614dd
2022-12-09 10:23:03 -08:00
Jason Wu
f0ec631046 Upload soong_build_metrics
Test: m nothing
Test: m --bazel-mode-dev
Test: Verified soong_build_metrics is available in local metrics tables from builds that include this CL

Bug: 257537925
Change-Id: Ic5419ecb203c9b62457e1c553d592ba593a9bfff
2022-12-09 11:48:26 -05:00
Usta Shrestha
572ecec696 scan and run test_ methods
Bug: N/A
Test: run bootstrap_test.sh
Change-Id: I3f810277763144d4a6a2f9c1d08bed3a29b7598e
2022-12-09 01:41:49 -05:00
Treehugger Robot
b0208fb5c7 Merge "Add adbd to staging allowlist" am: 3784d14404
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2336162

Change-Id: Ib32fc309dd001c112e57c42ef2de7142b46b3208
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-12-08 22:24:54 +00:00
Treehugger Robot
3784d14404 Merge "Add adbd to staging allowlist" 2022-12-08 22:07:06 +00:00