Commit graph

72642 commits

Author SHA1 Message Date
Colin Cross
6013329bff Merge "Make SOONG_HOST_OUT an alias for HOST_OUT" 2021-11-30 20:31:26 +00:00
Treehugger Robot
d373dd2938 Merge "Use dex2oat64 on 64-bit-only builds" 2021-11-30 09:48:09 +00:00
Roland Levillain
9bc6186a78 Merge "Remove gdbserver from PRODUCT_PACKAGES_DEBUG in base_system.mk." 2021-11-30 09:19:09 +00:00
Roland Levillain
3fed5bbbab Remove gdbserver from PRODUCT_PACKAGES_DEBUG in base_system.mk.
The `gdbserver` binaries have been removed from Android sources
(https://android-review.googlesource.com/c/platform/prebuilts/misc/+/1748908/).

Test: m
Change-Id: I8e3001508360906f3fe86830b81fb94b01a5ac74
2021-11-29 14:26:10 +00:00
Ulyana Trafimovich
af78df0553 Merge "Sort PRODUCT_APEX_BOOT_JARS automatically." 2021-11-29 11:46:54 +00:00
Ulya Trafimovich
c9ec59c72a Sort PRODUCT_APEX_BOOT_JARS automatically.
This is a follow-up CL for https://r.android.com/1900565.

This is needed because product makefiles may need to add their own
APEX boot jars, and they cannot insert them in the correct alphabetical
order on the list. So it needs to be sorted automatically. Do this
after processing all product makefiles and populating the variable,
but before passing it to Soong.

Bug: 207474880
Test: lunch aosp_cf_x86_64_phone-userdebug && launch_cvd
      # cuttlefish device boots successfully
Change-Id: I86b58ef8aeac595e401d872f59a2936a67bedeec
2021-11-26 16:02:54 +00:00
Kevin Brodsky
1917e4e047 Use dex2oat64 on 64-bit-only builds
dexopt defaults to dex2oat32 unless instructed otherwise. Since
dex2oat32 doesn't exist on a 64-bit-only build, make sure dex2oat64
is selected instead.

Test: boot aosp_cf_x86_64_only_phone and check that installd doesn't
  try to use dex2oat32
Change-Id: Ia67e746894684a52a4e5b765bfde0f6dd0efbf6e
2021-11-26 15:59:33 +00:00
Cole Faust
7d9103b390 Merge "Change type of TARGET_BUILD_APPS from bool to list" 2021-11-25 01:06:53 +00:00
Treehugger Robot
359665674f Merge "Exclude predefined variables from board config" 2021-11-24 20:30:00 +00:00
Treehugger Robot
46bd6ec0f6 Merge "Ensure there are no empty paths in ANDROID_BUILD_PATHS and PATH." 2021-11-24 19:39:33 +00:00
Treehugger Robot
03aa6cd538 Merge "Sort PRODUCT_APEX_SYSTEM_SERVER_JARS automatically." 2021-11-24 19:13:31 +00:00
Ulya Trafimovich
00496c1683 Sort PRODUCT_APEX_SYSTEM_SERVER_JARS automatically.
This is needed because product makefiles may need to add their own
system server jars to this variable, and they cannot insert them in
the correct alphabetical order on the list. So it needs to be sorted
automatically. Do this after processing all product makefiles and
populating the variable, but before passing it to Soong.

Bug: 207474880
Test: atest art_standalone_dexpreopt_tests:art_standalone_dexpreopt_tests.DexpreoptTest#ForSystemServer
Change-Id: I80dbf555c395c92539c506d3d8b1f2f101a58bce
2021-11-24 15:41:49 +00:00
Martin Stjernholm
6a012266a1 Ensure there are no empty paths in ANDROID_BUILD_PATHS and PATH.
Test: lunch armv8
      - Check that PATH has no "::".
      - Check that an executable script in CWD doesn't get executed.
Change-Id: I3a97eb661c614ff2e09723e9ccca0bdeb63dbdc5
2021-11-24 14:59:15 +00:00
Treehugger Robot
9680501cc8 Merge "DO NOT MERGE: Revert "Add NEED_AIDL_NDK_PLATFORM_BACKEND"" 2021-11-24 05:35:08 +00:00
Nahian Ashraf
f41bff99b3 DO NOT MERGE: Revert "Add NEED_AIDL_NDK_PLATFORM_BACKEND"
Revert submission 1859096-remove_ndk_platform

Reason for revert: Build Breakage
Reverted Changes:
I62c995642:Add NEED_AIDL_NDK_PLATFORM_BACKEND
I1cbdce916:Don't generate the ndk_platform backend unless exp...

Change-Id: I4ddfb73ed7b9bcf1c6dee113e3ba9fd66d79d296
2021-11-24 03:34:07 +00:00
Cole Faust
5588a88969 Change type of TARGET_BUILD_APPS from bool to list
TARGET_BUILD_APPS is supposed to be a list of apps to
build, so having it be a bool was incorrect. Change it
to properly reflect what it is, because the starlark
product configuration relies on soong's interpretation
of variables types.

Bug: 201700692
Test: Presubmits
Change-Id: I00109b57abbcda86077f0465f982f54b4a77a7f0
2021-11-23 19:04:11 -08:00
Jiyong Park
4d7ddff334 Merge "Add NEED_AIDL_NDK_PLATFORM_BACKEND" 2021-11-24 01:43:19 +00:00
Cole Faust
be6d5f13b2 Exclude predefined variables from board config
mk2rbc has a few predefined variables that can't be
set in the product/board config makefiles, unless they're
set to their predefined values. Exclude these variables
from the board config input variables so that they don't
conflict.

Bug: 201700692
Test: m RBC_BOARD_CONFIG=1 mainline_system_x86_64-userdebug (ninja files differ still but this fixes a compilation error)
Change-Id: Idc11b2c5029d28116236b289ad1f09afaaf83cc3
2021-11-23 16:45:29 -08:00
Cole Faust
4228f8f7a3 Merge "Return product config variables from board_configuration" 2021-11-23 20:46:45 +00:00
Michael Groover
495fafef6f Merge "SignApk - support loading private keys from pkcs#11 keystore" 2021-11-23 19:53:38 +00:00
Treehugger Robot
55870dd500 Merge "Disallow setting LOCAL_MODULE_STEM for android packages" 2021-11-23 05:21:15 +00:00
Cole Faust
f0d7d8ff73 Return product config variables from board_configuration
The board config can actually change a few product config
variables that are not made read-only.

Bug: 201700692
Test: ./build/bazel/ci/rbc_regression_test.sh -b aosp_cf_x86_64_phone
Change-Id: Ib2ac04ac2c5a56d32bca51fc8189e44e180075ee
2021-11-22 16:31:46 -08:00
Martin Stjernholm
f823ec6e99 Merge "Configure boot image profiles for platform and unbundled ART module builds (reland)." 2021-11-22 14:10:54 +00:00
Treehugger Robot
1fb1088e88 Merge "Fix signapk not found error when running ota_from_target_files locally" 2021-11-19 23:25:05 +00:00
Kelvin Zhang
4fc3aa0bc3 Fix signapk not found error when running ota_from_target_files locally
location of ota_from_target_files changed from
out/host/linux-x86/bin to
out/soong/host/linux-x86/bin . This changes relative position of
signapj.jar. To fix, use ANDROID_HOST_OUT as search path

Change-Id: I5397171566e9d7598b5ef16ae26641f0c183d748
2021-11-19 11:34:54 -08:00
Martin Stjernholm
91964c82e3 Configure boot image profiles for platform and unbundled ART module
builds (reland).

- Use art/build/boot/boot-image-profile.txt for the primary boot image
  in the ART module, both when it's built from source in platform and
  as an unbundled module.

- Use frameworks/base/boot/boot-image-profile.txt for the framework
  extension image in platform, but not in unbundled builds.

This should obsolete the combined profile
frameworks/base/config/boot-image-profile.txt.

This relands https://r.android.com/1881863 with a fix to allow multiple
values on PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION.

Test: build/soong/soong_ui.bash --dumpvar-mode \
        PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION
  and check that it prints both art/build/boot/boot-image-profile.txt
  and frameworks/base/boot/boot-image-profile.txt in a platform build
  on master.
Test: build/soong/soong_ui.bash --dumpvar-mode \
        PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION
  and check that it prints only art/build/boot/boot-image-profile.txt
  in an unbundled build on master-art.
Test: banchan com.android.art && m
  on master-art and check that
  out/soong/.intermediates/art/build/apex/com.android.art/android_common_com.android.art_image/image.apex/javalib/x86_64/boot.oat
  shrinks from 14 MB to 4.7.
Test: m droid
  on master together with https://r.android.com/1895131 and check that
  out/soong/.intermediates/art/build/apex/com.android.art/android_common_com.android.art_image/image.apex/javalib/x86_64/boot.oat
  and out/target/product/vsoc_x86_64/system/framework/x86_64/boot-framework.oat
  are identical.
Test: lunch armv8-eng && art/tools/buildbot-build.sh
  on master-art
Bug: 174746397
Change-Id: I9114271bc69cf0888150b2c778a086bc50b73045
2021-11-19 16:21:37 +00:00
Treehugger Robot
9a991fab04 Merge "Update conversion results file only when it changed." 2021-11-19 03:12:12 +00:00
Colin Cross
345da983ad Merge "Extract primary APK from apk sets in Soong" 2021-11-19 02:18:20 +00:00
Colin Cross
da166c5ad4 Make SOONG_HOST_OUT an alias for HOST_OUT
Soong now installs to the same directory as Make, point SOONG_HOST_OUT
at HOST_OUT.

Bug: 204136549
Test: m checkbuild
Change-Id: I49bfc0466056d270c8023288a6fe778c3445a900
2021-11-18 16:26:58 -08:00
Sasha Smundak
7dc8f486c2 Update conversion results file only when it changed.
Test: treehugger
Change-Id: Ia0d6bf614fa0714a977b2880f7271d54df034366
2021-11-18 15:17:59 -08:00
Treehugger Robot
613ae210f6 Merge changes from topics "dist_for_goals", "mk2star"
* changes:
  Runtime reporting of the conversion errors.
  Runtime support for dist-for-goals.
2021-11-18 22:04:52 +00:00
Sasha Smundak
c20dd972a9 Runtime reporting of the conversion errors.
Bug: 204062171
Test: rbcrun build/make/tests/conversion_error.rbc (displays a message, stops)
  rbcrun RBC_MK2RBC_CONTINUE=t build/make/tests/conversion_error.rbc  (displays a message and continues)
Change-Id: Idf0fe6bbb08b1eca1f392d81950eed4a214f3289
2021-11-18 11:27:55 -08:00
Sasha Smundak
91fc734100 Runtime support for dist-for-goals.
Convert dist-for-goals.

Bug: 198496782
Test: rbcrun build/make/tests/run.rbc
Change-Id: I46ef9e897143aecf8bd28ad8569d48e74530b0e5
2021-11-18 11:20:34 -08:00
Yifan Hong
351cd2e489 Merge changes from topic "servicemanager-recovery"
* changes:
  Add servicemanager.recovery to base_vendor.mk.
  Add recovery service_contexts.
2021-11-18 04:39:14 +00:00
Colin Cross
f42c7d6be1 Extract primary APK from apk sets in Soong
In preparation for Soong handling the installation rules, extract
the primary APK from the apk set in Soong.

Bug: 204136549
Test: build test android_app_set
Change-Id: I416b57009101ca4c05c11102f260e102af13bf0d
2021-11-17 19:45:49 -08:00
Treehugger Robot
dacbe7a5a2 Merge "Add notdir implementation" 2021-11-17 20:58:24 +00:00
Cole Faust
0cc94d3275 Add notdir implementation
mk2rbc would already translate notdir calls,
but since there was no implementation it would
fail at runtime.

Bug: 201700692
Test: m rbcrun; rbcrun build/make/tests/run.rbc
Change-Id: Ie0f4e7b65448e612fa56f87b0bc138648cc0ad58
2021-11-17 10:50:14 -08:00
Cole Faust
8a7e9afc54 Merge "Don't assume _soong_config_namespaces_key is present" 2021-11-16 19:45:20 +00:00
Cole Faust
2f4692bf31 Don't assume _soong_config_namespaces_key is present
The board configuration doesn't use init_globals(),
which is where _soong_config_namespaces_key normally
is set. Just assume empty dictionaries in
soong_config_namespace where appropriate.

Bug: 201700692
Test: build/bazel/ci/rbc_product_config.sh -b armv8-userdebug
Change-Id: I5f1e52fa0bdde32bff0e8db54861557dcb327190
2021-11-15 16:03:51 -08:00
Colin Cross
d1c2c4e1b8 Merge "Translate BUILT_INSTALLED to LOCAL_BUILT_MODULE" 2021-11-15 23:57:57 +00:00
Treehugger Robot
f1e1bcb0ee Merge "Always default to 1.9 for host java modules in Android.mk files" 2021-11-15 22:36:51 +00:00
Ivan Lozano
d59e23e2eb Merge "Merge soong_{cc,rust}_prebuilt.mk" 2021-11-15 22:19:46 +00:00
Colin Cross
362f55af96 Always default to 1.9 for host java modules in Android.mk files
Host modules shouldn't use the logic for device modules to determine
the java language version to use, always default to 1.9.

Bug: 202761304
Test: m checkbuild
Change-Id: I268dd34d887db4646e188858c7f2aedc30966856
2021-11-15 21:46:52 +00:00
Colin Cross
802f2116ed Translate BUILT_INSTALLED to LOCAL_BUILT_MODULE
Soong creates install rules and lists them in LOCAL_SOONG_INSTALL_PAIRS,
where they get copied to ALL_MODULE.$(m).BUILT_INSTALLED.  BUILT_INSTALLED
is used by package-modules.mk to copy the built modules to alternate
install locations for building zips like continuous_native_tests.zip.

Translate Soong's built module location, which is listed in
LOCAL_PREBUILT_MODULE_FILE, into $(LOCAL_BUILT_MODULE) when setting
BUILT_INSTALLED so that package-modules.mk copies from
$(LOCAL_BUILT_MODULE) instead of $(LOCAL_PREBUILT_MODULE_FILE).  This
ensures that the transitive dependencies added to $(LOCAL_BUILT_MODULE),
for example the unstripped symbols files, are present when
continuous_native_tests.zip is built.

Bug: 206137439
Test: manual
Change-Id: I1a45cd6d3c81d6435a10f4d29557e521753068a4
2021-11-15 13:15:22 -08:00
Martin Stjernholm
629ca86722 Merge "Revert "Configure boot image profiles for platform and unbundled ART module"" 2021-11-15 20:01:45 +00:00
Martin Stjernholm
a7e1611118 Revert "Configure boot image profiles for platform and unbundled ART module"
This reverts commit 1f925ed13e.

Reason for revert: SH regressions in boot and app startup: b/206152027

Bug: 174746397
Bug: 206152027
Change-Id: I60f642b8e4dd8ea04248b835e5b76ffcf01ac300
2021-11-15 17:16:03 +00:00
Yifan Hong
ae48bc0499 Add servicemanager.recovery to base_vendor.mk.
This is so that AIDL HALs can run in recovery.

Test: manual in recovery
Bug: 170338625
Change-Id: Ie9bb7bd554d9d848e6bacd091e2273b7f390c2a9
2021-11-13 00:28:05 -08:00
Yifan Hong
276b8c0230 Add recovery service_contexts.
This allows servicemanager to run in recovery.

Test: manual
Bug: 170338625
Change-Id: I60671af0bcaf13fd545b2f286243fee474caace5
2021-11-13 00:28:05 -08:00
Treehugger Robot
35e7ab363c Merge "Configure boot image profiles for platform and unbundled ART module builds." 2021-11-12 19:56:53 +00:00
Ivan Lozano
d96be59972 Merge soong_{cc,rust}_prebuilt.mk
Much of soong_cc_prebuilt.mk is duplicated in soong_rust_prebuilt.mk.
This adds maintenance burden and increases the risk of bugs or
inconsistencies. Merge the two to simplify this.

Bug: N/A, clean-up
Test: m
Change-Id: I833fba94e299006b34f8e53d5519c6b19f684d39
2021-11-12 13:20:08 -05:00