Commit graph

45894 commits

Author SHA1 Message Date
Treehugger Robot
f8646fc937 Merge "Update RustDefaultVersion to 1.57.0" 2021-12-03 23:04:54 +00:00
Chris Wailes
284b7f32cc Update RustDefaultVersion to 1.57.0
Change-Id: I90e03f864541175e13701184ee74a89ffd03790b
2021-12-03 12:00:59 -08:00
Daniel Norman
7260025670 Merge "Forbid updatable: true on vendor APEXes." 2021-12-03 18:12:16 +00:00
Spandan Das
16ce4801ef Merge "Set targetsdkversion to future level if TARGET_BUILD_APPS is not empty" 2021-12-03 18:08:41 +00:00
Liz Kammer
8db8140b77 Merge "Support a quieter bp2build" 2021-12-03 17:54:47 +00:00
Usta Shrestha
fdee90d925 Merge "Removal of unused methods AppendProperties and PrependProperties from topDownMutatorContext" 2021-12-03 15:42:53 +00:00
Yu Liu
0a84e93b7f Merge "Support filename and sub_dir attributes in sh_binary" 2021-12-03 01:04:04 +00:00
Yu Liu
b302455879 Support filename and sub_dir attributes in sh_binary
Test: test by building system/timezone/apex:com.android.tzdata
Change-Id: I08114910fccbdacf6750e237d3e80ba37fde7651
2021-12-02 14:42:20 -08:00
Treehugger Robot
24eb82416b Merge "Support response file inputs in build_license_metadata" 2021-12-02 21:53:51 +00:00
Daniel Norman
6910911c64 Forbid updatable: true on vendor APEXes.
Vendor APEXes do not formally support updates outside of the main OTA
process. We should clarify this at build time.

Test: set vendor apex to updatable, observe failure
Test: apex_test.go
Change-Id: Ife8d242a42415ebf00d7dced72c07cda1fde1839
2021-12-02 12:53:12 -08:00
Usta
355a587e38 Removal of unused methods AppendProperties and PrependProperties from topDownMutatorContext
Test: m nothing
Bug: n/a

Change-Id: Ia37d1c9b96c39603964ba8db2ea6ba52d1138472
2021-12-02 15:21:45 -05:00
Spandan Das
e33e25b4a5 Set targetsdkversion to future level if TARGET_BUILD_APPS is not empty
manifest_fixer transforms an AndroidManifest.xml file for use in aapt2.
For TARGET_BUILD_APPS builds, set targetSdkVersion to a FutureApiLevel

Test: In build/soong, go test ./java
Test: TH

Test: In internal, TARGET_BUILD_APPS=xyz m
out/soong/.intermediates/packages/providers/MediaProvider/MediaProvider/android_common_MediaProviderGoogle_apex30/package-res.apk
&& aapt2 dump badging
out/soong/.intermediates/packages/providers/MediaProvider/MediaProvider/android_common_MediaProviderGoogle_apex30/package-res.apk
| grep targetSdkVersion # targetSdkVersion:'10000'

Test: In internal, m
out/soong/.intermediates/packages/providers/MediaProvider/MediaProvider/android_common_MediaProviderGoogle_apex30/package-res.apk
&& aapt2 dump badging
out/soong/.intermediates/packages/providers/MediaProvider/MediaProvider/android_common_MediaProviderGoogle_apex30/package-res.apk
| grep targetSdkVersion # targetSdkVersion:'Tiramisu'

Bug: 204107787

Change-Id: Ic6f21111d5a8c61ae789a7a3a001f669257a39b2
2021-12-02 19:55:25 +00:00
Ivan Lozano
cd4335ae45 Merge "rust: Ensure unwind tables are generated" 2021-12-02 17:39:52 +00:00
Artur Satayev
ee594919ea Merge "Use textproto format for classpaths.proto generation." 2021-12-02 15:43:47 +00:00
Liz Kammer
a9351ef6e6 Merge "Support empty strings in bp2build" 2021-12-02 15:35:10 +00:00
Liz Kammer
1aefc9d2d2 Support a quieter bp2build
Tie verbosity of bp2build to env var BP2BUILD_VERBOSE

Test: m bp2build
Test: BP2BUILD_VERBOSE=true m bp2build
Change-Id: Ib8f10ad73ed06c935126a77d18c1d9febc25348f
2021-12-02 10:00:29 -05:00
Artur Satayev
fb0a7234d7 Merge changes Ieb9aef29,I6985ebb6
* changes:
  Propagate min and max sdk versions to classpaths.proto configs.
  Introduce max_sdk_version device property.
2021-12-02 14:53:48 +00:00
Martin Stjernholm
eca59f3dee Merge changes Ied267053,Ica29c649
* changes:
  Fix prebuilt header files to produce proper AndroidMk entries.
  Reduce code duplication for testing the two header modules.
2021-12-02 14:50:47 +00:00
Artur Satayev
a71eabb705 Merge "Test SdkSpecForm." 2021-12-02 14:49:21 +00:00
Martin Stjernholm
d51cb5c130 Fix prebuilt header files to produce proper AndroidMk entries.
Necessary for modules that depend on headers through
LOCAL_HEADER_LIBRARIES in legacy Android.mk files.

Test: m nothing
Test: m nothing SOONG_CONFIG_art_module_source_build=false
  on internal master
Test: m droid checkbuild SOONG_CONFIG_art_module_source_build=false
Test: m SOONG_CONFIG_art_module_source_build=false \
        out/soong/.intermediates/prebuilts/module_sdk/art/current/sdk/prebuilt_jni_headers/linux_glibc_x86_64/prebuilt_jni_headers.a
      ar t out/soong/.intermediates/prebuilts/module_sdk/art/current/sdk/prebuilt_jni_headers/linux_glibc_x86_64/prebuilt_jni_headers.a \
        && echo ok
Bug: 202192894
Change-Id: Ied267053d1fc3563870a3faaf41d79983a22815a
2021-12-02 10:54:45 +00:00
Colin Cross
c01a5cd705 Merge "Only get dexpreopt config for device modules" 2021-12-02 05:28:36 +00:00
Jooyung Han
3d221b302a Merge "Set min_sdk_version (system/core)" 2021-12-02 02:27:20 +00:00
Treehugger Robot
abd43ec406 Merge "Add Sh_binaries property" 2021-12-02 00:52:23 +00:00
Treehugger Robot
5e4637dc1b Merge "Adding configuration support for Java 11" 2021-12-01 22:18:41 +00:00
Colin Cross
38310bb4ac Only get dexpreopt config for device modules
Calling dexpreopt.GetGlobalConfig can return errors, move the checks
that don't depend on dexpreopt.GetGlobalConfig first to avoid
breaking all modules when the global config is invalid, for example
in a partial branch that is missing the BootProfileImages file.

Bug: 207813628
Test: tradefed branch builds
Change-Id: Id1689de3f1ef986a41a60622cb357edb9d323b8a
2021-12-01 12:32:11 -08:00
Treehugger Robot
7c8497dc36 Merge "Ignore errors when running df in build_test.bash" 2021-12-01 18:53:09 +00:00
satayev
48dae67a76 Use textproto format for classpaths.proto generation.
Test: presubmit
Change-Id: I3fea94153939f05329f02091ca4fa838ee9df93f
2021-12-01 18:24:09 +00:00
Treehugger Robot
bc1d8dd659 Merge "Revert "Enable hwasan use after scope detection."" 2021-12-01 18:13:39 +00:00
satayev
cca4ab762e Propagate min and max sdk versions to classpaths.proto configs.
These attributed define a range for dessert releases where the jars
should be active, and included in corresponding CLASSPATH varibles by
derive_classpath.

Bug: 190818041
Test: presubmit
Change-Id: Ieb9aef29657ad0694d48a63019f93faca2678252
2021-12-01 17:58:41 +00:00
satayev
0a420e771a Introduce max_sdk_version device property.
Artifacts that go into apexes should only be active on certain SDK
versions. There is now a need to upper bound the range to support
expressiong statements like "this jar should only run on platforms
30-31".

Bug: 190818041
Test: presubmit
Change-Id: I6985ebb671841cdd9f0f37f916267ac5ed76e4f4
2021-12-01 17:51:22 +00:00
satayev
0ee2f913ef Test SdkSpecForm.
Bug: 190818041
Test: presubmit
Change-Id: Ib8cd891f03537712d709ed063dd76dee55221118
2021-12-01 17:43:00 +00:00
Cole Faust
fa3431cf37 Ignore errors when running df in build_test.bash
On glinux, df -h prints an "Operation not permitted" error
along with the rest of the output, and exits with status code 1,
causing the rest of the build_test script to not run. Ignore this
error.

Test: Running build_test.bash
Change-Id: I5422d0459ed471671d8d99a883c9ac3fca2e91b8
2021-12-01 08:24:53 -08:00
Martin Stjernholm
611e140043 Reduce code duplication for testing the two header modules.
Preparation for adding more tests to them.

Test: m nothing
Bug: 202192894
Change-Id: Ica29c649c4669e821371fbf8360f437871b7d041
2021-12-01 16:04:34 +00:00
Liz Kammer
46fb7aba4d Support empty strings in bp2build
Previously, could not set an empty string as a value of an attribute;
however, this is necessary in some cases. To not unnecessarily create an
empty string, use string pointers for attributes rather than strings.

Test: go test bp2build tests
Change-Id: I03b3a3567452d455246d22d81f86c317d06b7c39
2021-12-01 10:14:49 -05:00
Benjamin Brittain
7c721018bb Merge "Add support for Rust JNI Libraries" 2021-12-01 14:12:34 +00:00
Jingwen Chen
a358fdb6f3 Merge "Move libprotobuf-cpp-full and libprotobuf-cpp-lite to mixed builds denylist." 2021-12-01 13:32:27 +00:00
Jiakai Zhang
2258b889bf Merge "Add entries for STANDALONE_SYSTEMSERVER_JARS to systemserverclasspath.pb" 2021-12-01 12:29:37 +00:00
Florian Mayer
77d0035a07 Revert "Enable hwasan use after scope detection."
This reverts commit 753dd32123.

Reason for revert: Broke hwasan postsubmit and https://r.android.com/1906006 does not seem to fix it. Reverting while investigating.

Change-Id: I0033314ac936e7062dc785b3b362ead0b5e9d8f0
2021-12-01 02:31:45 +00:00
Treehugger Robot
f517a9c631 Merge "Remove python 2 support from manifest_utils" 2021-11-30 22:12:17 +00:00
Colin Cross
9579f4c05d Merge "Switch default for InstallBypassMake to true" 2021-11-30 20:31:26 +00:00
Cole Faust
c903f00e3f Remove python 2 support from manifest_utils
Bug: 203436762
Test: Presubmits
Change-Id: If93033a428aa1aa0dd2db973666d4790af8f0912
2021-11-30 12:24:02 -08:00
Benjamin Brittain
9edc375a06 Add support for Rust JNI Libraries
Test: Verified Rust JNI lib is in apex

Change-Id: Icb013d7b2f4c5d8ec009ea4937185689cc0cac16
2021-11-30 13:38:15 -05:00
Florian Mayer
413da04189 Merge "Enable hwasan use after scope detection." 2021-11-30 18:36:48 +00:00
Colin Cross
a8077126e8 Support response file inputs in build_license_metadata
Soong can produce very large lists of dependencies that exceed the
command line length limit when calling build_license_metadata.  Add
support for reading arguments from a response file.

Bug: 207445310
Test: m
Change-Id: I6b68e3a7468e797cfbe53ff5d9da2ec9badb000f
2021-11-30 08:08:03 -08:00
Christopher Parsons
93c3cb69bc Merge "bp2build implementation for c_std" 2021-11-30 15:50:31 +00:00
Jiakai Zhang
cee9e19a51 Add entries for STANDALONE_SYSTEMSERVER_JARS to systemserverclasspath.pb
This CL updates platform_systemserverclasspath,
systemserverclasspath_fragment, and
prebuilt_systemserverclasspath_fragment to write entries for
STANDALONE_SYSTEMSERVER_JARS to systemserverclasspath.pb. A new property
`standalone_contents` is aded to `systemserverclasspath_fragment` and
`prebuilt_systemserverclasspath_fragment` to list the standalone system
server jars in the APEX, and entries will be written to
systemserverclasspath.pb accordingly at build time.

To add more context, these entries will be consumed by derive_classpath
in order to generate an environment variable
PRODUCT_STANDALONE_SYSTEM_SERVER_JARS. The environment variable will
then be comsumed by odrefresh to determine what jars to preopt on early
boot.

Note that the variable should not end with "CLASSPATH" because the list
is not used by runtime as a classpath. It is just a colon-separated list
of jars. System server loads the jars separately with paths hardcoded in
the code.

Bug: 203198541
Test: manual -
  1. Add some jars to PRODUCT_STANDALONE_SYSTEM_SERVER_JARS
  2. Add some other jars to PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS
     and standalone_contents.
  3. Build an image.
  4. Flash the image to a device.
  5. adb shell echo \$STANDALONE_SYSTEMSERVER_JARS
  6. See the correct list of jars.
Change-Id: I09a6fd1d3db85c194330da9b751702a9bf069e26
2021-11-30 10:51:10 +00:00
Jingwen Chen
d480859cee Move libprotobuf-cpp-full and libprotobuf-cpp-lite to mixed builds denylist.
These libraries can be built by bazel, but not in the target and product
variant as required in mixed builds. See associated TODO for more info.

Bug: 206538317
Bug: 204810610
Bug: 204811222

Test: b build //external/protobuf:all
Change-Id: I45802c682dd40874de6393708d27323152463db6
2021-11-30 02:28:29 +00:00
Chris Parsons
79bd2b7761 bp2build implementation for c_std
Test: mixed_droid in conjunction with topic changes
Change-Id: Ic673c1b269f5082b490b32057eb60f3b73eb0940
2021-11-29 18:38:31 -05:00
Chris Parsons
8a4981617f Unravel much of the bp2build denylist.
This change involves adding a number of packages to the bp2build allowlist,
and subsequently adding several specific modules to the denylist (with reasoning).

The end result is that:
1. It's more clear why certain modules are denylisted, either via their unsupported
   dependencies or unsupported properties.
2. This increases the number of converted targets to 320, up from 284.

Test: mixed_droid.sh
Test: bp2build.sh

Change-Id: I9f50869401455033a191c6c41d3836509afe1071
2021-11-29 12:07:25 -05:00
Sorin Basca
c0244da203 Adding configuration support for Java 11
Bug: 195387073
Test: m
Change-Id: Ibf26f35b83b300acacae800f9962a00916869412
2021-11-26 17:26:33 +00:00