Commit Graph

8294 Commits

Author SHA1 Message Date
Yu Liu
82a6d1464d Remove 6 install related fields from ModuleBase.
Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: If2c3417781953a1eef2b07a241424157fd73abff
2024-08-27 19:03:35 +00:00
Yu Liu
4b98396c64 Merge "Remove licenseMetadataFile and installFiles from ModuleBase." into main 2024-08-27 15:54:00 +00:00
Pindar Yang
1282d27291 Merge "Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong"" into main 2024-08-27 03:25:23 +00:00
Pindar Yang
1558cc68ec Revert "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong"
Revert submission 3195743-compatibility_matrix

Reason for revert: Build Break, Bug: 361227456

Reverted changes: /q/submissionid:3195743-compatibility_matrix

Change-Id: Ib89cdc64eb816ca0df872473b1e9a9dfdb08ceee
2024-08-27 03:22:41 +00:00
Yu Liu
ec81054548 Remove licenseMetadataFile and installFiles from ModuleBase.
Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: I447ec74b7f9c3b8c686ed41511e2051f40ac88f8
2024-08-27 00:16:22 +00:00
Jihoon Kang
17a362a506 Add the list of currently existing violations
This change adds the list of currently existing inter-container
dependency violations. The list is extracted from the container
enforcement mutator, which is implemented in the child change
https://r.android.com/3155659, but is splitted into a separate change
for the ease in review and resolving merge conflicts.

Test: m nothing
Bug: 338660802
Change-Id: If0e352092dcd4573daa9a5675f679c38bede18f8
2024-08-26 23:22:01 +00:00
Treehugger Robot
803ca1cf0d Merge "Sandbox the OUT_DIR environment variable" into main 2024-08-26 20:49:59 +00:00
Yu Liu
ad64c5f370 Merge "Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap from ModuleBase." into main 2024-08-26 19:00:12 +00:00
Cole Faust
1ead86c1a5 Sandbox the OUT_DIR environment variable
Currently, OUT_DIR is inherited from the parent process, leading to
scripts being able to find the output directory when the enviornment
variable is set to an absolute path. When sandboxing a command,
also rewrite the OUT_DIR environment variable to the sandboxed one,
so that scripts can't find the real out dir.

Bug: 307824623
Test: Presubmits
Change-Id: I325071121a60bddc4105df680fbdfe3d11dc94e2
2024-08-26 11:12:10 -07:00
Yu Liu
bad1eef6d8 Remove installFilesDepSet, packagingSpecsDepSet and licenseInstallMap
from ModuleBase.

The old packagingSpecsDepSet field is kept temporarily to bypass an
auto-merge issue, and will be removed in next change.

Bug: 358425833
Test: CI
Change-Id: I28b4933459c33224f756cc306cabc8088f9be862
2024-08-26 17:45:38 +00:00
Treehugger Robot
bc75594499 Merge "Make the defaults property non-configurable" into main 2024-08-26 00:03:30 +00:00
Cole Faust
52d37c3249 Make the defaults property non-configurable
In order to support changing the global configuration per-module,
we can't make decisions on configuration until the configuration is
decided. The defaults mutator is one of the earliest mutators, and
it would be helpful to run it before deciding the configuration.

Bug: 361816274
Test: Presubmits
Change-Id: Iee9c603d7e2601919d636345dfdedae47448db38
2024-08-23 16:20:58 -07:00
Qing Shen
713c54289c Revert "Revert "Add a coverage suffix to avoid Ninja file regene..."
Revert submission 3235973-revert-3207217-emma-flip-time-saver-BYWASVIMTD

Reason for revert: Rolling forward with a fix

Adding a coverage suffix for product_config.go too:

FAILED: ninja: 'out/soong/soong.sdv_core_cf.extra.variables', needed by 'out/soong/.intermediates/build/soong/product_config/product_config.json', missing and no known rule to make it
03:42:23 ninja failed with: exit status 1

Reverted changes: /q/submissionid:3235973-revert-3207217-emma-flip-time-saver-BYWASVIMTD

Change-Id: I74d0e3fda09b1367f3dbb939d4f47c4d09b3d51f
2024-08-23 21:41:52 +00:00
Treehugger Robot
65c530c17e Merge "Remove suffix based stub matching logic" into main 2024-08-23 03:42:12 +00:00
Jihoon Kang
fa3f0782f7 Remove suffix based stub matching logic
This change prevents non-stub modules with stub suffix from being
determined as the stub module, and instead makes the check more robust
by determining the condition based on the user-hidden
`Stub_contributing_api` property, which is only set for the stub
submodules generated by `java_sdk_library`.

Test: m nothing --no-skip-soong-tests
Bug: 361179822
Change-Id: I28a599c5b4fe1e8460e60580c0535aaf19e39ba3
2024-08-22 22:05:03 +00:00
Yu Liu
75c242497f Merge "Remove outputFiles from ModuleBase." into main 2024-08-22 06:48:09 +00:00
Treehugger Robot
e0e4a24dcc Merge "Add "TARGET_BOARD_PLATFORM" into ProductVariables" into main 2024-08-22 05:43:38 +00:00
Herbert Xue
0fc8abe740 Add "TARGET_BOARD_PLATFORM" into ProductVariables
Bug: 360872208
Bug: 348120216
Test: aosp_cf_x86_64_phone-trunk_staging-eng && m hosttar
Change-Id: I79917b10245b982c466afde0570d9da0395232b3
2024-08-22 00:54:10 +00:00
Kiyoung Kim
17b4117cb8 Merge changes from topic "product_variable_vintf_fragments" into main
* changes:
  Variables uses vintf_fragment_modules
  Append vintf_fragment_modules as required for AndroidMk
2024-08-22 00:41:29 +00:00
Yu Liu
876b7ce263 Remove outputFiles from ModuleBase.
Bug: 358425833
Test: CI
Change-Id: I6c398fbdbc38b99fa62f8670baa44ffd51b5e6d3
2024-08-21 19:11:43 +00:00
Yu Liu
51c2231eab Access output files thru providers in Soong tests.
The outputFiles field on ModuleBase will be removed next.

Bug: 358425833
Test: CI
Change-Id: I6d665ac13134d9278e5908f64c454366bc6bca5e
2024-08-21 00:03:50 +00:00
Yu Liu
ddc2e1ac09 Remove build target related fields from ModuleBase.
Bug: 358425833
Test: CI
Change-Id: I2af6d0d2fd3be70594860a0e6d86179d5850eb07
2024-08-20 21:31:22 +00:00
Yu Liu
460c0fa8b4 Use namespace path instead of id in phonies.
Otherwise the phones' names depend on the sorting order of all the
namespaces, which add unnecessary dependencies.

Bug: 358425833
Test: CI
Change-Id: Ic88a329ff320e508ece8e3b20c7497a28a619276
2024-08-20 19:34:49 +00:00
Yu Liu
ee5b92fd6c Merge "Add phonies as provider instead of updaing a global map." into main 2024-08-20 15:56:33 +00:00
Cole Faust
cda9ce15ff Merge "Add $(build_number_file) support to genrules" into main 2024-08-20 04:57:41 +00:00
Treehugger Robot
d4daa43150 Merge "apex: apex_available with prefix" into main 2024-08-20 02:45:22 +00:00
Jooyung Han
9a419e28f5 apex: apex_available with prefix
We now support prefix form (com.foo.*) in apex_available list.

Bug: 360265761
Test: m --no-skip-soong-tests
Change-Id: I50ab884651dd6321950cfd4563b59ef3ed0f07fd
2024-08-20 10:50:04 +09:00
Cole Faust
78f3c3a3ad Add $(build_number_file) support to genrules
Genrules that set uses_order_only_build_number_file: true will now
have the ability to reference a $(build_number_file) label that
will point to the build number file. It will also caused the build
number file to be added as an order-only dependency, which will make
it show up in the genrule sandbox.

This is needed for converting make code that references the build
number to soong, and for sandboxing the remaining unsandboxed genrules
that reference the build number.

Bug: 341873065
Test: m nothing --no-skip-soong-tests
Change-Id: I9092cbb0eb39c5449a79f0ee40a4202262cef206
2024-08-19 16:06:34 -07:00
Cole Faust
5b1a39a92a Merge "Make the WholeStatic/Static/Shared libs properties configurable" into main 2024-08-19 22:48:16 +00:00
Yu Liu
54513622f7 Add phonies as provider instead of updaing a global map.
Bug: 358425833
Test: Manually compare the generated mk and ninja files.
Change-Id: Ie74b620fc680ca2fc0d7836e88361ab3bdb87c49
2024-08-19 21:45:07 +00:00
Cole Faust
f0006e7137 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-08-19 14:39:19 -07:00
Ronald Braunstein
ea66cdd278 Merge "Search for default_team in Android.bp when other .bp files are included." into main 2024-08-19 19:54:10 +00:00
Colin Cross
67478b347e Merge "Add test for interactions between product variables and arch variant properties" into main 2024-08-19 16:19:34 +00:00
Kiyoung Kim
a0523daaaa Variables uses vintf_fragment_modules
Product variable cannot be resolved when vintf_fragments are translated
into vintf_fragment modules, because product variables are being handled
after the translation phase. This change updates variables to use
vintf_fragment_modules instead of vintf_fragments so it can be handled
without resolving depenency between two mutators.

Bug: 322089980
Test: aosp cf build succeeded
Change-Id: I224ddb05bd86e24ae220af616b5a89accd043dd2
2024-08-19 11:28:14 +09:00
Kiyoung Kim
04b64fc280 Append vintf_fragment_modules as required for AndroidMk
Current vintf_fragment_modules are not exposed to Kati, so modules from
the property is not being installed to the image while Kati collects
files to be installed from their dependencies. This change marks modules
from vintf_fragment_modules as required, so their dependencies can be
exposed to the Kati.

Bug: 322089980
Test: aosp cf build succeeded
Change-Id: I66fc8f9ee8c0b797a0c200b7070b83ec9bb0f616
2024-08-19 11:25:30 +09:00
Treehugger Robot
a5289ac9ef Merge changes Ia0e1b307,I63c7c33e into main
* changes:
  Define unstable container
  Define additional exception functions for container enforcement
2024-08-17 04:07:00 +00:00
Jihoon Kang
0f3b1a7288 Define unstable container
Unstable container marks modules that are static reverse dependencies of
"framework-minus-apex". These modules contain unstable implementation
details of the platform, and should not be accessed by the CTS tests.

Test: m nothing
Bug: 338660802
Change-Id: Ia0e1b3070f0f7b2c1b9c27306323e2428d9722ca
2024-08-16 22:57:57 +00:00
Jihoon Kang
224ea08ee6 Define additional exception functions for container enforcement
These exception functions allow restriction to be loosened for some
inter-container dependencies.

Note that these functions are still no-op. Restriction enforcement will
be done in the child change.

Test: m nothing
Bug: 338660802
Change-Id: I63c7c33e33f271d4c2a84cc6070eb4896e030ab4
2024-08-16 22:57:39 +00:00
Treehugger Robot
75b14ee1a6 Merge "Clean up: remove com.android.gki.*" into main 2024-08-16 22:22:19 +00:00
Yu Liu
fb995a1e3c Merge "Remove more internal fields from ModuleBase." into main 2024-08-16 22:14:01 +00:00
Colin Cross
7da471f3ab Add test for interactions between product variables and arch variant properties
Add a test that verifies that arch variant product variable
properties are correctly squashed into the top level properties.

Bug: 322089980
Flag: EXEMPT test only
Test: TestProductVariablesArch
Change-Id: I62e9b4166761ce6ac0269e2fafc26d603e6b169e
2024-08-16 09:21:18 -07:00
Jooyung Han
40b7917fd0 Clean up: remove com.android.gki.*
It's abandoned.

Bug: n/a
Test: m nothing --no-skip-soong-tests
Change-Id: I220bea87329ee532d494cc4eaa4c6a8c1b0bff07
2024-08-16 16:02:42 +09:00
Kiyoung Kim
dd00f2de3c Merge "Introduce vintf_fragment module type" into main 2024-08-16 00:26:16 +00:00
Yu Liu
d46e5ae670 Remove more internal fields from ModuleBase.
Bug: 358425833
Test: Manual compare the generated ninja and mk files and CI.
Change-Id: I4edd0dc646ac035594f47cd9044cc4eb5f710e64
2024-08-16 00:20:27 +00:00
Ronald Braunstein
4a2f368b46 Search for default_team in Android.bp when other .bp files are included.
Test: m all_teams && gqui from  "flatten(out/soong/ownership/all_teams.pb, teams)" proto build/soong/android/team_proto/team.proto:AllTeams 'select teams.path, count(*) where teams.trendy_team_id == "4768044190400512" and teams.path like "%libcore%"  group by teams.path '

  Now we get the libcore entries for JavaLibrary.bp and NativeCode.bp as
  well.  Before we didn't
        ...
	| external/icu/android_icu4j/libcore_bridge/src/native/Android.bp |        1 |
	| libcore/Android.bp                                              |        3 |
	| libcore/Extras.bp                                               |        1 |
	| libcore/JavaLibrary.bp                                          |       82 |
	| libcore/NativeCode.bp                                           |       10 |
	| libcore/benchmarks/Android.bp                                   |        3 |
	...

Note: blueprint does not let include a file from a subdirectory.

Bug: b/355270459
Change-Id: I19b22e341276c724786ea96e237733eac4f19dbf
2024-08-15 15:07:01 -07:00
William McVicker
d0ea3f6a84 Merge "Fix build_prop module to use partition() instead of PartitionTag()" into main 2024-08-15 20:58:46 +00:00
Cole Faust
47a91c9f4f Merge "Check that the DeapexerInfo was actually set" into main 2024-08-15 18:00:22 +00:00
Yu Liu
e89b6dd497 Merge "Remove installFiles from ModuleBase." into main 2024-08-15 17:23:59 +00:00
Treehugger Robot
4483c0e7c0 Merge "Support BUILD_FRAMEWORK_COMPATIBILITY_MATRIX for soong" into main 2024-08-15 09:07:38 +00:00
Yi-Yo Chiang
3ffc37ce20 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-08-15 07:52:02 +00:00