Commit graph

8317 commits

Author SHA1 Message Date
Inseob Kim
f9b8137457
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-24 19:41:24 +02:00
Yi-Yo Chiang
08cb1af507
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-24 19:41:23 +02:00
Inseob Kim
3448cf213b
Build product/odm build.prop with Soong
Bug: 322090587
Test: compare build.prop before and after, boot
Change-Id: I7a7dc785030a0c17e5c09b7f65c978fe9bbcb7a7
2024-10-24 19:41:23 +02:00
Inseob Kim
2900689117
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-24 19:41:23 +02:00
Inseob Kim
ec12b7dc1e
Revert^6 "Use Soong-built system/build.prop"
d5a12721b5aab92122a0bfb979144affa9a2e62a

Change-Id: I6f4bf3043e73763b047bec3303f1547ec647d12b
2024-10-24 19:41:23 +02:00
Inseob Kim
e63689fec0
Revert^2 "Conditionally pass kernel version to build.prop"
This reverts commit 29fed1efe85cc07bb4311513e4acc1da73dfb298.

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

Change-Id: I207abd188636673250eb9a070be95db0b82f39e7
2024-10-24 19:41:23 +02:00
Inseob Kim
ce0cfaaf3f
Revert^6 "Add TARGET_SYSTEM_PROP to system build.prop"
530c32acbee136ff3475192335cc7594589de096

Change-Id: I9dc817855e3db7b96320a977b24b84d72e762893
2024-10-24 19:41:23 +02:00
Inseob Kim
262fa746b8
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-24 19:41:23 +02:00
Kiyoung Kim
fb75ec2011
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-24 19:41:23 +02:00
Inseob Kim
8cd40a7e3c
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-24 19:41:23 +02:00
Inseob Kim
feb21547f9
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-24 19:41:23 +02:00
Inseob Kim
26e9a73798
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-24 19:41:23 +02:00
Cole Faust
4b2bb5e9ab
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-24 19:41:23 +02:00
Inseob Kim
3cc3ca4d62
Make the vintf_fragments property configurable
This allows using select statements with it.

Bug: 354824866
Test: m
Change-Id: I9080c14b8342868d842670c65386582552b32d46
2024-10-24 19:41:23 +02:00
Inseob Kim
bbf681deaf
Make the defaults property configurable
This allows using select statements with it.

Bug: 354824866
Test: m
Change-Id: I673df0869a68c2e79b19c577d0ae1ff2249388db
2024-10-24 19:41:23 +02:00
Cole Faust
1d86a7f5e8
Add tests for configurable PostProcessors
Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: Iaaff66844ebe0b2fb19148bd07562785b12cd7e9
2024-10-24 19:41:23 +02:00
Cole Faust
77b84c1f56
Add tests for selects with bindings
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I43f10ce21d777e94839c695cb7ca8dcbb968d1c3
2024-10-24 19:41:23 +02:00
Cole Faust
2dc6a269f1
Update selects_test for selects with deferred expressions
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I18257ff586fb31d4e0b012a249726a925832cdac
2024-10-24 19:41:23 +02:00
Cole Faust
4be39f9509
Allow soong config variables to be boolean-typed
So that you can use `true` instead of `"true"` in select expressions.

Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I950bd8e04f8fab5187ea5075514d476227943f33
2024-10-24 19:39:05 +02:00
Cole Faust
5b91c24c11
Make required a configurable property
So that users can use select statements with it.

Fixes: 347605145
Bug: 342006386
Test: m nothing --no-skip-soong-tests
Change-Id: Ica0ca6d1725b000b3748c0293e5a9f9b38ed87f9
2024-10-24 19:38:47 +02:00
Cosmin Tanislav
8b82c0d750
soong: paths: Fix out of tree $OUT
Change-Id: Ia915a7fcb95c76272fff6d350dc69abacb7b9e00
2024-10-24 19:38:44 +02:00
Quallenauge
878adb61bf
Add ability to enable scudo-free 32-bit libc variant.
The default value is set to enable scudo with the
32-bit libc variant.

Change-Id: I9205da12eceadfe6245763a49c7208d30b82ad99
2024-10-24 19:38:41 +02:00
dianlujitao
243b54c46e
Add Init_rc to Product_variables.Eng
Change-Id: If490b64f3631ec0825ffa28964a3e65572a9bcb8
2024-10-24 19:38:10 +02:00
LuK1337
d00a3c6c93
Add exported-to-kati namespaces to root namespace
This lets us use boot jar modules that are hidden behind
soong_namespace.

Change-Id: If0068387efdeca5458b5b97ce6b993b10a268bd2
2024-10-24 19:38:10 +02:00
Jan Altensen
f5c73b4700
soong: allow overriding header files
Includes:

  Author: Jan Altensen <info@stricted.net>
  Date:   Sat Aug 7 19:41:59 2021 +0200

    soong: move header override to compiler.go

     * library.go only covers libraries

    Change-Id: I3374999d6b364dd1bbc2060996964ee7b04493e7

Change-Id: Ia9d2210605c5927b529fbe9485b0e5abd079f487
2024-10-24 19:38:10 +02:00
Sam Mortimer
34e34e8c1d
soong: Add PathForSourceRelaxed
Used by vendor/lineage generated kernel header module.

Partial pick from:
Author: Sam Mortimer <sam@mortimer.me.uk>
Date:   Fri Aug 17 11:25:08 2018 -0700
    soong: Add java sources overlay support
    Change-Id: I94143febb0a8afa6a165364d36a40d5120a4e7bc

Change-Id: I415af71458f2a7be8e256cb3c548994f09c5bebf
2024-10-24 19:38:10 +02:00
Spandan Das
56866c5c6d Hide unflagged mainline prebuilts with missing source.
Partner worksapces contain two versions of mainline prebuilts - BigAndroid
and Go. These two prebuilts export dexpreopt'd system server artifacts
to be installed in system image. Since the install paths are same, we
run into duplicate installation rules issue unless one of them is
hidden.

This hiding was previously done by creating a dependendency between
source aosp apex to BA and Go google prebuilts. However, this
implementaion had the unfortunate side effect on the packaging name of
the Google mainline prebuilts - the name becomes the aosp apex name.

Instead of creating the dependency to aosp apex, this CL hides all
mainline apex_set(s) if it has not been flagged using
RELEASE_APEX_CONTRIBUTIONS_*. Since there are some non mainline apex
prebuilts, apex_name will be used to determine whether the prebuilt is a
mainline module.

Test: m nothing --no-skip-soong-tests
Test: In partner workspaces, downloaded the CLs in b/355682304#comment7
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp apexes are not installed, but mainline prebuilts are
installed

Test: unset RELEASE_APEX_CONTRIBUTIONS_ADSERVICES to build from source
Test: m out/target/product/generic/obj/PACKAGING/system_intermediates/file_list.txt
verified that aosp adservices is installed, and adservices prebuilt is
**not* installed.

Bug: 355682304
(cherry picked from https://android-review.googlesource.com/q/commit:85bd4625edc95c6e030acf4b4289724ff39e1d6e)
Merged-In: Idacb65313553bdea5c0593976694de478034229e
Change-Id: Idacb65313553bdea5c0593976694de478034229e
2024-08-06 22:35:28 +00:00
Roopesh Nataraja
d34337948f Add oryon to arm64 cpu variants
Bug: 350058746
Test: builds
(cherry picked from https://android-review.googlesource.com/q/commit:826912e7d4c743c2700016b40145342e6127a370)
Merged-In: I717e035165a7529629061cbfcb076b168dc031d6
Change-Id: I717e035165a7529629061cbfcb076b168dc031d6
2024-07-12 03:44:11 +00:00
Cole Faust
be0f95b374 Merge "Remove saveToBazelConfigFile" into main am: ba80e4c16b am: 2ce7466a03
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132087

Change-Id: I91a4d8f8017d3a81536619eb436d42427db48918
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 23:35:40 +00:00
Cole Faust
2ce7466a03 Merge "Remove saveToBazelConfigFile" into main am: ba80e4c16b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132087

Change-Id: I4606bb743cab751bd9411871806b92be8fcbbd41
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 23:27:54 +00:00
Cole Faust
ba80e4c16b Merge "Remove saveToBazelConfigFile" into main 2024-06-14 23:23:58 +00:00
Zi Wang
0904c70b44 Merge "Add another way for TestingModule to get its output files" into main am: f222db3d01 am: 507d139799
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132916

Change-Id: Ic8aedc6e5e81c2155031a10d322f281503fbf1ce
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 22:32:15 +00:00
Zi Wang
507d139799 Merge "Add another way for TestingModule to get its output files" into main am: f222db3d01
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132916

Change-Id: I716cc3193bc96da919bfcee3125f5f2812c3a40c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 22:23:25 +00:00
Zi Wang
f222db3d01 Merge "Add another way for TestingModule to get its output files" into main 2024-06-14 22:14:59 +00:00
Cole Faust
ad18649d29 Remove saveToBazelConfigFile
Bug: 315353489
Test: Presubmits
Change-Id: I781f0fd9d0241b9742b0b84f5df4088e7bba16c7
2024-06-14 14:13:54 -07:00
Treehugger Robot
607f9f88c3 Merge "Add test for AppendSimpleValue" into main am: dcde7e260c am: 8117d86db8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132953

Change-Id: I4b4a43e62333160df8848606c7a6cb4f47f1a973
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 18:42:09 +00:00
Treehugger Robot
8117d86db8 Merge "Add test for AppendSimpleValue" into main am: dcde7e260c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3132953

Change-Id: I9a6426f1c4d7494d52c30b80f657674d341036e9
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 18:33:08 +00:00
Treehugger Robot
dcde7e260c Merge "Add test for AppendSimpleValue" into main 2024-06-14 18:28:03 +00:00
mrziwang
e81e77a2b1 Add another way for TestingModule to get its output files
In OutputFiles method, TestingModule is able to get its own output
files by reading its module base property. If the TestingModule
never updates its outputFiles property, it will fall back to use the OutputFileProducer interface.

Only empty string tag case is added in this CL since all the testing modules are getting the output files using empty string tag.

Test: CI
Bug: 339477385
Change-Id: I3009ae45d8d909653e3b6b222bced9ccabbaede7
2024-06-14 11:09:54 -07:00
Treehugger Robot
4a5c2cdbdb Merge "Cleanup ImageInterface.SetImageVariation" into main am: 77858402e4 am: d3ba5a3f6e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3131759

Change-Id: I8d682d5bed835d8a56a9595bf910bafb194d29ee
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 04:35:31 +00:00
Treehugger Robot
d3ba5a3f6e Merge "Cleanup ImageInterface.SetImageVariation" into main am: 77858402e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3131759

Change-Id: I4504623d0978356eb7f3b526d01ffb99abd0da12
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-14 04:29:12 +00:00
Cole Faust
fee6fdea22 Add test for AppendSimpleValue
Bug: 346922064
Test: m nothing --no-skip-soong-tests
Change-Id: I18d82cf5ca20b1c9fea9751fee742577b5173374
2024-06-13 15:35:17 -07:00
Jihoon Kang
7583e835f7 Cleanup ImageInterface.SetImageVariation
This change modifies the interface method of
ImageInterface.SetImageVariation so that the image variation is set
directly at the caller image variation module, instead of passing the
pointer to set the image variation.

Test: m nothing
Change-Id: I8eadb5149365530243e19a8cd37eb49d335fbeef
2024-06-13 21:56:23 +00:00
Jihoon Kang
789a53f28c Merge "Remove exportable modules when generating snapshots targeting older platform" into main am: 0030148fcb am: 871393aa37
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3119791

Change-Id: I983606933284aa221a7d96e40a132d21a5eae26c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-10 21:30:51 +00:00
Jihoon Kang
871393aa37 Merge "Remove exportable modules when generating snapshots targeting older platform" into main am: 0030148fcb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3119791

Change-Id: I12200b4516475e10351eb8d7703370eff96e2c4f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-10 21:00:58 +00:00
Jihoon Kang
0030148fcb Merge "Remove exportable modules when generating snapshots targeting older platform" into main 2024-06-10 20:46:09 +00:00
Jihoon Kang
98aa8fa840 Remove exportable modules when generating snapshots targeting older platform
This change modifies the contents of the generated Android.bp files so
that when generating a snapshot on a older platform, the "exportable"
modules are removed from the bp files, as the "exportable" modules are
first introduced in V and do not exist in older platforms.

Bug: 345162614
Test: ABTD
Change-Id: I2dba51b98deec7805bd796647a66981f237c55a9
2024-06-10 18:12:35 +00:00
Treehugger Robot
0ab1981a60 Merge "Make buildinfo_prop a regular module" into main am: 63de06c142 am: 75f22c3f9c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3118355

Change-Id: Ie5a98b2ceebcb6579e86cd4ddc34b96b8da45ee2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 19:20:57 +00:00
Treehugger Robot
75f22c3f9c Merge "Make buildinfo_prop a regular module" into main am: 63de06c142
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3118355

Change-Id: I75bf5b9b60de08fad3fb298be985b71d5c6578e2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-06-07 18:56:31 +00:00
Treehugger Robot
63de06c142 Merge "Make buildinfo_prop a regular module" into main 2024-06-07 18:36:54 +00:00