Commit graph

62953 commits

Author SHA1 Message Date
Kevin Dagostino
7d4e3be8e6 Merge "Removing libutils_test which depends on libunwindstack." 2023-02-09 20:20:50 +00:00
zijunzhao
2863c0a40c Enable -Wnull-dereference globally
Bug: b/29823425
Test: m
Change-Id: I8d73cbc92b06829d8b937af262298d54c7697404
2023-02-09 19:05:09 +00:00
Trevor Radcliffe
e22f384f3c Fix test so it works on mac
Bug: 261733821
Test: The change is a test
Change-Id: I5cc15f642260b34d54840921941e6e56ef75d561
2023-02-09 19:01:31 +00:00
Cole Faust
aafdf54f70 Merge "Export apex_available_baseline to soong_injection" 2023-02-09 18:39:27 +00:00
Seth Moore
bc6dc9f546 Merge "Allow android tests to specify a mainline package name" 2023-02-09 15:43:08 +00:00
Ajinkya Chalke
a9728cfa39 Merge "Revert "Don't ignore R8 warnings for optimized targets"" 2023-02-09 14:37:38 +00:00
Sorin Basca
f96b899f59 Merge "Reland "Target Java 17"" 2023-02-09 14:12:14 +00:00
Ajinkya Chalke
ddad41b912 Revert "Don't ignore R8 warnings for optimized targets"
This reverts commit 5c2a1f3bda.

Reason for revert: This change is causing the build to break, see http://b/268404998

Change-Id: I9173d1aa42846831123273ef7651940f2b0d6608
2023-02-09 14:09:58 +00:00
Jooyung Han
9b293af098 Merge "Revert "Revert "Remove apex.apex_name""" 2023-02-09 08:46:12 +00:00
Jeongik Cha
f08e59c0d7 Add Always_use_prebuilt_sdks into variableProperties
Unbundled build needs switch mechanism between prebuilt and source.
So add Always_use_prebuilt_sdks because Unbundled_build doesn't gurantee
prebuilts is used.

Bug: 264498267
Bug: 246897249
Test: build
Change-Id: I069d4d9e804b4cf96ae70855c7eee3a6c940c9dc
2023-02-09 10:47:59 +09:00
Cole Faust
9e384e2e6b Export apex_available_baseline to soong_injection
So that it can be used in the bazel implementation.

Bug: 268006095
Test: m nothing, check that it's in out/soong/soong_injection
Change-Id: I1520dd874076dee7fa083648d0790b060d658e5a
2023-02-08 17:43:09 -08:00
Jooyung Han
63dff468d0 Revert "Revert "Remove apex.apex_name""
This reverts commit d1209a89c7.

Reason for revert: apex_name was still in use in the internal/intermediate branch. Fixed(removed apex_name) in the internal branch.

Change-Id: I10b8e0cfdb01dcdb6b623bddf9c04f4dac71fc90
2023-02-09 00:11:27 +00:00
Jason Wu
51d0ad7c30 Upload soong_metrics when mixed build fails
Test:  `m --bazel-mode-dev` and intentionally break the build.
We can see soong_metrics in the output directory and metrics_uploader
executed.

Bug: 268228148
Change-Id: I79e3b11468fca446673ebf752697a99eaff01b0f
2023-02-08 18:13:43 -05:00
Seth Moore
c6f4b532f3 Allow android tests to specify a mainline package name
Tests that run against mainline modules generally need to be built
twice: once for aosp (unsigned) and once for internal (signed).
The override_android_test rule is really useful for generating a
signed version of the unsigned test.

However, mainline tests need to use a MainlineTestModuleController
to only run tests on targets with the expected module. Since unsigned
and signed mainline modules have different package names, this means
the test config needs to be updated when overriding a test.

Add a new "mainline_package_name" argument so that android test rules
can update the targeted mainline package. Without this, the only way
to create a mainline package test is to instead use android_test, which
results in a lot of copy-pasta.

Test: added tests to soong
Test: manual, using a locally-modified RkpdAppUnitTest
Test: test_config_fixer_test.py
Change-Id: Idaffd63f225719a2bfda41018fda630b17db0080
2023-02-08 12:38:50 -08:00
Treehugger Robot
60b3fed203 Merge "Remove unnecessary pass in validatePath." 2023-02-08 20:29:35 +00:00
Yi Kong
aa0833a8fb Merge "Migrate to the new clang lib dir" 2023-02-08 20:29:17 +00:00
Trevor Radcliffe
41d0539715 Merge "Add test for LTO edge case" 2023-02-08 20:18:15 +00:00
Treehugger Robot
aa97f1dc6b Merge "Don't ignore R8 warnings for optimized targets" 2023-02-08 20:15:37 +00:00
Sam Delmerico
e413f4046f Merge "mixed build targets need transitive tidy files" 2023-02-08 20:11:30 +00:00
Usta (Tsering) Shrestha
3a49e9a068 Merge "reduce forest generation to be incremental" 2023-02-08 18:46:16 +00:00
Jiakai Zhang
db15f9bab7 Merge "Install system server jar profiles into the APEX." 2023-02-08 17:39:51 +00:00
Ivan Lozano
e37e1578c1 Merge "Copy Rust fuzzer dependencies to /data." 2023-02-08 13:46:17 +00:00
Jiakai Zhang
3317ce725d Install system server jar profiles into the APEX.
After this change, if profile-guided compilation is enabled for an APEX
system server jar, the profile will be installed next to the jar with
the ".prof" suffix, ("javalib/<name>.jar.prof"). This file will later be
used by odrefresh and dexpreopt from prebuilt APEX.

Bug: 241823638
Test: m nothing
Test: -
  1. Patch ag/20581649 PS2.
  2. banchan com.android.btservices x86_64 && m
  3. Check that "javalib/service-bluetooth.jar.prof" exists in the APEX.
Change-Id: Ibcfc6257dade92bd40a6d4b7368148717d0863b9
2023-02-08 19:25:37 +08:00
Yi Kong
bd1888156a Migrate to the new clang lib dir
Test: presubmit
Change-Id: I7ac7eb415a5f5c3d8b6d9298c1b4ccf2839aaea6
2023-02-08 19:54:05 +09:00
Marco Loaiza
2411ffded8 Merge "Revert "Remove apex.apex_name"" 2023-02-08 10:28:44 +00:00
Marco Loaiza
d1209a89c7 Revert "Remove apex.apex_name"
This reverts commit df26332d50.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_tm-qpr-dev-plus-aosp&target=aosp_sunfish-userdebug&lkgb=9578804&lkbb=9579062&fkbb=9578931, bug b/268301897

Change-Id: I819a416286cda63a6fa8d3d6b4343c86638b4dc9
BUG: 268301897
2023-02-08 10:14:01 +00:00
Jooyung Han
3ec4e2494b Merge "Remove apex.apex_name" 2023-02-08 06:41:31 +00:00
Colin Cross
1fecba1f72 Merge "Pass -C panic=abort to rustc linux bionic compilations" 2023-02-08 05:13:18 +00:00
Treehugger Robot
ad39ba8598 Merge "A nit of code comment" 2023-02-08 03:53:30 +00:00
Jason Wu
6c49a97d85 Merge "Temporary fix to make soong_metrics files get uploaded" 2023-02-08 03:52:31 +00:00
Jason Wu
7796b11726 Temporary fix to make soong_metrics files get uploaded
Test: ```m nothing``` and verify the data in local builds table
Bug: 268228148

Change-Id: Idb4b5305f19cf4a69a60896555357623a1ce4532
2023-02-08 01:34:20 +00:00
Jooyung Han
df26332d50 Remove apex.apex_name
apex_name was used to install symbol files under /apex/<apex name>,
which caused duplicate rules when there's two apexes with the same
apex_name. (e.g. override_apex or multi-install apexes)

Since symbol files can be looked up via ELF Build-Id, we don't have to
install symbol files with the actual "apex name", but instead we can
install them with soong module name.

Bug: 267581665
Test: m (soong test)
Change-Id: I1cbe5c86d287f180c7deef93ba85ea5552680011
2023-02-08 09:24:06 +09:00
Jared Duke
5c2a1f3bda Don't ignore R8 warnings for optimized targets
Ideally we'd stop ignoring warnings entirely, but this helps de-risk
optimized targets that may be more sensitive to side effects from
suppressing such warnings.

Test: m
Bug: 215530220
Change-Id: Iccd124a347d55cd8f9474ebca7e41eca27882066
2023-02-07 15:37:53 -08:00
zijunzhao
13b00771b6 A nit of code comment
This is not the correct bug link. It should be removed when enabling
-Wxor-used-as-pow in external. See: aosp/2356123

Bug: None
Test: None
Change-Id: I6bc1d35e07ed11fc0c70a625b0035348a6428678
2023-02-07 23:36:11 +00:00
Treehugger Robot
de39330dd7 Merge "Create OWNERS file for compliance teams." 2023-02-07 22:27:16 +00:00
Jooyung Han
d7d179a0e8 Merge changes from topic "multi_install_skip_symbol_files"
* changes:
  Remove apex.multi_install_skip_symbol_files
  VNDK APEX doesn't use "apex_name" property
2023-02-07 22:12:44 +00:00
Treehugger Robot
667200e25b Merge "Call hook in java_sdk_library after droidstubs generation" 2023-02-07 21:59:20 +00:00
Sam Delmerico
4ed95e263f mixed build targets need transitive tidy files
Previously in mixed builds, only the tidy files for the boundary module
were built, whereas all of its transitive dependencies' tidy files were
not being built. Instead we should export the list of transitive tidy
files for a module so that we can run clang-tidy for the boundary module
as well as its dependencies.

Bug: 195029134
Test: WITH_TIDY=1 DISABLE_ARTIFACT_PATH_REQUIREMENTS=true mss tidy-packages-modules-NeuralNetworks --bazel-mode-dev
Change-Id: I463646d2ae1fc4aa075a54c264e1c34571c3fd5c
2023-02-07 16:50:30 -05:00
Trevor Radcliffe
07cf4ed90d Add test for LTO edge case
This test confirms the behavior when LTO is disabled generally but
then enabled for a specific target.

Bug: 261733821
Test: Unit test
Change-Id: I415cd0146f2b83d85654239550d129f87e9001bc
2023-02-07 19:46:51 +00:00
Sam Delmerico
db23e22835 Merge "export allowlist of environment variables to Bazel" 2023-02-07 19:25:39 +00:00
Jihoon Kang
d48abd566b Call hook in java_sdk_library after droidstubs generation
Currently, droidstubs module create java_api_contribution module, but
when a java_sdk_library module dynamically creates a droidstubs module,
java_api_contribution is not created as the hook inside droidstubs get
lost. Therefore, call hook inside sdk_library after creating the
droidstubs module.

Test: m
Change-Id: I68bf1d796f6f9a6f81011ae35e4991b6ed1421ea
2023-02-07 18:45:38 +00:00
Colin Cross
91c8f259eb Pass -C panic=abort to rustc linux bionic compilations
Pass -C panic=abort to rustc when targeting linux bionic to match
device bionic builds.  Fixes building on master-art-host when a
rust dependency is added to the linux bionic target.

Bug: 268035710
Test: master-art-host linux bionic build
Change-Id: I411a8622002709030dfd207b9decb8846a1ccef3
2023-02-07 09:55:25 -08:00
Pedro Loureiro
87c88176fe Improve documentation around go/allowed-deps-error
Bug: 264349293
Change-Id: I64e95938e53fb26c104e0daece4939f97744a344
2023-02-07 17:08:38 +00:00
Jingwen Chen
24d0c56350 Remove unnecessary pass in validatePath.
Perform a single pass over pathComponents in both validatePath and
validateSafePath instead.

Test: presubmits
Change-Id: I1499183e345ca180900c54a18f9dc8bd534f2588
2023-02-07 09:29:36 +00:00
Zijun Zhao
1b1febdf1c Merge "Disable -Wformat-insufficient-args for external code." 2023-02-07 06:59:45 +00:00
Usta (Tsering) Shrestha
c4c07b12b6 reduce forest generation to be incremental
Previously, symlink forest generation involved removing the entire
symlink forest and recreating it from scratch. With this change,
a) symlinks which need not change are untouched,
b) symlinks pointing to the wrong location are fixed, and
c) symlinks which should no longer exist are removed.

On AOSP on my local machine, this reduces the symlink forest generation
step from 2.5s to 1.1s clean, and 0.6s when a single file is added to
a source directory.

Bug: 257528847
Test: m bp2build, touch `fakefile` under the forest, remove a file
from the source tree, rerun m bp2build. Manually verify the new forest
does not retain the link to the deleted source file, and that fakefile
no longer exists in the forest.

Change-Id: I481371ae487e9419af6a3a4370c552578b07d650
2023-02-07 06:23:43 +00:00
Jooyung Han
88b057efaa Remove apex.multi_install_skip_symbol_files
This has been a workaround to avoid duplicate build rules for
multi-install apexes. The reason for duplicate errors was that apex_name
was used to install symbol files.

We don't need to rely on apex_name for symbol files, hence no need for
the workaround.

Note that symbol files for apexes are still available via the paths
based on "soong module name".

Bug: 267581665
Test: cuttlefish (which uses multi-apex) build & run
Change-Id: Icaca667e139ef2aca32339a75b54b12a00449c2d
2023-02-07 14:13:24 +09:00
Jooyung Han
2cd2f9ad89 VNDK APEX doesn't use "apex_name" property
VNDK APEX has been using "apex_name" property to set "name" field in
apex_manifest. But setting apex_name had a side-effect of emitting
duplicate rules for symbol files for VNDK APEX and its override_apex.
(Please see the removed comments for more details about error)

Not using "apex_name" fixes the duplicate errors.

There're a few more vendor apexes with the same issue, which I will
handle in follow-ups.

Bug: 267581665
Test: m (soong test) && boot
Change-Id: I00f617cef8af4d21880d4e8b9c0b9ab9322ba15c
2023-02-07 13:58:19 +09:00
Kevin Dagostino
2c3be41226 Removing libutils_test which depends on libunwindstack.
Test: b test //system/...
Change-Id: Iceeaa5302931bb45aae4077677ceeee2f86d27a0
2023-02-07 04:11:29 +00:00
Jiyong Park
1bb18bb2ac Merge "Symbol files for Rust binaries in APEXes are exported" 2023-02-07 02:55:02 +00:00