Commit graph

314 commits

Author SHA1 Message Date
Zhi Dou
5f81b7dc96 Merge "aconfig: add default-permission argument for create-cache command" into main 2023-08-14 14:12:27 +00:00
Zhi Dou
24a0b6a20c aconfig: add default-permission argument for create-cache command
Aconfig set flag default permission as READ_WRITE regardless of the
release configuration. This change enables the caller of create-cache to
set the default permission for all flags, if the flag doesn't have a
value.

Test: atest aconfig.test
Bug: 294417368
Change-Id: I1ba19e1ba793cd2ae59923b136b9b50a92315ece
2023-08-10 21:39:59 +00:00
Juan Yescas
d94d6bc9ad core: Rename product variable Device_page_size_agnostic
The product variable Device_page_size_agnostic will be
renamed to DevicePageSizeAgnostic.

Test: source build/envsetup.sh
      lunch aosp_cf_arm64_phone_pgagnostic
      m
Bug: 289419664
Change-Id: I4c0026a559ca3d848ccad285a5516a56d01c0efb
2023-08-09 09:04:43 -07:00
Devin Moore
11db0915df Merge "Add new Release_aidl_use_unfrozen soong variable" into main 2023-07-26 21:42:52 +00:00
Juan Yescas
1083f36818 16k: core: Add flag to make AOSP page size agnostic
The new boolean flag will be PRODUCT_PAGE_SIZE_AGNOSTIC.

When PRODUCT_PAGE_SIZE_AGNOSTIC is true:

- AOSP will use getpagesize() to retrieve the page size.
- The flag `TARGET_MAX_PAGE_SIZE_SUPPORTED` has to be equals to `65536`.
- AOSP will be able to use 4k/16k page size Linux kernels

When PRODUCT_PAGE_SIZE_AGNOSTIC is false:

- AOSP will only support 4k page size kernels.

Test: source build/envsetup.sh
      lunch aosp_raven_64-userdebug
      get_build_var TARGET_PAGE_SIZE_AGNOSTIC
      get_build_var PRODUCT_MAX_PAGE_SIZE_SUPPORTED
      65536

      source build/envsetup.sh
      lunch aosp_raven_64-userdebug
      build/make/core/config.mk:414: error: TARGET_MAX_PAGE_SIZE_SUPPORTED has to be 65536 to support page size agnostic.
      10:32:55 dumpvars failed with: exit status 1

Bug: 289419664
Change-Id: If8fc243a3e2cad77414a53a29805c7b6d349d4dd
2023-07-24 13:48:52 -07:00
Devin Moore
816167b93b Add new Release_aidl_use_unfrozen soong variable
This comes from a trunk stable build flag `RELEASE_AIDL_USE_UNFROZEN`
and is used by the AIDL compiler when creating build rules for the
generated AIDL libraries.

Test: m
Bug: 290265210

Change-Id: I9161a3262d6b2ef8792e8c0b8a759da9a540c560
2023-07-21 00:17:47 +00:00
Treehugger Robot
3ca44b286e Merge "Add a new variable for deprecating VNDK" into main 2023-07-19 04:44:51 +00:00
Kiyoung Kim
f019601670 Add a new variable for deprecating VNDK
Add a new flag variable for deprecating VNDK. This variable should be
passed to Soong, so it can change behavior based on the flag.

Bug: 290157355
Test: build succeeded with KEEP_VNDK=false
Change-Id: I3a9d1041411ad24ff42f76506a8f929e364b868d
2023-07-14 01:18:19 +00:00
Jiakai Zhang
17c6af46df Add a Make variable that overrides configured jar locations.
Bug: 290583827
Test: m nothing
Change-Id: I9a23d6a033d50d2a8c5d9e8dd79d00033efa1f53
2023-07-13 14:24:16 +01:00
Jooyung Han
bd7ef6bc94 Merge "Do not pass TARGET_FLATTEN_APEX to soong" 2023-06-23 04:09:48 +00:00
Joe Onorato
6aa48f8c5f Rename device_config --> aconfig and definitions --> declarations
Bug: 285303012
Test: for x in next trunk trunk_food trunk_staging ; do lunch aosp_panther-$x-eng ; m nothing ; done
Change-Id: I174ce3e609fa9077ea6bc61679ddb83e8efe57c8
2023-06-21 15:18:15 -07:00
Jooyung Han
6d273b9624 Do not pass TARGET_FLATTEN_APEX to soong
Soong no longer supports "flattened" apex. This makes
TARGET_FLATTEN_APEX no-op.

Will remove TARGET_FLATTEN_APEX later.

Bug: 279835185
Test: m && launch_cvd (cuttlefish)
Change-Id: I27c6181f5107fd27552304c5dd25d2c0a21c4bec
2023-06-21 14:22:00 +09:00
Jooyung Han
8cc42f429f Remove PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
We will deprecate flattened apexes. In this change, GSI-specific make
variable (PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES) is removed. The
variable was used to install both image/flattened apexes in the GSI, so
that it works on ro.apex.updatable devices and not-updatable devices.

Now, GSI will have only image APEXes in it.

Bug: 278826656
Test: lunch gsi_arm64-userdebug && m # no flattened apexes
Change-Id: I4702973d4ee75aa693e4e7f4e57577b77059dc09
2023-06-20 14:27:10 +09:00
Evgenii Stepanov
80b53b8c77 Move MTE mode settings to a product variable.
Allow product configuration of memtag target list by
moving the current set into a product variable instead of the various
.bp files.

The default list of memtag targets can be found in
  build/make/target/product/memtag-common.mk

This is NFC as all targets in the list already have "memtag_heap: true"
in the build files.

Bug: 280343521
Test: no functional change
Change-Id: I5954fde05256e00a8e01c114ad522f50ed0cfa9f
2023-06-13 13:11:52 -07:00
Steven Moreland
0b219d399c Merge "Remove PRODUCT_SEPOLICY_SPLIT." 2023-06-05 23:08:24 +00:00
Jiakai Zhang
9fd786cd55 Add an allowlist for modules that have broken optional_uses_libs.
Bug: 282877248
Test: m nothing
Change-Id: I6f0e76a6f147de1e6043b5abc4630342d46bafcc
2023-06-02 23:41:59 +01:00
Jiakai Zhang
f09e76c173 Drop INTERNAL_PLATFORM_MISSING_USES_LIBRARIES.
INTERNAL_PLATFORM_MISSING_USES_LIBRARIES was a workaround for CLC
construction. It's no longer needed because we have deferred the CLC
construction to Ninja phase.

Bug: 282877248
Test: Presubmit build tests.
Change-Id: Ib5d59caf58394f3bb93b4338146cbbbd58bb4f34
2023-06-01 16:44:35 +01:00
Steven Moreland
41792255af Remove PRODUCT_SEPOLICY_SPLIT.
Obsolete.

Bug: 257176017
Test: build&boot
Change-Id: I7ac95f8e55254b7c07ee5e5ba6c18c23a432bfa1
2023-05-31 22:01:16 +00:00
Kiyoung Kim
6a821158b1 Merge "Rename soong.variable with target product" 2023-05-30 07:17:08 +00:00
Vinh Tran
2c5fb95f32 Merge "Support sandboxing genrule" 2023-05-23 21:29:27 +00:00
Liz Kammer
bc4f48c415 Add BUILD_BROKEN_PLUGIN_VALIDATION flag
Use is to specify the list of plugins are are not allowed.

Ignore-AOSP-First: Requires an internal only change to not break when submitted
Test: CI
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:f24be9dba9b53b0c1682929253a3eba9af7a4c31)
Merged-In: Ia2fe83d82ead618e480e99a82b1b825ed08d3eab
Change-Id: Ia2fe83d82ead618e480e99a82b1b825ed08d3eab
2023-05-18 18:20:22 +00:00
Joe Onorato
0d1a98106a Add aconfig rules
Test: treehugger
Change-Id: I456f87894926287a91d42e738016ca8052cd5039
2023-05-15 15:38:49 -07:00
Kiyoung Kim
d1aa1cdf44 Rename soong.variable with target product
Bug: 277029044
Test: build succeeded and checked if out/soong/soong.variable has been
renamed

Change-Id: I035a52f3d8ad80d9e44a55e10fe537556ddecda8
2023-05-14 11:57:16 +00:00
Yu Liu
5d4ffb6de8 Support sandboxing genrule
Bug: 281067655
Test: local build
Change-Id: Idb8806040f7adcb4c74304aaf17ced260472b6b0
2023-05-09 17:24:18 -07:00
Wei Li
996830047f Export some make variables to soong.variables.
Bug: 275472038
Test: CIs
Change-Id: I2e7a07007224364418659453d979e2bee58fe5f9
2023-05-04 22:57:54 -07:00
Treehugger Robot
8844e4f145 Merge "Remove config for 64-bit binder ABI" 2023-05-01 21:32:30 +00:00
Treehugger Robot
6d406f854e Merge "Enable HWASan for multiple modules in one place(Make)" 2023-04-29 00:10:16 +00:00
Juan Yescas
e5c0c174d5 16k: Define PRODUCT_MAX_PAGE_SIZE_SUPPORTED flag
The PRODUCT_MAX_PAGE_SIZE_SUPPORTED will be used to define the
ELF segment alignment of the binaries (executables and shared
libraries). The alignment is set based on these conditions:

- If PRODUCT_MAX_PAGE_SIZE_SUPPORTED is defined, that value will be
used to align the binaries. If not defined, see condition below:
- If it is a low memory device, 4096 will be the alignment. If it is
not low memory device, see conditon below:
- If VSR vendor API level < 34, 4096 will be the alignment, otherwise
it will be 65536.

Test: Built for in Pixel 4a, 6 and verified the alignment with readelf.
Bug: 276963698
Bug: 276801883
Change-Id: I53a8902ab62e6d378aec84c28bc627f0e8a98500
2023-04-28 02:42:00 +00:00
Steven Moreland
52fbc7df01 Remove config for 64-bit binder ABI
Also make it an error to specify the configuration
being removed.

Bug: 232423610
Test: build, boot
Change-Id: I1e4d993c7f4b9628eee6b270e47919aede4408b6
2023-04-26 20:45:15 +00:00
Vinh Tran
424539f6c1 Split PRODUCT_AFDO_PROFILES into two variables
Currently, PRODUCT_AFDO_PROFILES is generally applied to all products and is not semantically treated as a product config varilable.

Splitting this allows us:
1. Explicitly tell that PRODUCT_AFDO_PROFILES takes precedence over product-agnostic profiles in AFDO_PROFILES
2. Add PRODUCT_AFDO_PROFILES to _product_vars_list

Test: Define PRODUCT_AFDO_PROFILES in a product config and make sure it appears first in the soong var AfdoProfiles
Bug: 277215393
Change-Id: I284f6308d456994bb72129cb0d7be7cd091993ae
Merged-In: I284f6308d456994bb72129cb0d7be7cd091993ae
2023-04-20 17:37:53 -04:00
Vinh Tran
9281bc8c8f Optionally include afdo_profiles.mk if available
Previously, the product var is defined in pixel product config only. This breaks SDK finalization for udc (google3/configs/wireless/android/busytown/platform/git_udc/git_udc-release.gcl). In SDK finalization, we need to ensure performance/usage of libraries are consistent across all builds that don't set SKIP_ABI_CHECKS.

This CL optionally includes the afdo_profiles if available so that afdo is on all products by default.

Ignore-AOSP-First: The topic has internal-only CLs
Test: CI
Bug: 276672785
Change-Id: I2cc51412de141c4e6ad69f49cef378121e0b3b87
Merged-In: I2cc51412de141c4e6ad69f49cef378121e0b3b87
2023-04-20 17:33:00 -04:00
Hang Lu
e235ded733 Enable HWASan for multiple modules in one place(Make)
Environment variables HWASAN_INCLUDE_PATHS and
PRODUCT_HWASAN_INCLUDE_PATHS can be used to enable HWASan for multiple
modules, by just adding the module directory to the env variable.

Bug: b/271948407
Test: Set specific module directory to above env variable and check the
assembly codes of output elf files after building, finding hwasan
related symbols inside.

Change-Id: I4493cb627fb564ee317eb95bd24ec020d42ae28c
2023-04-19 22:59:46 +00:00
Vinh Tran
2b2f6685ab Set PRODUCT_AFDO_PROFILES to AfdoProfiles product var
Ignore-AOSP-First: Ignore-AOSP-First: Other CLs in the same topic are internal-only
Test: m nothing
Bug: 267229065
Change-Id: I2d71daa6af97eeb0050e1084b27b03900d2d75ef
Merged-In: I2d71daa6af97eeb0050e1084b27b03900d2d75ef
2023-03-31 17:54:49 -04:00
Dan Albert
249bc4c034 Merge changes from topic "fix-api_levels.json"
* changes:
  Separate active codenames and preview codenames.
  Acknowledge V in AOSP.
2023-03-29 17:57:22 +00:00
Dan Albert
4d24cbd044 Separate active codenames and preview codenames.
Using PLATFORM_VERSION_ALL_CODENAMES (which is a bad name for
historical reasons) for discovering preview API levels doesn't work in
the narrow window where the branch's development is not for the latest
release. Create a second variable for preview codenames and expose it
to soong.

Bug: None
Test: None
Change-Id: I8c271c1d646ea8285553614c6bca944227a0e643
2023-03-28 23:25:45 +00:00
Sam Delmerico
4c3b83fe70 add PRODUCT_SOURCE_ROOT_DIRS product variable
Change-Id: I31590eb133511a5dbdb8d6fe436cf511d1a160a2
2023-03-27 14:40:50 -04:00
Cole Faust
189905be98 Add BUILD_BROKEN_USES_SOONG_PYTHON2_MODULES
See other cl in this topic for more details.

Bug: 203436762
Test: m nothing
Change-Id: I76725afece50a022aec611091ef4dead5ad3449a
2023-03-09 11:55:29 -08:00
Dennis Shen
c320615931 Set soong config variable TrimmedApex
BUG: b/259381334
TEST: adbd banchan build with setting on and off
Change-Id: I67220735f3a6cb35a8a8676b58e433d97223e428
2023-01-24 20:04:03 +00:00
Cole Faust
e16def0987 Remove duplicates from VendorVars maps
Some products access the SOONG_CONFIG variables
directly, instead of using soong_config_set. When
they do that, they could end up with duplicate values
in those variables, causing duplicate keys to be
generated in a json map.

Use $(sort) to dedup the map keys before writing them
out.

Bug: 249685973
Test: Presubmits
Change-Id: If0c16377bdfbd3f836ebec9262bec7cf562f339c
2023-01-06 16:20:59 -08:00
Spandan Das
00114d4418 New product config flag to gate blueprint modules
Example usage:
PRODUCT_INCLUDE_TAGS += use_myspecial_sdk

This also populates the allowlist with go/nogo mainline tags. Usage of
`PRODUCT_INCLUDE_TAGS` outside this allowlist will raise an error
in product config

Test: TH

Change-Id: Ica82a8f65cbfda600d72fc54fb873c1eaa1666a7
2022-12-05 19:47:12 +00:00
Jiakai Zhang
d6c6e3a9f3 Determine whether to enable userfaultfd GC at build time.
This is determined by:
- a product config flag
- the vendor API level

It is then passed to the device as a system property
"ro.dalvik.vm.enable_uffd_gc".

This change is a no-op change. It doesn't enable userfaultfd GC by
default. OVERRIDE_ENABLE_UFFD_GC=default can be passed to the build
system to enable userfaultfd GC for testing purposes.

Bug: 242553398
Test: -
  1. lunch aosp_redfin-userdebug
  2. OVERRIDE_ENABLE_UFFD_GC=default build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
  3. See "false" in the output
Test: -
  1. lunch aosp_oriole-userdebug
  2. OVERRIDE_ENABLE_UFFD_GC=default build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
  3. See "true" in the output
Test: -
  1. lunch aosp_redfin-userdebug
  2. OVERRIDE_ENABLE_UFFD_GC=true build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
  3. See "true" in the output
Test: -
  1. lunch aosp_oriole-userdebug
  2. OVERRIDE_ENABLE_UFFD_GC=false build/soong/soong_ui.bash --dumpvars-mode --vars=ENABLE_UFFD_GC
  3. See "false" in the output
Change-Id: Ifd6e6cddb502315912ff949619a5b526ae0d73ff
2022-11-17 16:33:44 +00:00
Alix Espino
38e07f1baf Revert "Revert "Default BuildBrokenClangCFlags & BuildBrokenCla..."
Revert^2 "deletion of clang_cflags & clang_asflags from Soong"

e9a6865bc7c51028ed348f6d1c6b975ee8b98837

Test: Treehugger
Change-Id: Ibda75c075d0d88f2c11fd10722c9a74481ee965a
2022-09-21 16:45:00 +00:00
Alix Espino
65f28793ab Revert "Default BuildBrokenClangCFlags & BuildBrokenClangAsFlag..."
Revert "deletion of clang_cflags & clang_asflags from Soong"

Revert submission 2154033-delete clang_cflags clang_asflags

Reason for revert: Broke build on git_tm-dev-plus-aosp and downstream branches

Reverted Changes:
I5c499a37e:Default BuildBrokenClangCFlags &  BuildBrokenClang...
Ic1d90b72d:deletion of clang_cflags & clang_asflags from Soon...

Change-Id: I62480972e5cd6cfe01782068b25893222a8edf79
2022-09-12 18:51:23 +00:00
Alix
8b7da27e22 Default BuildBrokenClangCFlags & BuildBrokenClangAsFlags to empty (false)
Set up BUILD_BROKEN flags so partners can bypass errors
from using them

Bug: 226636335
Test: m nothing & treehugger
Change-Id: I5c499a37e206bdf89c5c9f84c6ecfe1cdc9a1803
2022-09-07 15:30:01 +00:00
Alix
7a4d539e75 Default BuildBrokenClangProperty to empty (false)
Clang property is deprecated. Set up a BUILD_BROKEN_CLANG_PROPERTY
flag so partners can bypass errors from using clang.

Change-Id: I7ec19c3d11086046031108ecccba5065c38fa338
Test: m nothing & Treehugger
2022-08-26 20:05:42 +00:00
Inseob Kim
7b4d76700d Add mainline dev certificate dir to config
Bug: 33691272
Test: build
Change-Id: Iea4d96ab9c58a1be6d25aff4c0cf91cfc097470e
2022-08-12 21:35:45 +09:00
Jooyung Han
0140dfa4b3 Add WIFI_ variables into soong config
To migrate libwifi-hal module from make to soong, WIFI_ make variables
are added to soong config variables in `wifi` namespace.

Bug: 239984067
Test: m libwifi-hal
Merged-In: If60f5909619af887be8e0086a8dfef65dc97cce0
Change-Id: If60f5909619af887be8e0086a8dfef65dc97cce0
(cherry picked from commit 4abb3d43b4baf74cf7b17fee380d5b4c77a2bc9d)
2022-08-03 17:46:07 +09:00
Christopher Ferris
25b2a651d5 Add ability to force compile as 64 bit.
When trying to build a single 64 bit and 32 bit image, there are
a few executables that are prefer32. When set, this will force all
of those targets to be compiled as 64 bit.

Test: With this option, drmserver/mediaserver are built as 64 bit.
Test: Without this option, drmserver/mediaserver are built as 32 bit.
Change-Id: I84f6be7fe0fa3a9ea86ecc4dd785aaf1825f9925
2022-07-14 13:31:51 -07:00
Vinh Tran
3fae6fe0db Default BuildBrokenDepfile to empty (false)
Test: The builds should still pass because all depfile is cleanup in
AOSP
Bug: 179452413

Change-Id: Ifb6f5320f72c3beb44ddd6654100645e0a62e659
2022-06-27 12:05:11 -04:00
Jiyong Park
2e057215b9 Export PLATFORM_VERSION_KNOWN_CODENAMES to soong
Bug: 236602028
Test: watch TH
Change-Id: Ieb156dfb363e58ef4949cf5a340b3011f310097f
2022-06-21 10:12:24 +09:00