Commit graph

72311 commits

Author SHA1 Message Date
Colin Cross
ab766b40e8 Merge "Copy soong_build metrics into build.trace.gz" into main 2023-10-30 19:40:31 +00:00
Colin Cross
46b0c75204 Add performance counter metrics to build.trace.gz
Start a background goroutine at the beginning of soong_build that
captures the CPU usage, heap size, and total system memory every
second.  Propagate the values through soong_build_metrics.pb back
to soong_ui, and then into build.trace.gz.

Test: m nothing, examine build.trace.gz
Change-Id: Iad99f8f1f088f4f7f7d5f76566a38c0c4f4d0daa
2023-10-30 12:39:07 -07:00
Mark Dacek
4dbeda984a Merge "Remove Bazel metrics/finalize-bazel-metrics." into main 2023-10-30 18:39:52 +00:00
Jooyung Han
286957df99 Rewrite how to generate apexkeys.txt
Instead of listing all apexes in the source tree, now each apex emits
its own fragment for apexkeys.txt, which is pointed by
LOCAL_APEX_KEYS_FILE. Makefile collects apexkeys.txt from installed apex
files. This is to avoid listing unrelated apexes (not installed,
testdata, unexported namespaces, etc.)

Bug: 304914238
Test: m apexkeys.txt
Test: m blueprint-tests
Change-Id: Iefbe6e486cb418955584ad1a282455307e90be95
2023-10-30 16:48:36 +09:00
Hsin-Yi Chen
843c0638d6 Let header-abi-linker filter symbols by API level
In a trunk stable branch, the ABI-monitored libraries under different
release configurations share the source code. The exported symbols are
filtered by version scripts and API level. header-abi-linker needs to
take the API level as a parameter.

Test: make
Bug: 308192597
Change-Id: I4b55b7ec023451b3a4cd1da308a1de10842d51d2
2023-10-30 13:03:53 +08:00
Justin Yun
87e4128270 Merge "Stop using VNDK from product partition" into main 2023-10-30 05:01:44 +00:00
Jooyung Han
2cf35e7bfd Refactor around apexKeysText singleton
apexkeys.txt should list the installed apexes. But for now it lists all
apexes in the source tree. To fix this, each apex(or prebuilt/apexset)
will generate its own apexkey info and they'll be merged into a single
text only for installed apexes.

This change is a preparation before the upcoming change. We'll reuse the
apexKeyEntry stuff from the current implementation.

Bug: 304914238
Test: m blueprint_tests
Change-Id: If9d5d992e5e2b0120e017265d2590b1c55152f52
2023-10-30 11:17:16 +09:00
Aditya Kumar
e19a173a48 Merge "Discard IllegalFlags when testing a new compiler" into main 2023-10-29 00:50:33 +00:00
Colin Cross
aa9a273b40 Copy soong_build metrics into build.trace.gz
Make soong_ui read soong_build_metrics.bp to extract the event timings
and propagate them to Tracer, which will put them in build.trace.gz.
This provides much better visibility into what parts of the build are
contributing to the overly large analysis time.

Test: m nothing and examine build.trace.gz
Change-Id: I473727f1ec044b0d973f2cb4e3eaca96bfca94f6
2023-10-27 19:36:47 -07:00
Jared Duke
efb6d60210 Update transitive lib propagation
Only propagate transitive libs by way of library-like references. This
avoids inclusion of transitive deps from tools like lint modules that
are unncessary for R8.

This yields build speedups for a number of targets, including:
 * services.jar:            -22% (66s -> 51s)
 * telephony-common.jar:    -27% (29s -> 21s)
 * updatable-media.jar:     -41% (17s -> 10s)
 * framework-appsearch.jar: -46% (13s ->  7s)

Bug: 302383328
Bug: 307273642
Test: m
Change-Id: I60bb30e84dabe522ea9ac9333f00e739962ea91d
2023-10-27 22:48:13 +00:00
AdityaK
e7b606717a Discard IllegalFlags when testing a new compiler
Also add -Wno-everything as suggested by Pirama

Bug: b/308179696

Follow up: https://b.corp.google.com/issues/308179380

Change-Id: Iaa73f2b52363562b2391346d8b2e5dc73bab4f2d
2023-10-27 18:54:58 +00:00
Anton Hansson
8e586ab8b3 Merge "Remove UnavailableSymbol from warnings to disable" into main 2023-10-27 07:36:35 +00:00
Anton Hansson
aa5b2cd37b Merge "Remove HiddenTypeParameter from warnings to disable" into main 2023-10-27 07:31:09 +00:00
Cole Faust
6100a84dd1 Merge "Remove certificate genrules from denylist" into main 2023-10-26 23:18:40 +00:00
Krzysztof Kosiński
14e25a504c Merge "Revert "Revert "Enable -Werror=incompatible-function-pointer-types""" into main 2023-10-26 21:46:35 +00:00
MarkDacek
39825ead17 Remove Bazel metrics/finalize-bazel-metrics.
Test: m nothing
Change-Id: Idd4610aca77f0a5deeadc3b895869879ded6c16e
2023-10-26 20:14:36 +00:00
Treehugger Robot
8f535b4189 Merge "disable bazel by default" into main 2023-10-26 19:58:50 +00:00
Cole Faust
1b207d2dee Merge "Remove bluetooth genrules from denylist" into main 2023-10-26 19:17:24 +00:00
Steven Moreland
bfd52241eb Merge "sysprop_library: cflags + ldflags" into main 2023-10-26 17:51:37 +00:00
Chris Parsons
bf8ab858da disable bazel by default
Test: m nothing, verified bp2build was not run
Test: presubmits
Change-Id: I7476194f8424fa4f199fb94e1cbd0b3c84339fd9
2023-10-26 17:22:27 +00:00
Anton Hansson
f9a2bc0e4b Remove HiddenTypeParameter from warnings to disable
Bug: 306806877
Test: m checkapi
Change-Id: I68036ad7fc24cda8673379a218ecbb26aa48ad8f
2023-10-26 15:13:26 +00:00
Anton Hansson
70f74de4cb Remove UnavailableSymbol from warnings to disable
Bug: 306806877
Test: m checkapi
Change-Id: If8ad3cf37d84ec30c886a0e6d094ea451c4c3d75
2023-10-26 14:35:39 +00:00
Mythri Alle
4efd3365cc Merge "Don't minimize debug information if module explicitly asks for it" into main 2023-10-26 08:18:02 +00:00
Krzysztof Kosiński
83199b5e4d Revert "Revert "Enable -Werror=incompatible-function-pointer-types""
This reverts commit 5e75975e04.

Reason for revert: breakages fixed

Change-Id: Id54499eabaca649bee5ea6452a3a4134d8773e2d
2023-10-26 07:16:29 +00:00
Cole Faust
d86a9094a2 Remove bluetooth genrules from denylist
Bug: 307824623
Test: m all of them
Change-Id: I7d0af72c7ed1fd190854c1953dc93808e3cb3958
2023-10-25 17:33:56 -07:00
Cole Faust
831f2bfbe5 Remove certificate genrules from denylist
The denylist was built by running `genrule_sandbox_test.py` on all
modules in the tree. `genrule_sandbox_test.py` checks that the sandboxed
genrules build, but also that they get the same results as the
unsandboxed version.

In this case, the genrule actually builds with sandboxing just fine,
but they have non-deterministic results, which caused
`genrule_sandbox_test.py` to think that they didn't work with
sandboxing.

Test: m com.android.apex.apkrollback.test.pem com.android.apex.apkrollback.test.pubkey com.android.apex.cts.shim.debug.pem com.android.apex.cts.shim.debug.pubkey com.android.apex.cts.shim.pem com.android.apex.cts.shim.pubkey com.android.apex.cts.shim.v2_no_pb com.android.apex.cts.shim.v2_signed_bob com.android.apex.cts.shim.v2_signed_bob_rot com.android.apex.cts.shim.v2_signed_bob_rot_rollback com.android.apex.cts.shim.v2_unsigned_apk_container com.android.apex.cts.shim.v3_signed_bob com.android.apex.cts.shim.v3_signed_bob_rot com.android.apex.cts.shim_not_pre_installed.pem com.android.apex.cts.shim_not_pre_installed.pubkey com.android.apex.rotation.key.bob.pem com.android.apex.rotation.key.bob.pk8 com.android.apex.rotation.key.bob.rot com.android.apex.rotation.key.bob.rot.rollback com.android.apex.rotation.key.bob.x509.pem com.android.overlaytest.overlaid.pem com.android.overlaytest.overlaid.pubkey com.android.overlaytest.overlay.pem com.android.overlaytest.overlay.pubkey
Change-Id: I950767449025163d8c71bb5a7b2e2f15a1ce4a84
2023-10-25 15:10:38 -07:00
Fyodor Kyslov
ec2739fc22 Merge "Allowlist libcodec2_soft_av1dec_dav1d" into main 2023-10-25 19:22:15 +00:00
Treehugger Robot
54028dc5ae Merge "Temporarily disable swcodec in mixed bulid" into main 2023-10-25 18:55:36 +00:00
Sam Delmerico
c5cf990797 fix some moved code from revert of aosp/2518976
aosp/2768553 reverted aosp/2518976, but there was some code that was
moved in between these two commits. This commit removes a code block
for some envvars that were moved in aosp/2638675, and adds back the code
for the ANDROID_RUST_DARWIN envvar.

Change-Id: I9ac09c608fe64340535ac493ab7f07ecb9b9c335
2023-10-25 17:29:46 +00:00
Mythri Alle
4b9f618a76 Don't minimize debug information if module explicitly asks for it
In some configurations (for ex: go, auto) we minimize debug information
to reduce disk and memory usage. However some tests need the debug
information to work as expected. If a test explicitly requests for debug
information by passing "-g" to javac flags don't add "-g:source,lines"
to minimize debug information. Javac gives priority to -g:source,lines
and doesn't respect the order. So check if there is a -g flag before
adding flags to minimize debug information.

Test: atest CtsJvmtiRunTest1912HostTestCases android.jvmti.cts.JvmtiHostTest1912#testJvmti
Change-Id: I45e0f5fa9e79c16c2ff6e9413941a9a637753653
2023-10-25 16:50:41 +00:00
Vinh Tran
1c11c61897 Temporarily disable swcodec in mixed bulid
When aconfig (rust_binary) becomes a transitive dependency of swcodec, mixed build swcodec breaks because the cargo_build_script rust rule declares a directory which is not handled by mixed build yet. See b/307389608 for more context.

A follow-up CL will fix the issue and allow enabling swcodec in mixed build again.

Bug: 307389608
Test: Presubmit
Change-Id: I7ba7b5cd06b231f4867870fe8d0bd53299528fe3
2023-10-25 10:52:41 -04:00
Justin Yun
d578412cf1 Stop using VNDK from product partition
Product modules install required vndk modules in /product/lib[64].
But still the product modules can link to the llndk from system
partition using the list in /system/etc/llndk.libraries.txt.
To install /system/etc/llndk.libraries.txt file, use
llndk_libraries_txt singleton without versioned name.

Until VNDK is fully removed, the vndk apex must install the versioned
llndk.libraries.<ver>.txt file to the vndk apex.
Use llndk_libraries_txt_for_apex singleton for this purpose.

Test: lunch cf_x86_64_phone-next-userdebug; m
Test: atest GtsVndkDependencyTestCases
Bug: 299867815
Bug: 302255959
Change-Id: I058616081fe31597a9b76b772b69927807436896
2023-10-25 14:36:04 +09:00
Colin Cross
c2d3ffcae3 Merge "Disable Soong tests by default on Linux" into main 2023-10-24 22:21:17 +00:00
Steven Moreland
c43a4acc8b sysprop_library: cflags + ldflags
Needed by some in order to build 16K compatible code
on projects shared with multiple Android branches.

Bug: 299403996
Test: build
Change-Id: I6224803d5ca014f98faf8b0a20f1d4fd3c2bcbe2
2023-10-24 21:51:05 +00:00
Treehugger Robot
8aca5be771 Merge "Simplify commandString" into main 2023-10-24 20:07:45 +00:00
Harish Mahendrakar
5c98a68ed6 Allowlist libcodec2_soft_av1dec_dav1d
Bug: 289716589
Test: builds

Change-Id: Iee45b8fff6aea3fcf31fc1ea718911f54d42362c
2023-10-24 18:31:09 +00:00
Colin Cross
106d6ef459 Disable Soong tests by default on Linux
Disable running the Soong tests when building on Linux.  The tests
are still enabled when running on Darwin to ensure we have test on
Darwin in CI.  Checkbuilds still depend on the tests, which will
provide test coverage in CI on Linux.

Bug: 269296618
Test: aninja -t path checkbuild out/host/linux-x86/bin/go/soong-java/test/test.passed
Test: m nothing
Change-Id: Ib8359ff6d2a92eeb2ac9a9e95ecd65abc4e40061
2023-10-24 11:00:59 -07:00
Cole Faust
b378c18ddf Simplify commandString
Use the same logic for both go and non-go actions. This also has a
slight performance improvement for go actions by allocating the slice
in advance instead of using append()

Test: Presubmits
Change-Id: I92b60c547d8470816a67ac1ef6e334fd5f547701
2023-10-24 10:24:05 -07:00
Anton Hansson
05eabd9c4d Merge "Created empty framework-location non-updatable module" into main 2023-10-24 12:43:36 +00:00
Sebastian Pickl
479ab86e6b Merge "Revert "Default from-text stub generation in build"" into main 2023-10-24 12:43:24 +00:00
Sebastian Pickl
1c4188c9da Revert "Default from-text stub generation in build"
This reverts commit 182b56b870.

Reason for revert: prime suspect for breaking boot tests b/307495247, b/307411752

Bug:307495247
Change-Id: Iea05703b767d2699ca3cf69377eb44b1d21697ad
2023-10-24 11:20:06 +00:00
Anton Hansson
af1c929943 Merge "SdkTestCore for non-updatable modules" into main 2023-10-24 10:06:54 +00:00
Yu Liu
7ec40649bb Merge "Support a few more attrs in cc_aconfig_library." into main 2023-10-23 22:47:37 +00:00
Jihoon Kang
82f0f7eca1 Merge "Default from-text stub generation in build" into main 2023-10-23 21:42:50 +00:00
Alix
96ea8845c5 add manifest_values application id property to soong
Bug:278905106
Test: go test ./java --run TestManifestValuesApplicationIdSetsPackageName
	and locally built a module and checked manifest pacakge_name
Change-Id: I5c8fd27c177b9e255dce197706f62580894008cb
2023-10-23 18:26:53 +00:00
Alan Viverette
ec26327735 Handle Android.bp files in subdirectories of androidx
Bug: 304263344
Test: m droid
Change-Id: I473d017ed3169137cc234f7fbd5f01d5ad889cb2
2023-10-23 13:25:13 -04:00
Mark White
9421c4ceb9 SdkTestCore for non-updatable modules
Provides SdkTestCore/test_core_current sdk_version for non-updatable
modules that have their test scope dependent on test apis from
framework-minus-apex.

Ignore-AOSP-First: Change in topic with internal-first projects
Bug: 289776578
Test: m checkapi | go test ./java

Merged-In: Iba3213e8c34ea75ac9dd8532a95ef62fb5455e6c
Change-Id: Iba3213e8c34ea75ac9dd8532a95ef62fb5455e6c
2023-10-23 15:25:55 +00:00
Treehugger Robot
c70be4b986 Merge "Globally disable -Wreorder-init-list." into main 2023-10-22 09:49:55 +00:00
Krzysztof Kosiński
8f8cc1668e Globally disable -Wreorder-init-list.
This warning is triggered even when initializers don't have any
side effects, so it very rarely surfaces actual bugs/mistakes.
99% of the time it complains about a purely cosmetic issue.
Disable it by default in commonGlobalCFlags, which still allows
individual modules to opt into it.

Bug: 145210666
Test: presubmit
Change-Id: I671b5c457ee3d92b9cc37f020ba54e01e1a04f59
2023-10-22 05:09:40 +00:00
Jihoon Kang
e8f21ac529 Merge "Modify the product variable Build_from_text_stub value" into main 2023-10-21 01:45:07 +00:00