Commit graph

58517 commits

Author SHA1 Message Date
Colin Cross
f05b0d35d2 Add riscv64-linux-android support
Add barebones riscv64-linux-android support.  This should be enough
to add riscv64-specific entries to Android.bp files, but can't
actually compile anything until there are riscv64 toolchains.

Test: arch_test.go
Change-Id: I0dcc7e797d9352dd38243be908a7f19004ff3db1
2022-10-03 08:43:13 -07:00
Colin Cross
4fa894d366 Removed unused GCC references
Remove Toolchain.GccRoot, Toolchain.GccVersion, and Toolchain.GccTriple
that were only used by an unused function.  This removes most of the
references to GCC, although there are still some left in the host
toolchains.

Test: No change to build.ninja for aosp_cf_x86_64_phone-userdebug or aosp_raven-userdebug
Change-Id: I72b8af1f9aa83e6e15c9e00ed1e817b6cc3a031a
2022-09-30 19:32:48 -07:00
Sam Delmerico
a0124bb13d Merge "document workaround test_bp2build_generates_all_buildfiles" 2022-09-28 19:09:16 +00:00
Treehugger Robot
d15df3269c Merge "Allowlist more deps of minadbd." 2022-09-28 18:20:03 +00:00
Trevor Radcliffe
d4961319a9 Merge "Add additionalLinkerInputs for both version_script" 2022-09-28 16:01:36 +00:00
Yu Liu
cb7516349c Merge "Enable mediaswcodec." 2022-09-28 15:42:46 +00:00
Fedor Kudasov
80ee992318 Merge "Revert "run bp2build in mixed_mode_test.sh"" 2022-09-28 14:57:06 +00:00
Sam Delmerico
cb93d29aa9 Revert "run bp2build in mixed_mode_test.sh"
Revert submission 2221893-silvermont-toolchain

Reason for revert: broke aosp_master build at b/249495321
Reverted Changes:
If32dbdab5:run bp2build in mixed_mode_test.sh
Ia96a2a82c:create cc_register_toolchains function
I074915cfa:create cc_register_toolchains function

Change-Id: I79717a23ebe2d7fe00b1b288acc96ce147e6ae92
2022-09-28 14:42:28 +00:00
Sam Delmerico
5db1a67297 Merge "run bp2build in mixed_mode_test.sh" 2022-09-28 13:10:24 +00:00
Jingwen Chen
a051942118 Allowlist more deps of minadbd.
..except minadbd itself, which depends on 'adbd_system_api_recovery', a
phony module type that doesn't have a bp2build converter.

Test: bp2build.sh
Bug: 243025934
Change-Id: I48db09f8028a04089ed6fa6afac00007c3de4b31
2022-09-28 08:28:48 +00:00
Treehugger Robot
2dd513d183 Merge "Demote BinderGetCallingInMainThread from an error to a warning" 2022-09-28 03:20:04 +00:00
Treehugger Robot
929dc2bd5a Merge "Convert Soong licenses attribute to Bazel's applicable_licenses attribute" 2022-09-28 00:09:04 +00:00
Cole Faust
3bce294a30 Demote BinderGetCallingInMainThread from an error to a warning
Lint was updated, and adds this new error-level check that we
have preexisting occurances of.

Bug: 247885568
Bug: 249337906
Bug: 249335143
Test: m lint-check on internal master
Change-Id: I88c337dd1e12b2722a97e878b5277201df0c163d
2022-09-27 15:20:01 -07:00
Treehugger Robot
76832f5b10 Merge "Tag apex_set's 'set' config with android:"path"" 2022-09-27 21:36:46 +00:00
Yu Liu
8c98153fc3 Enable mediaswcodec.
Bug: 233947030
Test: Manual
Change-Id: I4588167fadc609b0cf28a2918e0a24771a295b3b
2022-09-27 12:47:26 -07:00
Sasha Smundak
05b0ba6d1c Convert Soong licenses attribute to Bazel's applicable_licenses attribute
Add it to the `CommonAttributes` struct and handle it in fillCommonBp2BuildModuleAttrs

Bug: 190817312
Test: treehugger
Change-Id: I7b21056e680384d4046372ee844512029721026e
2022-09-27 11:38:11 -07:00
Chih-hung Hsieh
c0d3527a0d Merge "Reland "Update clang version to clang-r468909"" 2022-09-27 17:20:58 +00:00
Chih-hung Hsieh
5c40a92d33 Reland "Update clang version to clang-r468909"
This reverts commit fc21a0e55b.
Reason for revert: broken builds/tests were fixed

Bug: 241011085
Change-Id: Ifba0bb05e690c8204e3ef34f59d7bf7ef57638ed
2022-09-27 17:18:21 +00:00
Harshit Mahajan
964a46cb64 Merge "Enforce mainline modules to have latest target sdk version by default." 2022-09-27 17:04:27 +00:00
Cole Faust
085d54469b Merge "Downgrade UnspecifiedImmutableFlag errors to warnings" 2022-09-27 16:35:46 +00:00
Pranav Gupta
eba03b0935 Tag apex_set's 'set' config with android:"path"
This allows apex_set's set config to use other soong modules as a dependency

Bug:249169376
Change-Id: I8da20c6f474328d63d9aa3811f94e3e04b89ea4c
Test: Added a test case to check soong module assignment to the set field of an apks_set rule
2022-09-27 16:29:36 +00:00
Trevor Radcliffe
37ec2f7256 Add additionalLinkerInputs for both version_script
and dynamic_list.

Fixes: 249175838
Test: Unit tests
Change-Id: Id65e05cc9dbd294ce09dea36851d69d9962994c7
2022-09-27 01:50:11 +00:00
Jiyong Park
afc97f0209 Merge "Use PackedAdditionalOutputs when reading apk_set for canned_fs_config" 2022-09-27 00:11:05 +00:00
Cole Faust
60644f9cb0 Merge "Add binary properties to python_defaults and add modern_python_path_defaults" 2022-09-26 23:43:38 +00:00
Cole Faust
c586109016 Downgrade UnspecifiedImmutableFlag errors to warnings
There are preexisting occurances of it in the source tree.

Bug: 247885568
Test: Presubmits
Change-Id: Ieac1e297414e6abb91460af5da30461d20e7a6ab
2022-09-26 16:22:37 -07:00
Treehugger Robot
018dcfce20 Merge "Unit test for missing module error" 2022-09-26 22:48:45 +00:00
Cole Faust
638ae72b3a Merge "Add flag to not add directory of entrypoint to sys.path" 2022-09-26 22:42:21 +00:00
Treehugger Robot
42e4361765 Merge "cosmetic: mark the determination of ui build steps" 2022-09-26 21:11:51 +00:00
Treehugger Robot
8c45f98c3e Merge "File paths to allow "./" prefix" 2022-09-26 21:02:34 +00:00
Treehugger Robot
334f1e43ac Merge changes Ied52003d,I147d946b
* changes:
  java_sdk_library: Use dist_stem when generating sdk snapshot file names
  Add sdk:"keep" tag support
2022-09-26 20:49:13 +00:00
Treehugger Robot
cd9207cfe6 Merge "Rename sdk field tag "keep" to "ignore"" 2022-09-26 19:42:34 +00:00
Cole Faust
40c34500c4 Add binary properties to python_defaults and add modern_python_path_defaults
So that we can more easily enable these new flags on several
modules.

It seems you can still apply a python_defaults to a python_library
even with this change, so I didn't break it out into a separate
python_binary_defaults.

Bug: 245583294
Test: m py_dont_import_folder_of_entrypoint_test && out/host/linux-x86/testcases/py_dont_import_folder_of_entrypoint_test/x86_64/py_dont_import_folder_of_entrypoint_test
Change-Id: Iecf9c1845df4630bafdea9957eb2450c15f8596b
2022-09-26 12:05:03 -07:00
Charisee Chiw
893cf0469f Merge "rustc-1.64.0 Build 9099361" 2022-09-26 19:03:01 +00:00
usta
6fffdd5fa8 cosmetic: mark the determination of ui build steps
Test: m libc
Bug: N/A
Change-Id: I0e7ba9cfccfe1ecf005b55a5912d1b748c294926
2022-09-26 18:58:42 +00:00
Usta Shrestha
d558031e0c File paths to allow "./" prefix
bazel_path conversion would treat "./" as a package boundary
  which would be incorrect

Bug: b/243072036
Test: unit test build_conversion_test.go and `m libc`
Change-Id: I0fc44d2fd7a4270442c8755219a11fd585244c5c
2022-09-26 14:44:15 -04:00
Cole Faust
eb3a900c5c Add flag to not add directory of entrypoint to sys.path
The python interpreter will by default add the directory of
the entrypoint script to the beginning of sys.path. This
can be disabled in python 3.11+ (which is not released yet)
using the PYTHON_SAFE_PATH environment variable or the -P flag.
As a workaround to have this behavior in older python versions,
we can make an __soong_entrypoint_redirector__.py file at the
root of the zip file that is the entrypoint, and then that
file will redirect to the real entrypoint.

This brings non-embedded-launcher python modules closer to
the embedded launcher version. The embedded launcher binaries
already act like this because they start at an __main__.py file
at the root of the zip file.

Bug: 245583294
Test: m py_dont_import_folder_of_entrypoint_test && out/host/linux-x86/nativetest64/py_dont_import_folder_of_entrypoint_test/py_dont_import_folder_of_entrypoint_test
Change-Id: I39aaf04fb19c3ba7f5c9d98220872d6d08abf736
2022-09-26 11:22:38 -07:00
Paul Duffin
e840995ac3 java_sdk_library: Use dist_stem when generating sdk snapshot file names
The API finalization process for platform releases copies various files
from the apistubs/ dist directory into prebuilts/sdk/<n>/...  Having
them use the same name in both places makes that process simpler. For
most modules the name of the file is derived from the name of the
module by appending a suffix but unfortunately, for some modules that
does not work. e.g. the conscrypt.txt file is produced by the
conscrypt.module.public.api module. The dist_stem property was added to
java_sdk_library to allow the stem name of the file to differ from the
module name.

The API finalization process for extension APIs does something similar
as it extracts various files from the snapshots and copies them into
the appropriate extension API specific directory in
prebuilts/sdk/extensions/<n>. Instead of copying files from the
apistubs/ dist directory (which is not built for trains) it copies them
from sdk snapshots that are built as part of the train.

Previously, the sdk snapshot used to derive the name of the files
within the snapshot from the name of the module, it ignored the
dist_stem property. This change causes it to use the dist_stem property
to make it consistent with the apistubs/ dist directory naming.

The file name is created in
sdkLibrarySdkMemberProperties.AddPropertyToSet() which does not have
access to the dist_stem property. So, it has to be supplied in the
sdkLibrarySdkMemberProperties instance in the new Stem property.

Bug: 248258460
Test: m nothing
      BUILD_NUMBER=fixed packages/modules/common/build/mainline_modules_sdks.sh --build-release=latest
      # Ran the previous command before and after and make sure that the
      # conscrypt, art and icu sdk snapshots use the dist_stem value but
      # none of the other snapshots are affected.
Change-Id: Ied52003de63dcdb86a252a39bb8781f85d51a6ff
2022-09-26 18:32:58 +01:00
Paul Duffin
bfdca96828 Add sdk:"keep" tag support
Fields tagged with `sdk:"keep"` will keep the value even if it would
normally be cleared because it was common across a number of structs.
This will allow a module type to specify the same value across all
structs populated directly from variants and have it be copied into all
common property structs without clearing it from the variant specific
structs.

Bug: 248258460
Test: m nothing
Change-Id: I147d946b11fd8766a7d875d9206e8f5034f585d6
2022-09-26 18:28:56 +01:00
Cole Faust
2f037821b0 Merge "Add flag to not add top-level modules to PYTHONPATH" 2022-09-26 17:24:08 +00:00
Paul Duffin
02e25c85eb Rename sdk field tag "keep" to "ignore"
"ignore" is a better description of the effect that this tag has on the
optimization that is done as part of the sdk snapshot generation.
"keep" implies that something special is done with the field during the
optimization process but actually the optimization process completely
ignores the property, just as it does with unexported fields.

Bug: 248258460
Test: m nothing
Change-Id: Idfdfd87f927d641d4d301cbbde72b463c89155bf
2022-09-26 18:23:25 +01:00
Alix Espino
394a12b315 Merge "Implement bp2build for prebuilt_etc_xml" 2022-09-26 17:18:56 +00:00
Treehugger Robot
4d0a6c8669 Merge "Policy change: 0BSD and MIT-0 as permissive" 2022-09-26 17:17:11 +00:00
Treehugger Robot
3a36ba81d6 Merge "Refactor lto mutator to not alter user-input props" 2022-09-26 17:08:33 +00:00
Usta Shrestha
808bc719b9 Unit test for missing module error
build_conversion handling of missing module

Bug: N/A
Test: unit test build_conversion_test.go
Change-Id: I636b7228040294d354bf2add050babe66fc25cce
2022-09-26 15:37:34 +00:00
Treehugger Robot
bb3540990c Merge "cosmetic: switch instead of if-else" 2022-09-26 15:35:13 +00:00
Liz Kammer
729aaf4a10 Refactor lto mutator to not alter user-input props
Test: lto test
Change-Id: I700960c6fb6527123e08e8e3c90a15dea0987df3
2022-09-26 11:03:14 -04:00
Vinh Tran
9ffa394f37 Merge "Add more Soong unit test coverage for gensrcs" 2022-09-26 15:01:40 +00:00
Vinh Tran
1d28c271a4 Merge "Convert genDir to RULEDIR in gensrcs's cmd" 2022-09-26 15:01:30 +00:00
Jiyong Park
e1b6914f58 Use PackedAdditionalOutputs when reading apk_set for canned_fs_config
When an app_set module is included in an APEX, we don't use its
`builtFile` which is the main APK, , but `PackedAdditionalOutputs()`
which is the zip file where all APK files (main + additional) files are
packed. We then unzip them into the corresponding directory inside the
APEX.

However, `buildFile` still has been used when constructing
canned_fs_config whose content should match with what are actually
included in the APEX. Fixing the bug by using
`PackedAdditionalOutputs()` instead.

Bug: 236299724
Test: m nothing (apex_test.go amended)
Test: follow https://buganizer.corp.google.com/issues/236299724#comment34
* mkdir for-236299724
* cd for-236299724
* repo init -u https://android.googlesource.com/platform/manifest -b
* master --partial-clone --clone-filter=blob:none
* repo sync -c -j8
* unzip -l ~/Downloads/mainline_t_2022_jun_t1004275.zip | cut -c31- | grep | xargs rm -f
* unzip ~/Downloads/mainline_t_2022_jun_t1004275.zip
* source build/envsetup.sh
* choosecombo 1 aosp_arm64 userdebug
* m com.android.extservices.gms

Change-Id: If9752c07748300dbb963568de4e879b041b0a206
2022-09-26 14:55:35 +09:00
Vinh Tran
370e08c1af Add more Soong unit test coverage for gensrcs
When gensrcs's srcs prop is set with filegroup from external package and especially when gensrcs generates cpp headers, it's not trivial to know what the output paths and their correponding include paths look like.

In mixed build, there are a few bugs in gensrcs's include paths for cpp headers (b/248555356 and b/248554581) that we'll eventually need to fix. These tests serve as an documentation of the existing behavior when gensrcs generate cpp headers.

Test: go test
Bug: 248555356
Change-Id: I10168dd4229be8f110a31955d214ef792c8050de
2022-09-25 20:21:17 -04:00