Commit graph

86134 commits

Author SHA1 Message Date
minaripenguin
50a3cdf9ec gen_build_prop: Always return release-keys
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-02-27 13:30:45 +00:00
Pranav Vashi
a3f7db5533 soong: Always return release-keys
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
2025-02-27 13:29:24 +00:00
LuK1337
8b8cdfec31
soong: Treat vendor/lineage-priv/* as release-keys
Change-Id: I7e7f180dda4402ada8b2124d0c26bb844dc2cb5f
2025-02-19 18:37:15 +01:00
Colin Cross
219a62d1fd Use blueprint/pool
Use blueprint's typesafe sync.Pool.

Test: builds
Change-Id: I3de1c455f229eb23ac3ca3dc0baa3bdd7bc0d5d6
2025-02-12 12:26:34 +01:00
Colin Cross
0cec59e1d9 Optimize getJarJarRuleText
getJarJarRuleText accounted for 10% of all allocations in Soong totalling
10 GB due to repeated string growth.  Use a StringBuilder instead.

Test: builds
Change-Id: I4bce338d161cb2f9c0aba1036ced55d2e8ee6b14
2025-02-12 12:07:44 +01:00
aswin7469
3e8d483be0 check_boot_jars: Add NT packages to whitelist
Change-Id: I8ec056f4a88e086e87b2e32e67e8e1c672f04b2c
2025-01-20 18:23:33 +01:00
Jared Duke
8e5eae41d0
Disable source map id usage in eng builds
Injecting the source map details into stack frames for eng builds
adds unnecessary noise, as the `--debug` configuration implicitly
disables optimization/obfuscation.

Bug: 377957431
Test: lunch eng target + m + ensure no --source-file-template in R8 args
Change-Id: I28235f148d311d3422c5d0f9dda178d5984e6e30
2025-01-02 11:34:54 +01:00
Jared Duke
3dbe7196b1
Allow selective R8 optimization for eng test_suites
Eng builds implicitly run R8 in debug mode. This is typically fine, but
test_suites can be built in eng mode, and some tests exercise behavior
that may require R8 optimizations. For example, annotation tests that
check the effective dex output in the presence of such annotations.

Allow a target to override this default behavior by adding "--release"
to its dxflags property.

Bug: 222468116
Test: atest InternalAnnotationsTests
Change-Id: Ie3328f1b56a6fe7c9f331281e6527e40f17f9271
2025-01-02 11:34:54 +01:00
Michael Bestas
91e0b33f7f
Make soong-shared public
Test: m
Change-Id: I2e25b115c863434ed7f167a4333e30423801682a
2024-12-11 03:31:43 +02:00
Michael Bestas
fc5575a537 Android 15.0.0 Release 6 (AP4A.241205.013)
-----BEGIN PGP SIGNATURE-----
 
 iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZ1IssQAKCRDorT+BmrEO
 eICmAJ4ucooPI46WmQPpM0P59O1mMg6tTQCeN/GI0UvgsQkpgB52QWP9VGXeRg8=
 =mAzQ
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQJLBAABCgA1FiEEHrBYPudH862glXQBzJUERRm+ZmkFAmdYixgXHG1rYmVzdGFz
 QGxpbmVhZ2Vvcy5vcmcACgkQzJUERRm+ZmntQQ/+OQD/4KTpBaQOM+hYmZv2al28
 wZ2EDbuGZcdUIj9o6kgl2x5DJGv7AJ3tZZ5/WKTvAsxVkZ4oISMrR6WkE/kysIaV
 HGiX3JaM8t1bdAbD6HGq7I4KwS2UUTdUJMc9TUSQkT74QwAfhwAwxVM6Yw9CxQUG
 V5nLtYhDj3un9Xb1amiJaV3Mof+Nw/q0d1A3kpc1qH2Ul56f4COnAysa1GPiDrB3
 eHssxIrAhf5+E3Vk5rN+sdoWTVLa9JdOGx4pSQNBnkBwT2HD8FpysVVN4L9DvwwN
 pG6U7pNN5uzPZ1HyQT8D71Y0tDRaX/mT38doPoa0u1shmiBBbMU87vl2woiEAATQ
 0UHI/ZcY9Q8yX1iA08a6raK7VAedxmierfNMTtp2nyMJmoTe818u/WVAYfFYrjYZ
 i5bM0PtAANnQ/6elWC4C57usyLuPcUg4C7cKqPfXerfopEsi8e1v/wHjjyeQhCIK
 xSk11uwD26CgBxkitktn6dySmVhapnqEM53/1bQ8OWcxhlRQjE5019/SpNYysVzD
 Q8ef4Xu2on6NlwfNmicKymvOvIbugnKhl6i4iK9UKMaKmZ/cArpk0/OWu3yHy5OK
 9AZozQHwbF2kwZLHakK9QSxtwgiRBhqLGttu3tsf1+4NDuuCTlj25BwcJgXoF5+7
 Wn7EaVThxf3pkDrYNcE=
 =6ce+
 -----END PGP SIGNATURE-----

Merge tag 'android-15.0.0_r6' into staging/lineage-22.0_merge-android-15.0.0_r6

Android 15.0.0 Release 6 (AP4A.241205.013)

# -----BEGIN PGP SIGNATURE-----
#
# iF0EABECAB0WIQRDQNE1cO+UXoOBCWTorT+BmrEOeAUCZ1IssQAKCRDorT+BmrEO
# eICmAJ4ucooPI46WmQPpM0P59O1mMg6tTQCeN/GI0UvgsQkpgB52QWP9VGXeRg8=
# =mAzQ
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri Dec  6 00:44:01 2024 EET
# gpg:                using DSA key 4340D13570EF945E83810964E8AD3F819AB10E78
# gpg: Good signature from "The Android Open Source Project <initial-contribution@android.com>" [marginal]
# gpg: initial-contribution@android.com: Verified 2457 signatures in the past
#      3 years.  Encrypted 4 messages in the past 2 years.
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 4340 D135 70EF 945E 8381  0964 E8AD 3F81 9AB1 0E78

# By Spandan Das (55) and others
# Via Automerger Merge Worker (1031) and others
* tag 'android-15.0.0_r6': (554 commits)
  Revert^3 "Use -target-feature for MTE"
  Enforce exclusive release config component directories
  Possible fix for stat error during globbing
  Remove `prebuilt_apex_module_creator` mutator
  Revert "pass read new storage parameter to java codegen"
  Temporarily bypass apex availability check for /product apexes with a specific prefix
  Remove the internal extractor module created by apex_set
  Remove the internal selector module created by prebuilt_apex
  pass read new storage parameter to java codegen
  Add an incremental parity test.
  Remove internal deapexer module
  Remove deapex support from java_*_import
  Revert^2 "Remove java_sdk_library "magic""
  Revert^2 "Restrict java_sdk_library in libs of java_import and droidstubs modules"
  Revert^2 "Restrict java_sdk_library in libs"
  Revert "Remove java_sdk_library "magic""
  Revert "Restrict java_sdk_library in libs of java_import and dro..."
  Revert "Restrict java_sdk_library in libs"
  Fixes host_required_modules for test_module_config
  Add some log to the build action caching test.
  ...

 Conflicts:
	android/Android.bp
	android/androidmk.go
	android/config.go
	android/defaults.go
	android/module.go
	android/module_context.go
	android/neverallow.go
	android/product_config.go
	android/sdk.go
	android/variable.go
	apex/apex.go
	cc/binary_sdk_member.go
	cc/cc.go
	cc/compiler.go
	cc/library.go
	cc/library_sdk_member.go
	cc/linker.go
	cc/object.go
	java/java.go
	scripts/gen_build_prop.py
	snapshot/host_fake_snapshot.go
	snapshot/host_snapshot.go

Change-Id: I036e0ef3652f680f194dcf11e5a36844bd527221
2024-12-10 20:40:20 +02:00
Michael Bestas
f90cf26ace Conditionally use Unix epoch time for build incremental
Incremental version is used in various places to invalidate caches.
Setting BUILD_NUMBER directly causes unnecessary rebuilds due to
environment variable changes, so simply set it to Unix epoch unless
BUILD_NUMBER is explicitly set.

Change-Id: Id590df48ae1b73b63039f185644103d66a4bbbb3
2024-12-02 02:34:21 +00:00
Cole Faust
c9e0562405
Make include_dirs and local_include_dirs configurable
Requested by a user.

Fixes: 377540448
Test: m nothing --no-skip-soong-tests
Change-Id: I59e49c68e1d47ee0914677714cedcddf624903e6
2024-11-22 21:13:33 +01:00
Cole Faust
588f62ff6b
Add configurable property support to neverallow
Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: I50b8bf3cc2e3520a12932b0a0e1041e079379590
2024-11-22 21:13:33 +01:00
Luca Stefani
681549f2a0 Add vendor/lineage to kotlin plugins neverallow
We don't want to fork prebuilts/sdk just for that

Change-Id: I5f6ff87e341d2391354b1379291de92318599eeb
2024-11-02 11:55:48 +00:00
Luca Stefani
41029755d9 Add support for kotlin plugins
Use the already existing hooks used by the compose
compiler plugin to support kotlin plugins bundled
alongside the compiler such as kotlin-serialize-compiler

Test: m, sample app with kotlin-serialize-compiler
Change-Id: I4d5fa6cd42acfc90ef437222e9e07f61c259d565
2024-11-02 11:55:48 +00:00
Cole Faust
ad0784406b Add documentation for select statements
Porting the existing google doc to in-tree documentation.

Fixes: 352593899
Test: Presubmit
Change-Id: Ifaa6ec432dd469d983bc004bbee0c3ecfbac4a0f
2024-11-02 12:34:06 +01:00
Cole Faust
9d6c7dc23c Make the WholeStatic/Static/Shared libs properties configurable
So that you can use selects with them.

Bug: 342006386
Bug: 358377461
Test: m nothing --no-skip-soong-tests
Change-Id: I5a8350f670d51b7da411ad5c3cdbf5f2d6cdd63b
2024-10-30 13:41:34 -04:00
Android Build Coastguard Worker
905305efab Merge cherrypicks of ['android-review.googlesource.com/3299976'] into 24Q4-release.
Change-Id: I809601a81b9c232f42bcc4292211212daeb002c2
2024-10-30 00:20:34 +00:00
Evgenii Stepanov
39fe1946c2 Revert^3 "Use -target-feature for MTE"
This reverts commit 0feac37f1f.

Reason for revert: reapplied to early
(cherry picked from https://android-review.googlesource.com/q/commit:159860c848a709cac23ec7d448c6dfa6bfd8781b)
Merged-In: I43bf9e11ad021dbad82f6d82163a97a3856e032d
Change-Id: I43bf9e11ad021dbad82f6d82163a97a3856e032d
2024-10-30 00:19:35 +00:00
basamaryan
a3336a40f6 gen_build_prop: Stop overriding ro.build.display.id for non-user builds
Change-Id: Ifc5b5fb23963a984f971ad0fda8c4cc3aec771ab
2024-10-22 19:06:51 +00:00
Michael Bestas
03a92d7ad5
gen_build_prop: Set ro.lineage.device
Change-Id: I485d74642b869d7ac94ef2fd171cafd759965d41
2024-10-20 17:54:54 +03:00
Cole Faust
0b9811ed0d
Remove zeros from build number
The zeros were kept in place of the timestamp in case people were
parsing it. Let's try to remove the zeros now and see what breaks.

Test: Presubmits
Change-Id: Ic52168f6be05a74323d8e47935de5c6a5cf15516
2024-10-19 18:36:24 +03:00
Michael Bestas
85dcbe3cd9
gen_build_prop: Set ro.minui.default_touch_rotation
Change-Id: I18745292fadb8a8ff37d94e5603256997a3c1036
2024-10-19 18:36:16 +03:00
Michael Bestas
849506b86f
gen_build_prop: Set ro.build.fingerprint
Change-Id: I0e40b6f8154f8bc9a7b8450ecb4af4c44ab3d46d
2024-10-19 18:36:16 +03:00
Luca Stefani
95895800f0
Add support for prop overrides
The format of the overrides is KEY=VALUE
Where KEY is one of the dict keys used in config
https://cs.android.com/android/platform/superproject/main/+/main:build/soong/scripts/gen_build_prop.py
And VALUE is the value you want take over.

An example:
PRODUCT_BUILD_PROP_OVERRIDES += \
    BuildDesc="jfltevzw-user 4.2.2 JDQ39 I545VRUAMDK release-keys" \
    BuildFingerprint=Verizon/jfltevzw/jfltevzw:4.2.2/JDQ39/I545VRUAMDK:user/release-keys \
    DeviceName=jfltevzw \
    DeviceProduct=jfltevzw \
    SystemDevice=jfltevzw \
    SystemName=jfltevzw

Change-Id: Ib44a3bb573d08d492acc092e104cb4f687f3b168
2024-10-19 18:36:15 +03:00
Inseob Kim
97c7d58819
Include TARGET_ODM_PROP to odm/etc/build.prop
It's missing in Soong's build_prop module.

Bug: 322090587
Bug: 361623560
Test: set TARGET_ODM_PROP and see odm/etc/build.prop
Change-Id: I447a64998f6ae0ba80201ab4ab6c0fd0ef22e3e5
2024-10-19 18:36:15 +03:00
Yi-Yo Chiang
140c2b48e9
Fix build_prop module to use partition() instead of PartitionTag()
PartitionTag() returns the partition the module is installed in.
We don't want this because a system_ext_specific module could be
installed in the system partition if system_ext partition doesn't
exist.
Instead we want system_ext specific modules to always refer to
SystemExtPropFiles().

Bug: 359624775
Bug: 322090587
Test: build aosp_arm64 and verify system/system_ext/etc/build.prop
Change-Id: Ie67ec9c5e5a07e781515e0aafb42122f72447cf3
2024-10-19 18:36:15 +03:00
Inseob Kim
4628827898
Build product/odm build.prop with Soong
Bug: 322090587
Test: compare build.prop before and after, boot
Change-Id: I7a7dc785030a0c17e5c09b7f65c978fe9bbcb7a7
2024-10-19 18:36:15 +03:00
Inseob Kim
a8bc86a27d
Add system_ext support to build_prop module
As some partitions have build.prop under etc/, this change adds
relative_install_path property to build_prop module. Also this change
adds system_ext related Soong variables and system_ext support in
gen_build_prop.py.

Bug: 322090587
Test: build and compare system_ext/etc/build.prop
Change-Id: I416662b8bae09383af0cdd3d8444a5c300006b7b
2024-10-19 18:36:15 +03:00
Inseob Kim
52ce101fa5
Revert^6 "Use Soong-built system/build.prop"
d5a12721b5

Change-Id: I6f4bf3043e73763b047bec3303f1547ec647d12b
2024-10-19 18:36:15 +03:00
Inseob Kim
6d4e02d4cf
Revert^6 "Sync gen_build_prop.py to sysprop.mk"
This reverts commit 7b7593968b.

Reason for revert: fixed breakage with aosp/3200730, verified with ABTD

Change-Id: I83a4cb1a39bce1a1da8fabd49c6c895862a6c686
2024-10-19 18:36:15 +03:00
Inseob Kim
769a8eee3c
Revert^2 "Conditionally pass kernel version to build.prop"
This reverts commit 29fed1efe8.

Reason for revert: Fixed breakage with aosp/3200730, verified with ABTD

Change-Id: I207abd188636673250eb9a070be95db0b82f39e7
2024-10-19 18:36:15 +03:00
Inseob Kim
da1f628b76
Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop"
530c32acbe

Change-Id: I9dc817855e3db7b96320a977b24b84d72e762893
2024-10-19 18:36:15 +03:00
Inseob Kim
6d8b7a67da
Revert "Revert "Revert^2 "Set output for build_prop even on Soon..."
Revert submission 3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP

Reason for revert: fixed breakage with aosp/3200730, verified with ABTD

Reverted changes: /q/submissionid:3200273-revert-3196490-revert-3195812-revert-3195644-revert-3195637-revert-3184480-system_build_prop_soong-BZIDUTEOOC-KRUETCBWUR-TUHZPHUVFJ-XYILSUPUOA-PCKYAVELZP

Change-Id: If9e6841bb915a79d9817838a1657017ddee9c1a7
2024-10-19 18:36:14 +03:00
Kiyoung Kim
de425b5571
Add 'use_debug_art' to product_variable
Add 'use_debug_art' property to product_variable so it can be checked
from Android.bp whether ART debug APEX or ART APEX should be used.

Bug: 351698657
Test: AOSP CF eng build succeeded
Test: AOSP CF userdebug build succeeded
Change-Id: I01cd80f0d899c55828ecb05fdafdc9bb05fd8200
2024-10-19 18:36:14 +03:00
Inseob Kim
4f5e937846
Fix build thumbprint in gen_build_prop.py
Bug: 356297315
Test: TH and ABTD
Change-Id: I28bccbbafbf9bcdf45a58361e37435b8d74d7464
2024-10-19 18:36:14 +03:00
Inseob Kim
5c333a9e18
Fix DISPLAY_BUILD_NUMBER
The dot was accidentally removed.

Bug: 353425495
Test: build
Change-Id: Id0c08f3c98d5b2f56e49180baf98bb8847f6bebd
2024-10-19 18:36:14 +03:00
Justin Yun
e5b73764ea
Fix build error for gen_build_prop.py
Provided undefined constants and imports.

Bug: 346214958
Test: Define "PRODUCT_DEFAULT_DEV_CERTIFICATE := \
                 build/make/target/product/security/testkey" and
      m aosp_cf_system_x86_64
Change-Id: Ic65f059fe87a997a9be695ebf13dfde2d2c6f82c
2024-10-19 18:36:14 +03:00
Inseob Kim
66c3cba1f2
Fix a bug that BUILD_VERSION_TAGS is ignored
Bug: 349046347
Test: set BUILD_VERSION_TAGS and build
Change-Id: Ib981d917435d23139ac0c5b0aba5b6893539d200
2024-10-19 18:36:14 +03:00
Inseob Kim
320628f6be
Add build_prop soong module
build_prop is a soong module generating {partition}/build.prop. It's
ported from build/make/core/sysprop.mk and will replace sysprop.mk in
the future. Currently used only by Android.bp cuttlefish system image.

Bug: 322090587
Bug: 346214958
Test: compare system/build.prop and aosp_cf_x86_64_system-build.prop for
      eng / user / userdebug
Change-Id: Iad76139fe86ec4f582218c185aa15baeacaa38dc
2024-10-19 18:36:14 +03:00
Inseob Kim
4798250204
Use product_config from buildinfo_prop module
Many parameters can be migrated to product_config module. This is also a
PoC, which is helpful for future build.prop migration.

Bug: 346214955
Test: compare buildinfo.prop before and after
Change-Id: I751220b3a09583e469ae721c0e49a1909b6428d7
2024-10-19 18:36:14 +03:00
Inseob Kim
8cdaf51430
Add product_config module
product_config module will export productVariables struct (defined in
android/variable.go). Other modules can depend on product_Config module
to read product variables, without needing to update Soong.

Bug: 346214955
Test: build and see output of product_config module
Change-Id: I06e1d2716dc2a8b90984bb46c5fc901cd1ca5020
2024-10-19 18:36:14 +03:00
Cole Faust
f53b6b1c39
Cleanup configurable getter usages
You don't have to call module.ConfigurableEvaluator(ctx) if ctx is
already a ModuleContext, you only need to do that for more restricted
contexts like SingletonContext.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I7612290d43dae7decfae283a341882d9016c98a3
2024-10-19 18:36:14 +03:00
Aleks Todorov
b6f1693251
cc: Enable select syntax for cppflags
Bug: 325444956
Test: m
Test: m [custom build target with select in cppflags]
Change-Id: I7d27096526ce5b37afe447f900613a6fbb639986
2024-10-19 18:36:13 +03:00
Inseob Kim
c5707ae88b
Make vbmeta Partitions property configurable
This allows using select statements.

Bug: 354824866
Test: boot
Change-Id: I6cb41177620f85697eeaa77d3aec79f21674e245
2024-10-19 18:36:13 +03:00
Nelson Li
40449504d8
Enable select syntax support for phony_deps in phony_rule
Previously, `phony_deps` in `phony_rule` was a simple []string type, so
the select syntax was not supported. This change modifies it to a
Configurable[[]string] type to enable select syntax support.

Bug: 354850153
Test: Add select syntax in the Andorid.bp
Change-Id: Ibc5e5ee5d8fb9c19dc45d744a71b625fe94c9d88
2024-10-19 18:36:13 +03:00
Inseob Kim
d42065954c
Make more apex properties configurable
This allows using select statements with these.

* apps
* binaries
* prebuilts

Bug: 354824866
Test: m --no-skip-soong-tests
Change-Id: I8e28937d2fa6514b41bd189f56f9f584a60d2c80
2024-10-19 18:36:13 +03:00
Inseob Kim
f8a6bfa26a
Make genrule's srcs property configurable
This allows using select statements with it.

Bug: 354824866
Test: m
Change-Id: If1d71ac177618ad3eb628cdec57469886ee27c88
2024-10-19 18:36:13 +03:00
Inseob Kim
b65568aef9
Make some apex properties configurable
This allows using select statements with these.

* androidManifest
* canned_fs_config
* systemserverclasspath_fragments

Bug: 354824866
Test: m
Change-Id: I4c2182944ec14d99332f437c39a19ba0dc6b7731
2024-10-19 18:36:13 +03:00
Inseob Kim
0add936ec9
Make the vintf_fragments property configurable
This allows using select statements with it.

Bug: 354824866
Test: m
Change-Id: I9080c14b8342868d842670c65386582552b32d46
2024-10-19 18:36:13 +03:00