Commit graph

64646 commits

Author SHA1 Message Date
Usta Shrestha
6e1aa7830c simplify m clean
`rm -rf out` used to fail because bazel would not set write permission on some files. Now it's been fixed and thus there is little reason to prefer `m clean` (also users are accustomed to `rm -rf out`)

Bug: NA
Test: verified `m clean` works;interestingly soong_metrics file is created at the end
Change-Id: I000d16508613045811fc7792e5798f7c150dcc05
2023-05-23 17:34:15 -04:00
Jihoon Kang
4aed3703dd Merge changes Idc77d018,I7dff0094
* changes:
  Enable java_api_library modules in TxtStubLibraries.bp
  Add missing dependency in create_mock_soong
2023-05-23 11:26:53 +00:00
Treehugger Robot
634692f131 Merge changes from topic "b/278060169"
* changes:
  Unset BUILD_NUMBER/HOSTNAME in kati.go
  BUILD_NUMBER and BUILD_HOSTNAME doesn't affect kati regeneration
2023-05-23 08:56:48 +00:00
Jihoon Kang
b34bb06780 Enable java_api_library modules in TxtStubLibraries.bp
Since the stubs generation from text file feature has been merged,
enable the java_api_library modules in TxtStubLibraries.bp file.

Test: m --build-from-text-stub
Change-Id: Idc77d01882f136c4e255fb4284f9dc058fafe44d
2023-05-23 07:32:04 +00:00
Jihoon Kang
f530696762 Add missing dependency in create_mock_soong
This change adds missing dependency of Soong modules as symlink
directory in create_mock_soong so that a correct ninja graph can be
created when invoking androidmk_test.sh.

Test: build/soong/test/run_integration_tests.sh
Bug: 283905797
Change-Id: I7dff0094fdc23b7c438c917dbc00a5143a4dc5ae
2023-05-23 06:57:38 +00:00
Jeongik Cha
f2af38d2cc Unset BUILD_NUMBER/HOSTNAME in kati.go
BUILD_NUMBER/HOSTNAME is passed by a file, not env variable.
To avoid kati recreation, unset BUILD_NUMBER/HOSTNAME after
writing it into a file

Bug: 278060169
Test: BUILD_NUMBER=1 m && BUILD_NUMBER=2 m (check there is no kati
re-run)

Change-Id: I5a31461dcf1e4b0634974bcb48a0d7482d42852a
2023-05-23 10:35:23 +09:00
Zi Wang
03cd59b723 Merge "Add data_device_bins_both properties for python_test_host" 2023-05-22 16:51:29 +00:00
Treehugger Robot
47514686b9 Merge changes from topic "parallel-singletons"
* changes:
  Parallelize singleton execution
  android: Allow running some singletons in parallel.
2023-05-22 16:40:16 +00:00
Jihoon Kang
7e9e20e389 Fix bootclasspath_fragment build failure during from-text stub build
This change enables bootclasspath_fragment module to be correctly built
during from-text stub build by android-non-updatable module to be
interpreted as its java_api_library equivalent.

Test: go test ./java
Bug: 279460171
Change-Id: Ia6b60edcb60782977cc59855f1cf5d3a46e9f682
2023-05-22 07:13:25 +00:00
Jihoon Kang
d0f9520414 Add additional java_api_library testing modules
This change adds android-non-updatable.stub.* java_api_library
modules to java testing.

Test: none
Change-Id: I10110a21cc61905995803dfc1d27484358019807
2023-05-22 07:13:07 +00:00
Jeongik Cha
4e49bbde93 BUILD_NUMBER and BUILD_HOSTNAME doesn't affect kati regeneration
* Extract BUILD_NUMBER, BUILD_HOSTNAME to file to avoid kati change
* Handle FILE_NAME_TAG_PLACEHOLDER string in dist in build/make/packaging/distdir.mk

Test: check if kati isn't invoked even though BUILD_NUMBER, BUILD_HOSTNAME
  is changed
Test: m && m, and check if the second m is no-op
Bug: 278060169
Change-Id: I65eefc6bb86d4076098a1bf8b317b4cb88201499
2023-05-22 12:22:18 +09:00
Jihoon Kang
d056a91b82 Merge "Generate java_api_library from java_sdk_library" 2023-05-20 05:10:11 +00:00
Treehugger Robot
7fecde9041 Merge "Enable referencing of aapt-generated proguard flags" 2023-05-20 04:13:57 +00:00
Treehugger Robot
36f3ed1191 Merge "Support missing instrumented_for dependency when ALLOW_MISSING_DEPENDENCIES=true" 2023-05-19 21:12:27 +00:00
Usta (Tsering) Shrestha
f836552617 Merge "bp2build allowlist expanded" 2023-05-19 21:00:24 +00:00
LaMont Jones
0c10e4dcc0 Parallelize singleton execution
Bug: 281536768
Test: manual, presubmits
Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
2023-05-19 20:31:32 +00:00
Jared Duke
34b080ddcf Enable referencing of aapt-generated proguard flags
Some targets may implement classes declared elsewhere, e.g., system
server implements services defined in framework-res.apk's manifest.
Allow depending on the aapt-generated proguard flags for a given
target to support this.

Bug: 272495195
Test: m + reference ":framework-res{.aapt.proguardOptionsFile}"
Change-Id: I2a16632ed6e5a9bddbe326bdb7ab0dd79b45e587
2023-05-19 20:30:05 +00:00
Trevor Radcliffe
197f4306d5 Merge "CFI Versionscript changes in bp2build" 2023-05-19 20:14:29 +00:00
Colin Cross
b3f28b2e04 Merge changes from topic "musl_arm64"
* changes:
  Disable sanitizers that use runtimes for linux_musl arm64
  Separate host and host cross fuzz packaging
2023-05-19 18:03:22 +00:00
LaMont Jones
e59c0db536 android: Allow running some singletons in parallel.
Many of the singletons are trivial and can be run in parallel, improving
the performance during analysis.

Bug: 281536768
Test: manual, presubmit
Change-Id: I989333e2ff3fe71783601f27bf5e0732a1b4ea61
2023-05-19 18:01:35 +00:00
Zi Wang
bbb1b74cbf Add data_device_bins_both properties for python_test_host
Test: presubmits and manual verification

Bug: 274930471
Change-Id: Iafc85526afdb8264526e8a5a33319fa33a23c66b
2023-05-19 10:32:49 -07:00
Colin Cross
f521efae48 Support missing instrumented_for dependency when ALLOW_MISSING_DEPENDENCIES=true
Don't panic when the instrumented_for dependency is missing or when
instrumentedApp or files generated from instrumentedApp are nil.  Fixes
unbundled tradefed build.

Fixes: 283451533
Test: tapas google-tradefed-all && BUILD_BROKEN_DISABLE_BAZEL=true nothing on tradefed branch
Change-Id: Ibcd0da75fc55c7c0a697e98ae6bdd9fd3662259c
2023-05-19 09:47:09 -07:00
Usta Shrestha
6e5a5b18ee bp2build allowlist expanded
Bug: 282160334
Test: ran bp2build.sh
Change-Id: I354ded2cd4d2e9c89dc67ca8b9fdddd1c660ffa2
2023-05-19 16:45:56 +00:00
Spandan Das
fcb86824be Merge "Export host available libraries to soong_injection" 2023-05-19 16:18:01 +00:00
Trevor Radcliffe
f06dd91420 CFI Versionscript changes in bp2build
Bug: 261733820
Test: Unit Tests
Change-Id: I0bf2f42944738c0fefb10e59e859d2af44402792
2023-05-19 14:51:41 +00:00
Treehugger Robot
aad1959a18 Merge "Enable host cross python test builds" 2023-05-19 13:01:26 +00:00
Jihoon Kang
1c92c3e092 Generate java_api_library from java_sdk_library
This change enables java_sdk_library to generate java_api_library
modules per api surface, so that from-text stubs can be generated per
api domain scope. This module is only created when
`--build-from-text-stub` flag is passed during build.

Test: enable disabled modules in java/core-libraries/TxtStubLibraries.bp then m art.module.public.api.stubs.from-text --build-from-text-stub
Bug: 276957733
Change-Id: Ic1ead15b3d0bcb921ca8d31bcaeeb4cd9ee8715c
Merged-In: Ic1ead15b3d0bcb921ca8d31bcaeeb4cd9ee8715c
2023-05-19 06:07:37 +00:00
Aditya Kumar
e5dc6158d2 Merge "Enable LTO for riscv64" 2023-05-19 04:27:38 +00:00
Jihoon Kang
0393174fe7 Merge "Disallow missing api source files for java_api_library module" 2023-05-19 00:12:22 +00:00
Yu Liu
a38fb02a25 Merge "Test dcla libs for b build." 2023-05-18 21:25:11 +00:00
Colin Cross
e8c70c5bd5 Enable host cross python test builds
Ic37c8db918873ddf324c86b12b5412952b0f2be2 converted python_binary_host
and python_library_host from HostSupportedNoCross to HostSupported,
but left python_test_host.  Do the same for python_test_host.

Fixes dependencies between java_test_host modules that create
host cross variants and python_test_host modules that were missing
host cross variants.

Bug: 282918027
Test: builds
Change-Id: Iae687aa3aa0f0b005f2dd27469f631145247a008
2023-05-18 11:51:56 -07:00
Liz Kammer
0b2cb61010 Merge "re-add swcodec payload to mixed staging allowlist" 2023-05-18 18:15:02 +00:00
Zyan Wu
b7550aa09a Don't panic if no certificates found
Getting the first certificate will panic if there are no certificates,
which can happen when AllowMissingDependencies is set and the
certificate property is a module reference to a missing module.
Only get the first certificate if the list is not nil.

Use mainCertificate since it handles the logic already.

Test: TestAppMissingCertificateAllowMissingDependencies
Bug: 283102635
Change-Id: I8b27f65aa7d071041171ad45ac52bf47fa31bf2b
2023-05-18 15:46:31 +08:00
Christopher Parsons
5050a55b18 Merge "Revert "Turn on HINT_FROM_SOONG by default"" 2023-05-18 06:05:10 +00:00
Treehugger Robot
9e5c391c85 Merge "export WarningAllowedProjects to bazel" 2023-05-18 04:04:40 +00:00
Yu Liu
09a8d459d5 Test dcla libs for b build.
Bug: 273862399
Test: local
Change-Id: Ic72239779d63d64b68a902de6f5b3c6567385878
2023-05-17 20:01:28 -07:00
Colin Cross
ad8cc47e7d Merge "Fix Soong code, remove dead code, and clean up code for Java fuzz" 2023-05-18 02:51:43 +00:00
Spandan Das
34e0b94815 Merge "Remove CellBroadcast apps from baseline apex available map" 2023-05-18 02:13:39 +00:00
Sam Delmerico
3402c0ad44 re-add swcodec payload to mixed staging allowlist
Bug: 279756270
Test: m
Test: forrest
Change-Id: I3305c1bd9388b326fdecb5d333c07cf653d310d8
2023-05-17 20:49:39 -04:00
Chris Parsons
fddeaff4a6 Revert "Turn on HINT_FROM_SOONG by default"
This reverts commit f5c872f36b.

Revert reason: The original commit seems to have a performance regression for a number of benchmarked performance CUJs.

Bug: 283143307

Test: Benchmarking results. See attached bug.
Change-Id: Ib9463c8d30a5ba61640993424696a84e2e03040a
2023-05-17 22:30:34 +00:00
Spandan Das
6550358a05 Export host available libraries to soong_injection
This information will be used to validate linkopts for host targets.

Test: m bp2build
Bug: 216626461
Change-Id: Ie7ac46268e6177cf0688ca0389bdaa92b67f9a58
2023-05-17 22:19:53 +00:00
Colin Cross
390fc746d0 Disable sanitizers that use runtimes for linux_musl arm64
We don't built clang sanitizer runtimes for host arm64 yet,
disable sanitizer that need them when building for linux_musl arm64.

Test: builds
Change-Id: Id4fcb7f9743ac30121157b2294eb60216eaff7b3
2023-05-17 21:59:32 +00:00
Colin Cross
64a4a5f5cd Separate host and host cross fuzz packaging
Prevent collisions between host and host cross fuzz packaging when
both are supported as fuzz targets by using a different value for
hostOrTargetString.

Test: builds with HOST_CROSS_OS := linux_musl
Change-Id: I0e82bab2987899cece94c89eb8398d1733ebbd15
2023-05-17 21:59:27 +00:00
Treehugger Robot
9514d5bb60 Merge "apex: drop metadata gathering for multitree." 2023-05-17 20:14:45 +00:00
Cory Barker
eaf7f5ecb9 Fix Soong code, remove dead code, and clean up code for Java fuzz
(cherry picked from commit fdf043a7b1)

Test: built fuzz targets locally and tested them with Jazzer
Change-Id: I3ff487ba4e34289e0f53f2077463f524f4bf4f11
2023-05-17 19:07:16 +00:00
Treehugger Robot
a2244043ea Merge "Allowlist libservices" 2023-05-17 17:51:05 +00:00
Aditya Kumar
efc36678a9 Enable LTO for riscv64
This partially reverts commit 1281b99495.

Bug: b/282584808, b/254713216

Reason for revert: LTO can be enabled as emultated tls is now globally disabled https://android-review.git.corp.google.com/c/platform/build/soong/+/2431153

Change-Id: I66c83b1116550179043490a11f66b8630c0e6b1b
2023-05-17 17:18:06 +00:00
Treehugger Robot
3daa129afa Merge changes from topic "adbd_host"
* changes:
  Allowlist python dependency of adb targets
  bp2build support for host_ldlibs
2023-05-17 05:23:21 +00:00
Pirama Arumuga Nainar
7e80f945d3 Merge "[cc] Remove deprecated clang flag for auto-var-init" 2023-05-17 04:17:04 +00:00
Jihoon Kang
795319fadb Disallow missing api source files for java_api_library module
The purpose of this change is to enable filegroups to be taken as inputs
for `java_api_library` module `api_files` property. However, since
android.MaybeExistentPathForSource() does not support this, it needs to
be replaced with android.PathForModuleSrc(), which checks for the files'
existence.

Bug: 283006953
Test: go test ./java
Change-Id: I8a7d7f200f900219cc17243194a4c26071329ee6
2023-05-17 01:02:19 +00:00