Commit graph

28497 commits

Author SHA1 Message Date
Treehugger Robot
1295bc5138 Merge "Add missing apksigner dependency" 2021-12-07 11:43:06 +00:00
Treehugger Robot
0d8d378bd4 Merge "Revert "Revert "Move meta_lic files into per-module intermediates directories""" 2021-12-07 04:33:01 +00:00
Treehugger Robot
e813a4a023 Merge "[cc/sanitize] Re-enable new pass manager for fuzzer targets" 2021-12-06 21:40:10 +00:00
Cole Faust
8fb2d83457 Merge "Pass input variables to product config" 2021-12-05 03:43:24 +00:00
Treehugger Robot
742874e0e6 Merge "Add Soong variable for optimizing system Java" 2021-12-04 01:07:34 +00:00
Colin Cross
52a0c97e5a Revert "Revert "Move meta_lic files into per-module intermediates directories""
This reverts commit e41ad14f58.

Change-Id: I77211030b657b894002a1a1bded773b3c4b0334a
2021-12-03 22:46:20 +00:00
Jiyong Park
160149e42d Merge "Reland: Add NEED_AIDL_NDK_PLATFORM_BACKEND" 2021-12-03 10:56:52 +00:00
Cole Faust
f1f49bb910 Pass input variables to product config
Passing variables via a makefile instead of
rblf_cli / rblf_env allows us to give them correct
types while converting the makefile to starlark,
as opposed to the variables always being strings
when given via rblf_cli / rblf_env.

This also allows us to remove some hand-converted
starlark code.

Bug: 201700692
Test: ./out/soong/rbcrun ./build/make/tests/run.rbc
Change-Id: I58c4f20b29171c14e5ae759beb26a849426f6961
2021-12-02 20:47:31 -08:00
Colin Cross
ccb353501d Merge "Revert "Move meta_lic files into per-module intermediates directories"" 2021-12-03 00:46:31 +00:00
Colin Cross
e41ad14f58 Revert "Move meta_lic files into per-module intermediates directories"
This reverts commit 44858d35ce.

Reason for revert: b/208892388

Change-Id: I058e988a8949ed9aa1fac086a69b37a053681982
2021-12-03 00:44:23 +00:00
Jared Duke
2819a5beed Add Soong variable for optimizing system Java
Introduce a Soong variable to allow selective enabling of Java
optimizations for platform targets. This will be used initially
to control optimizations (and shrinking) for system server + sysui.

Opting in to optimizations can be achieved with either:
  * Env:
export SYSTEM_OPTIMIZE_JAVA=true
  * Make:
$(call add_soong_config_var_value,ANDROID,SYSTEM_OPTIMIZE_JAVA,true)

Note that the actual framework build rule changes to hook into this
variable will land separately.

Bug: 203088572
Test: `SYSTEM_OPTIMIZE_JAVA=true m` (observe env variable change log)
Change-Id: I959985bdff394c2445cb1632116846a8d2f5443d
2021-12-02 15:56:10 -08:00
Colin Cross
dd93bd5b72 Merge "Move meta_lic files into per-module intermediates directories" 2021-12-02 22:54:05 +00:00
Treehugger Robot
5a0cef1c00 Merge "Remove 26.0 and 27.0 compat support" 2021-12-02 06:26:58 +00:00
Pirama Arumuga Nainar
49f052d155 [cc/sanitize] Re-enable new pass manager for fuzzer targets
Bug: http://b/133876586

This was turned off but the upstream change fixing this has been long
part of the Android toolchain.

Test: Output of
  m aidl_parser_fuzzer; readelf aidl_parser_fuzzer | grep -c sancov
hasn't changed.

Change-Id: I1d5f9c94cebad74ee00adc1290bbf425bb5c4cd3
2021-12-01 20:50:38 -08:00
Jiyong Park
c99f65fa6c Reland: Add NEED_AIDL_NDK_PLATFORM_BACKEND
The config variable is used to force the generation of the AIDL
ndk_platform backend which will eventually be removed in favor of the
ndk backend. The switch is needed as an escape hatch for some devices
whose BSP (outsourced and thus hardly modifiable) depends on the
ndk_backend libraries.

Bug: 161456198
Test: m

Merged-In: Iba8633263ae649af783e94b01f5c1b5c6e042948
Change-Id: I8b73a6a1e5169c35daf333316857b3c3b110a0f7
2021-12-02 13:16:13 +09:00
Cole Faust
b3eb2087df Merge "Strip more board config variables" 2021-12-01 23:30:32 +00:00
Treehugger Robot
b5373a9845 Merge "Add 32.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS" 2021-12-01 23:10:38 +00:00
Colin Cross
44858d35ce Move meta_lic files into per-module intermediates directories
Store the meta_lic files in the per-module intermediates directories
to avoid conflating multiple variants for the same module, for example
host and device.

Bug: 207445310
Test: m checkbuild
Change-Id: I2b0ca22c1f7b069f79d2026707be3294c488f6de
2021-12-01 14:38:13 -08:00
Cole Faust
f900cb4c12 Merge "Correctly copy the board configuration input variables" 2021-12-01 22:37:09 +00:00
Colin Cross
3db143c452 Merge "Remove duplicate includes of BUILD_NOTICE_FILE" 2021-12-01 21:08:12 +00:00
Cole Faust
3be5b72ad6 Correctly copy the board configuration input variables
dict(**h[0]) was only copying the top level dictionary
object, but not any other dictionaries/lists inside of
it. This was causing us to not find all the changes to
variables the board configuration was making, and so
some variables were not included in the output.

Bug: 201700692
Test: ./build/bazel/ci/rbc_regression_test.sh mainline_system_x86_64-userdebug
Test: ./out/soong/rbcrun ./build/make/tests/run.rbc
Change-Id: I4467eead7e597f6f49119a8c4832126f39d646e7
2021-12-01 11:06:23 -08:00
Jiakai Zhang
1ecb2f952c Merge "Add a variable to specify standalone system server jars." 2021-12-01 12:29:37 +00:00
Treehugger Robot
9118768352 Merge "Define $(PRODUCT_OUT) before running the board config" 2021-12-01 01:15:53 +00:00
Cole Faust
29bb6132c8 Strip more board config variables
These variables' values show up in the command line
of certain build commands, so they need to be stable
to have stable ninja files.

The starlark board configuration strips these variables,
causing a discrepency between the starlark and make
versions of board configuration.

Bug: 201700692
Test: ./build/bazel/ci/rbc_regression_test.sh beagle_x15-userdebug
Change-Id: Id053435409821a3fe5997c07610ef835e0c83112
2021-11-30 14:00:57 -08:00
Colin Cross
143af9284f Remove duplicate includes of BUILD_NOTICE_FILE
Some module types include BUILD_NOTICE_FILE a second time after
the include from base_rules.mk.  This won't work after a future
change, and doesn't seem to be necessary as none of the files
leave any modified LOCAL* variables in place for notice_files.mk
to read.

Bug: 207445310
Test: m checkbuild
Change-Id: I8c68888d6bf26926f5c2216abe147ccf28ddc2b8
2021-11-30 13:20:01 -08:00
Kelvin Zhang
c06f0627c3 Embed zucchini version info in target_files
external/zucchini/version_info.h contains version info for zucchini
diffing algorithm. OTA tools will use these version info to check for
compatibility and determine if zucchini can be used safely. Owners of
zucchini agreed to keep the format of version_info.h stable so it's
parser friendly.

Bug: 194237829
Test: m dist
Change-Id: If8e37533933b346d3f03adab9263679910ab328c
2021-11-30 12:38:39 -08:00
Colin Cross
6013329bff Merge "Make SOONG_HOST_OUT an alias for HOST_OUT" 2021-11-30 20:31:26 +00:00
Cole Faust
52e5d9c776 Define $(PRODUCT_OUT) before running the board config
Certain board configurations reference $(PRODUCT_OUT)
through deferred expansion, which will no longer work
after conversion to starlark.

Bug: 201700692
Test: build/bazel/ci/rbc_regression_test.sh -b yukawa-userdebug
Change-Id: I02055f5c4a05e540c1752d5964d4db4306292c3b
2021-11-30 11:24:33 -08:00
Jiakai Zhang
44ffb21e53 Add a variable to specify standalone system server jars.
This is the list of jars that system_server loads dynamically using
separate classloaders. We will rely on this variable to decide which
jars to preopt in the build system and on the device for system_server.

The list is supposed to be in sync with the code in SystemServer.java.
There will be a follow-up CL to add a comment in SystemServer.java to
remind developers to keep them in sync.

Bug: 203198541
Test: m nothing
Change-Id: I305a73218ef2d2c61ac3795d21026b2afe7007fd
2021-11-30 11:07:37 +00:00
Inseob Kim
e124e3a02d Add 32.0 to PLATFORM_SEPOLICY_COMPAT_VERSIONS
Bug: 206330997
Test: m selinux_policy
Change-Id: Ibbe71843a0ba5677203eabb27690562d55cb057e
2021-11-30 13:44:52 +09:00
Ulyana Trafimovich
af78df0553 Merge "Sort PRODUCT_APEX_BOOT_JARS automatically." 2021-11-29 11:46:54 +00:00
Inseob Kim
a6568e00e2 Remove 26.0 and 27.0 compat support
Treble doesn't support T system + O vendor, so removing 26.0 (N) and
27.0 (O) prebuilts and compat files.

Bug: 207815515
Test: build
Change-Id: Ie12737cc5ca8725caf834d9bf1bdfe840ac516c0
2021-11-29 01:29:28 +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
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
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
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
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
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
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