Commit Graph

26373 Commits

Author SHA1 Message Date
Colin Cross
046531066c Merge "Remove Fuchsia support from Make" 2021-07-23 17:15:45 +00:00
Jose "Pepe" Galmes
81005b13f7 Merge "Support for dexopt postprocessing in merge_target_files." 2021-07-23 04:42:43 +00:00
Jose Galmes
9c8f6eb7e1 Support for dexopt postprocessing in merge_target_files.
When using the VSDK, dexopt is not applied during the vendor build.
To avoid a first-boot time regression, dexopt is applied during the
merge stage, by running dexopt on the vendor apps and rebuilding
the vendor image.

Bug: 188179859
Test: Tested in keystone with VSDK target
Change-Id: Ie8e2d0a82850a2901fa6f250433bcbb43f0a97f2
2021-07-22 13:39:10 -07:00
Colin Cross
12b809af0c Remove Fuchsia support from Make
Bug: 194215932
Test: m checkbuild
Change-Id: I0f6fe8629beb10020d36a347e9f9385dda3e2684
2021-07-20 13:17:47 -07:00
satayev
65e68bb263 Rename PRODUCT_UPDATABLE_BOOT_JARS to PRODUCT_APEX_BOOT_JARS.
Regardless of an "updatable" property of individual, list all apex boot
jars in the same variable. This is less confusing for devs, especially
since they shouldn't care about things like boot images.

Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I0a559db462d1e1f67003ac54d1e27a89110d802a
Merged-In: I0a559db462d1e1f67003ac54d1e27a89110d802a
2021-07-20 15:46:53 +01:00
Treehugger Robot
37e6196c4e Merge "Fix typo in MODULE_BUILD_FROM_SOURCE variable." 2021-07-20 11:30:08 +00:00
Yifan Hong
ecef6fa224 Merge changes from topic "ota-package-nonab"
* changes:
  Only build OTA package for non-A/B with recovery
  Reland "Build OTA when boot image exists even without kernel or recovery fstab"
2021-07-20 02:59:47 +00:00
Yifan Hong
f32f65c5a4 Only build OTA package for non-A/B with recovery
Change Id397ad097539 alone would break hikey build, which
is a non-A/B device with a boot image, but without recovery.

Do not build OTA in this case.

Test: lunch hikey && m dist
Fixes: 194018054
Bug: 193588301
Change-Id: I8d09ad5c62d44699eb910ff62d32044bd97e8e44
2021-07-19 10:38:25 -07:00
Yifan Hong
8c1e526fdd Reland "Build OTA when boot image exists even without kernel or recovery fstab"
This reverts commit bf77787cc9.

Reason for revert: relanding change

Test: see next CL
Bug: 193925883
Bug: 193588301

Change-Id: Id397ad0975390617bd277573f2cdba9a2677842d
2021-07-19 10:38:25 -07:00
Yifan Hong
fa26e5b8db Merge "Revert "Build OTA when boot image exists even without kernel or recovery fstab"" 2021-07-19 16:33:26 +00:00
Yifan Hong
bf77787cc9 Revert "Build OTA when boot image exists even without kernel or recovery fstab"
This reverts commit ff2e24d6f9.

Reason for revert: breaks build

Bug: 194018054
Change-Id: Ia7f0436d21dc07143f7fae6f90a73bb4f730e98d
2021-07-19 16:28:49 +00:00
Treehugger Robot
bcb4776446 Merge "Move core-icu4j to PRODUCT_UPDATABLE_BOOT_JARS." 2021-07-16 17:22:47 +00:00
Yifan Hong
d15c78090c Merge changes from topic "ota_for_generic_boot_image"
* changes:
  Also extract kernel configs from boot image.
  Build OTA when boot image exists even without kernel or recovery fstab
2021-07-16 16:52:10 +00:00
satayev
09e9471eac Move core-icu4j to PRODUCT_UPDATABLE_BOOT_JARS.
... but not really: move it back to PRODUCT_BOOT_JARS before the list is
passed to soong. This ensures that core-icu4j remains on the boot image
for system health reasons and maintains the status quo.

core-icu4j is the only APEX jar (aside from ART jars) that is ever meant
to be part of the boot image. This is an implementation detail that most
devs don't and shouldn't care about. Instead, most devs assume that
PRODUCT_UPDATABLE_BOOT_JARS is where all apex jars are meant to go. In
the follow ups, PRODUCT_UPDATABLE_BOOT_JARS would be renamed to
PRODUCT_APEX_BOOT_JARS, regardless of the updatable property.

This also solves the problem where vendors add /system and /system_ext
boot jars to PRODUCT_BOOT_JARS outside of default_art_config.mk and
essentially violate the ordering requirement: all /apex jars come after
/system and /system_ext.

Bug: 191127295
Test: atest CtsClasspathsTestCases derive_classpath_test
Change-Id: Ifdfdd02519a0f5baea45619523f0c1eb8be186bc
2021-07-16 14:50:29 +01:00
Yifan Hong
ff2e24d6f9 Build OTA when boot image exists even without kernel or recovery fstab
On devices with a prebuilt boot image, TARGET_NO_KERNEL
may be set to enable signing, etc. In this case we still
want to build the OTA package.

Test: m otapackage on a device with generic boot image
      (where TARGET_NO_KERNEL is set)
Bug: 193588301
Change-Id: I4e5adc3f42a516ac0e2f66c313dbe34a469ebe05
2021-07-15 12:57:47 -07:00
Yifan Hong
b1627779fb Also extract kernel configs from boot image.
On devices with prebuilt generic boot image:
  TARGET_NO_KERNEL := true
  BOARD_PREBUILT_BOOTIMAGE is set
In this case, the process for extracting the kernel
config and version must also try extracting from the
prebuilt boot image.

Test: build on device with prebuilt boot image
Fixes: 193588301
Change-Id: I43dd8e206bcd1c9f3f5f51869f126791c50af01a
2021-07-15 12:57:47 -07:00
Martin Stjernholm
1b00d58d93 Merge "Document how APEXes are identified in the boot jar variables." 2021-07-15 18:57:00 +00:00
Martin Stjernholm
b2de2d6f0c Fix typo in MODULE_BUILD_FROM_SOURCE variable.
Cherry-picked from http://ag/15300830.

Test: env MODULE_BUILD_FROM_SOURCE=true \
        TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true
Test: env TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false
Bug: 191978129
Change-Id: I2056b198bc0b944a6736ff21077b902df13c1479
Merged-In: I2056b198bc0b944a6736ff21077b902df13c1479
2021-07-15 16:23:15 +01:00
Treehugger Robot
e01cfe4896 Merge "dexpreopt.config should be created even though unbundled image is built" 2021-07-15 03:41:30 +00:00
Martin Stjernholm
3a52c4f4fd Build the ART module from source if other Mainline modules are.
Cherry-picked from http://ag/15277370.

Test: env MODULES_BUILD_FROM_SOURCE=true \
        TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true
Test: env TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false
Bug: 191978129
Change-Id: I718d3878e9d5f5e710fa3d835a209184b633af48
Merged-In: I718d3878e9d5f5e710fa3d835a209184b633af48
2021-07-14 21:02:10 +01:00
David Gross
304da3988d Merge "Fix bitrot: RSTest_CompatLib[19] tests stopped building" 2021-07-14 18:34:58 +00:00
Jeongik Cha
b26bf58e12 dexpreopt.config should be created even though unbundled image is built
Bug: 188179858
Test: compare dexpreopt_config.zip files from
 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
 2. m dexpreopt_config_zip
(note that m clean should run between steps)

Change-Id: I92623b59e4fcac397c7fed3d7ab1070fe5281027
2021-07-14 18:52:01 +09:00
Alexander Smundak
4b8d81b41c Merge "Add mkpatsubst" 2021-07-13 22:11:03 +00:00
Treehugger Robot
818e6c0579 Merge "Remove pre-aidegen IDE support logic" 2021-07-13 16:32:16 +00:00
Sasha Smundak
3b25eb1c98 Add mkpatsubst
Bug: 181797530
Test: rbcrun build/make/tests/run.rbc
Change-Id: Id15daaf6e3ed68982e50cdc710563095ffcf57ba
2021-07-13 09:21:07 -07:00
Dan Willemsen
b349e4e04a Remove pre-aidegen IDE support logic
This has apparently been racy ever since
https://android-review.googlesource.com/c/platform/build/+/971925
and isn't generally useful anymore, as aidegen has taken over.

Bug: 193095826
Test: treehugger
Change-Id: I09b6b340b84d1476a574b302db520210561a4e5e
2021-07-12 21:57:33 -07:00
Bill Yi
827998ad08 Merge "Merge RQ3A.210705.001 to aosp-master - DO NOT MERGE" 2021-07-13 00:48:38 +00:00
Sasha Smundak
9afdb1c92a Add mksubst
Bug: 181797530
Test: rbcrun build/make/tests/run.rbc
Change-Id: I196c69259b830b6466430f6c933afb49fa787948
2021-07-12 13:36:13 -07:00
Bill Yi
80ce9b7379 Merge RQ3A.210705.001 to aosp-master - DO NOT MERGE
Merged-In: I0e49d49a8bddfbe8eceaa6ec46a08fee2ca4f105
Merged-In: If961d5fbf795ad5ef4b2f4ac4707087c5021e53f
Merged-In: If961d5fbf795ad5ef4b2f4ac4707087c5021e53f
Change-Id: Ia06e2825a3a0f9ccec2666132732c80d07a9a5ea
2021-07-12 11:11:14 -07:00
Martin Stjernholm
37557784fd Merge changes I544a0cfc,I8990b726
* changes:
  Add special cases for builds that cannot switch to ART prebuilts.
  Force building ART from source for AOSP products.
2021-07-12 13:51:23 +00:00
Martin Stjernholm
75b8f0a469 Add special cases for builds that cannot switch to ART prebuilts.
Cherry-picked from http://ag/15234811.

Test: env TARGET_PRODUCT=mainline_modules_x86_64 \
        build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=module_arm build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true with http://ag/15234812
Test: env TARGET_PRODUCT=cf_arm64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=cf_x86_64_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=cf_x86_phone build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=bonito build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns false with http://ag/15234812 in internal
Test: env TARGET_PRODUCT=aosp_flame build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  returns true with http://ag/15234812
Bug: 172480615
Change-Id: I544a0cfc9dfe6d738f75e60b7fec6d57f2b51d22
Merged-In: I544a0cfc9dfe6d738f75e60b7fec6d57f2b51d22
2021-07-09 19:30:01 +01:00
Martin Stjernholm
a877393386 Force building ART from source for AOSP products.
This is a workaround for the problem that we cannot control from make
which APEX gets picked for deapexing.

Cherry-picked from http://ag/15107826.

Test: env TARGET_PRODUCT=aosp_cf_x86_64_phone \
          SOONG_CONFIG_art_module_source_build=false \
        build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  This shows true
Test: env TARGET_PRODUCT=cf_x86_64_phone \
          SOONG_CONFIG_art_module_source_build=false \
        build/soong/soong_ui.bash \
        --dumpvar-mode SOONG_CONFIG_art_module_source_build
  This shows false in internal
Bug: 192006406
Bug: 172480615
Change-Id: I8990b726affeb08eabf130d20be45129a7c1c58d
Merged-In: I8990b726affeb08eabf130d20be45129a7c1c58d
2021-07-09 19:29:48 +01:00
Sasha Smundak
be4ebca4ba Add mkstrip
Bug: 181797530
Test: rbcrun build/make/tests/run.rbc
Change-Id: I6b7ade400273cf5a4fd561322e8e9936bc9d8df6
2021-07-09 10:44:22 -07:00
David Gross
dd400c3af1 Fix bitrot: RSTest_CompatLib[19] tests stopped building
(1) Incorrect path to librsjni.so because of typo in earlier change;
    fixed by fixing typo.

(2) clang did not specify the target architecture (I don't know what
    changed so that this no longer works); fixed by specifying target
    architecture and changing from gcc linker to lld (gcc linker didn't
    understand the options it was being passed by clang).

Test: blueline-userdebug
Test: make -j FORCE_BUILD_RS_COMPAT=true ENABLE_RSTESTS=true \
        RSTestForward_21_1_2 RSTestForward_22_0_2 \
        RSTestForward_23_0_3 RSTestForward_24_0_3 RSTestForward_25_0_2 \
        RSTestBackward RSTestBackward19 RSTest RSTest_Compat RSTest_Compat19
Test: unzip -t ${PATH_TO_APK}
      # confirm that .so files are present in RSTest_Compat[19] but not
        for the other APKs
      # confirm that .bc files are present in RSTestBackward19 but not
        for the other APKs
Test: adb shell am instrument [--abi armeabi-v7a] \
        -w ${TEST_PACKAGE_NAME}/androidx.test.runner.AndroidJUnitRunner
      # Run four times:
      #   "--abi" argument present or absent; always omit for
      #     RSTest_Compat[19], which only support platform default ABI
      #   "adb shell setprop debug.rs.forcecompat 0" or "1"
      # Note that RSTestBackward19 only supports 32-bit ABI, so both
      #   runs (with and without "--abi" argument) are actually armeabi-v7a
Test: After run, check logcat for RenderScript_jni
      # (missing): not built against support library; expected for all
        tests except RSTest_Compat[19]
      # "RenderScript_jni: RS native mode"; expected for RSTest_Compat[19]
        when setprop debug.rs.forcecompat is 0
      # "RenderScript_jni: RS compat mode"; expected for RSTest_Compat[19]
        when setprop debug.rs.forcecompat is 1

Change-Id: Icfaa226f2e1bfa909cb3bcbbe960f2804c355d2a
2021-07-08 17:01:43 -07:00
Martin Stjernholm
743513c830 Document how APEXes are identified in the boot jar variables.
Test: n/a - comment changes only
Bug: 191269918
Change-Id: Ib82ee24be13274051590be5e207883e4fbc9e6ae
2021-07-08 23:24:09 +01:00
Dan Willemsen
fd224efb7f Imply ALLOW_MISSING_DEPENDENCIES for Mac builds
At least until the device builds are largely disabled and host builds
become opt-in rather than opt-out. Otherwise every host test that
depends on a linux-only library breaks the mac build, even if it won't
be used.

Bug: 187222815
Change-Id: Ic598f2b66a949b90e5b3fbebf463f28278e4834f
2021-07-08 14:26:03 -07:00
Bill Peckham
cc2961f54a Break dependency from droid_targets to blueprint_tools
But only for a TARGET_BUILD_UNBUNDLED_IMAGE build. Since
the unbundled image build attempts to remove as many
framework sources as possible, we'd like to remove the
sources and dependencies of some blueprint_tools as
well.

Test: m nothing dist
Test: Verify graph is unchanged
Test: m nothing dist TARGET_BUILD_UNBUNDLED_IMAGE=true
Test: Verify that graph no longer includes blueprint_tools
Bug: 192629969
Change-Id: Ibfb52b841379e20855d0a935a13ad047af2fe58d
2021-07-02 13:13:10 -07:00
Jan Monsch
e147d481fe Removing AFTL integration from release tools.
Bug: 158639560
Test: Treehugger
Change-Id: I6949385e3448ad539099966c41ce99f156e3fdc4
2021-06-29 12:38:59 +00:00
Orion Hodson
e4debbf136 Merge "Update owners for dex_preopt and verify_uses_libraries" 2021-06-25 08:52:09 +00:00
Dario Freni
f753bc5890 Add MODULE_BUILD_FROM_SOURCE env variable.
When set, module builds will prefer source where applicable.

Bug: 191978129
Test: m; MODULE_BUILD_FROM_SOURCE=true m
Change-Id: Ie7f928674a511a98f17653fa814a42194ee0e9f9
2021-06-24 17:36:20 +00:00
Jeongik Cha
44d1de7b0d Merge "Emit DexPreoptImageLocationsOnDevice as well" 2021-06-23 23:59:07 +00:00
Jeongik Cha
242c436242 Emit DexPreoptImageLocationsOnDevice as well
Bug: 158843648
Test: check if dexpreopt config for the module defined in mk has
DexPreoptImageLocationsOnDevice field.

Change-Id: Ie8c7b1c8c5a6797f71920d9ce671dde0e1f489a3
2021-06-23 23:21:07 +09:00
Treehugger Robot
7b511794ec Merge "Quote the package name -- may contain special chars" 2021-06-22 16:29:02 +00:00
Xin Li
47e76c7a7a Merge "Master is T" 2021-06-22 02:15:38 +00:00
Bob Badour
c3c04f44da Quote the package name -- may contain special chars
Special characterts like & can cause problems if not quoted.

Test: m nothing

Bug: 191604339

Change-Id: I86f659de4a956a3186f21a5333781b92b71e7c17
2021-06-21 12:55:24 -07:00
Devin Moore
c92ebe14f2 Merge "Revert "Throw an error if androidboot.hardware is used for bootconfig"" 2021-06-21 18:22:31 +00:00
Colin Cross
d2e445148a Master is T
Bug: 186121492
Test: treehugger
Merged-In: Ie5ee4479ba98b9f4525b36e38493879a15661905
Change-Id: Ie5ee4479ba98b9f4525b36e38493879a15661905
(cherry picked from commit 5e9ba92e05)
2021-06-21 01:28:32 -07:00
Xin Li
618ba8464d DO NOT MERGE - Merge RQ3A.210605.005
Bug: 190855093
Merged-In: I4ab3c7053d6b3e669a928307fb17418d2b96749c
Change-Id: I7130ccdf6abae265352723e05de325a6cbd086e5
2021-06-18 15:42:08 -07:00
Devin Moore
5fe993f0cf Revert "Throw an error if androidboot.hardware is used for bootconfig"
This reverts commit 2e43e34d53.

The kernel bootconfig feature has been updated to handle mixed subkeys
and values, so androidboot.hardware is ok to use now.

Test: build and boot cuttlefish with 'hardware=cutf_vm'
Test: build and boot cuttlefish with 'androidboot.hardware=cutf_vm'
Bug: 191502832
Change-Id: I7c3f330a73abe6cf1fb7d14aaaa6cbc3e874a4aa
2021-06-18 13:42:48 -07:00
Inseob Kim
389d81d13e Merge changes from topic "init_first_stage_soong"
* changes:
  Add BUILD_USES_RECOVERY_AS_BOOT to soong config
  Directly create ramdisk dirs in ramdisk image rule
  Add BOARD_BUILD_SYSTEM_ROOT_IMAGE to config vars
2021-06-18 17:12:23 +00:00