Commit graph

267 commits

Author SHA1 Message Date
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
Dan Willemsen
b34c387441 Obsolete BOARD_PLAT_*_SEPOLICY_DIR
These were marked as deprecated in late 2020 [1]. Shortly later, there
was an attempt to obsolete them [2] for products shipping with API level
31 or greater, but that was reverted [3] because of internal users.

1: I58c64839cc513ae082cd3ee3c1e108843ea7439e
2: Ic4d1164be611836f6aa697fbf1cb1f1c73a3cd39
3: I7d3556aa0f06684b43f80f09e4c8194c6c44336c

Since these are causing warnings on every build, and there are no more
internal users, just obsolete them entirely. We don't need to rely on
the product shipping api level, since that does not guarantee
source-level compatibility -- and this is an easy fix even if people
have been ignoring the real warnings.

Bug: 235414673
Test: treehugger
Change-Id: If803a33efc38a970247919bf224c12b8c717f955
2022-06-09 09:36:52 -07:00
Treehugger Robot
55d522096a Merge "Prototype changes for multitree" 2022-04-28 22:20:47 +00:00
Inseob Kim
05fa7f1455 Prototype changes for multitree
This change contains a prototype implementation for multitree.
A new file core/tasks/multitree.mk adds a goal named "update-meta",
which searches for "imported" and "exported" Android.bp modules and
writes a json metadata to track dependencies between components.

Bug: 230448564
Test: m
Change-Id: Ie93e3bf130cacb6b6de41acee3bd302f64f1ab95
2022-04-28 08:03:55 +00:00
Inseob Kim
a59b4dcd33 Add PLATFORM_VERSION_LAST_STABLE to soong config
Bug: 189164487
Test: build
Change-Id: Iec36d22af80225f6da848bae1e02d263ff957df8
2022-04-25 18:20:36 +09:00
Albert Martin
d94a8982fd Add flag to globally override updateable apexes' min_sdk_version
Override all mainline updateable apexes' min_sdk_version to same version to get a single shared native lib version on DCLA.

Test: Run "vendor/google/build/go/mainline_go_modules_arm.sh" and inspect built apexes
Bug: 212609891
Change-Id: I8edf09ca3c91ee52e9c2138c71d9b155b4448f66
Merged-In: I8edf09ca3c91ee52e9c2138c71d9b155b4448f66
2022-04-08 17:45:43 +00:00
Trevor Radcliffe
d94bb431aa Add DeviceProduct product varible to Soong
For some modules, it is necessary to access the product name from
Soong. In particular, the use case we have identified is that the
product name needs to be appended to the artifact name in the dist
copy.

Bug: 224561567
Test: Unit Tests and build relevant target/modules
Change-Id: Iaa0bfee8ef0d1201d8af02f7fc9e6ef081175da7
2022-03-22 19:04:03 +00:00
Pirama Arumuga Nainar
0a04ec1f3b Accept CLANG_COVERAGE_CONTINUOUS_MODE build variable
Bug: http://b/194128476

Coverage instrumentation will support continuous mode when this flag is
set.

Test: CLANG_COVERAGE_CONTINUOUS_MODE m and verify continuous mode works.
Change-Id: I187574c600ba10145dfb2c6c23551d235c33103a
2022-03-04 12:45:33 -08:00
Liz Kammer
4065e5b268 Introduce BUILD_BROKEN_INPUT_DIR_MODULES
Allows allowlisting modules that can temporarily continue to use a
directory as an input while some module types restrict their allowed
inputs.

Test: CI
Change-Id: Ic968a6f6efad45b6c1095dd214813e326d7493c1
2022-02-23 13:59:19 -05:00
Anton Hansson
15ecbb0810 Merge "Pass the base sdk extension version to soong" 2022-02-22 13:46:47 +00:00
Anton Hansson
fd9a21b9bd Pass the base sdk extension version to soong
So that it can be added to the soong config.

Bug: 220086085
Test: m nothing && inspect soong.variables
Change-Id: I949059b9284b16220e2489010279aeae98b4b7fb
2022-02-17 11:16:18 +00:00
Inseob Kim
cc665e54e3 Add sepolicy prebuilt API dirs to soong config
Bug: 33691272
Test: build
Change-Id: Id2ea256507cdbcdcd67751c96c911f49f5fdb3f0
2022-02-14 23:10:08 +09:00
Ramji Jiyani
13a4137929 core & tools: system_dlkm: add dynamic partition
Converts existing static partition support to a
dynamic partition.

Bug: 200082547
Test: TH
Signed-off-by: Ramji Jiyani <ramjiyani@google.com>
Change-Id: Ifd6d0c2a04e947b16f8b241e99cca594a1d315ae
2022-01-30 08:43:08 +00:00
Inseob Kim
934aaaffa6 Add sepolicy compat versions to soong config
Bug: 33691272
Test: build
Change-Id: Idef2efb8bb9ea6ea2b4bd072b4e75296b12294d1
2022-01-07 19:16:34 +09:00
Inseob Kim
bfe25fe702 Add sepolicy prebuilt dirs and variables to config
These are used when we build vendor sepolicy against old plat sepolicy.

Bug: 33691272
Test: build
Change-Id: I847108539b3b9d7d25c0fad9eddc017275a564be
2021-12-21 09:50:22 +09:00
Inseob Kim
d0f600a074 Add BoardPlatVendorPolicy to soong config
Bug: 205924657
Test: build
Change-Id: I89697a82c6d288576ae066f82a067383ccd57e2e
2021-12-08 22:53:02 +09: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
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
Ulya Trafimovich
ddec79ce54 Remove unused variable SKIP_BOOT_JARS_CHECK.
The variable is no longer used after https://r.android.com/1737753.

Bug: 189298093
Test: m
Change-Id: I6bcb6735189429551ebca697441f2a1edb5c4dfa
2021-09-30 14:00:34 +01:00
Inseob Kim
d416dae347 Add more sepolicy variables to soong_config
Bug: 33691272
Test: m selinux_policy on sc-dev
Change-Id: I3fd9994d3b7ec2204b8d1be01381f590535f2278
2021-09-15 03:04:14 +00:00
Rob Seymour
ab5492c72c Merge "Add fake host snapshot support" 2021-09-14 14:47:03 +00:00
Rob Seymour
be609fb144 Add fake host snapshot support
Map HOST_FAKE_SNAPSHOT_ENABLE to HostFakeSnapshotEnabled() method.

Bug: 194799048
Test: m HOST_FAKE_SNAPSHOT_ENABLE=true host-fake-snapshot dist -- check snapshot exists in dist

Change-Id: Idd343c3dec3cc24514a5d587b06c3b1300598b7d
2021-09-13 15:59:05 +00:00
Anton Hansson
2df8730d95 Add new make variables for extension SDK version
- PLATFORM_SDK_EXTENSION_VERSION is the sdk extension version of the
  tree
- PLATFORM_BASE_SDK_EXTENSION_VERSION is the sdk extension version that
  PLATFORM_SDK_VERSION ships with.

Also propagate PLATFORM_SDK_EXTENSION_VERSION to soong to that it can be
used in genrules.

Bug: 195281582
Test: via development/ CL in this topic
Merged-In: Ib078a922e9bd9bc6ae82ab74feaeb743703a64b8
Change-Id: Ib078a922e9bd9bc6ae82ab74feaeb743703a64b8
2021-08-27 17:42:33 +01:00
Colin Cross
178de6308c Propagate USE_HOST_MUSL to Soong
Support enabling musl in Make builds with USE_HOST_MUSL=true.  Only
modules defined in Soong will use musl, but that's almost all host
modules.

Bug: 195988762
Test: m USE_HOST_MUSL=true adb
Change-Id: Ia88f6e20b302d86f2241877b017aebe218d968cf
2021-08-25 15:07:17 -07:00
satayev
8bc189e39f Rename UpdatableBootJars to ApexBootJars.
Note that ART apex boot jars and core-icu4j are exceptions here as they
are not part of ApexBootJars. ART apex boot jars are defined in their
own variable, while core-icu4j is treated as a regular non-updatable
boot jar.

Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I5f5feb7344941d0154f384e3c06279d49b490768
2021-07-21 14:14:44 +01:00
satayev
65e68bb263 Rename PRODUCT_UPDATABLE_BOOT_JARS to PRODUCT_APEX_BOOT_JARS.
Regardless of an "updatable" property of individual, list all apex boot
jars in the same variable. This is less confusing for devs, especially
since they shouldn't care about things like boot images.

Bug: 191127295
Test: atest CtsClasspathsTestCases
Change-Id: I0a559db462d1e1f67003ac54d1e27a89110d802a
Merged-In: I0a559db462d1e1f67003ac54d1e27a89110d802a
2021-07-20 15:46:53 +01:00
Jeongik Cha
b26bf58e12 dexpreopt.config should be created even though unbundled image is built
Bug: 188179858
Test: compare dexpreopt_config.zip files from
 1. TARGET_BUILD_UNBUNDLED_IMAGE=true m dexpreopt_config_zip
 2. m dexpreopt_config_zip
(note that m clean should run between steps)

Change-Id: I92623b59e4fcac397c7fed3d7ab1070fe5281027
2021-07-14 18:52:01 +09:00
Anton Hansson
106e11cfe7 Fix soong_config handling of CompressedApex
add_json_bool treats non-empty variable as "true" by default (which is
conventional in make). Fix treatment of PRODUCT_COMPRESSED_APEX to
support the value false.

Bug: 185537646
Test: OVERRIDE_PRODUCT_COMPRESSED_APEX=false m nothing && \
      grep CompressedApex out/soong/soong.variables
Change-Id: I0562a375be377ab67a1d064e37aff5970c4ac8dd
2021-04-16 10:09:58 +01:00
Hridya Valsaraju
b39ec7084a Add a build flag to turn on debugfs restrictions
Starting with Android R launched devices, debugfs cannot be mounted in
production builds. In order to avoid accidental debugfs dependencies
from creeping in during development with userdebug/eng builds, this
patch introduces a build flag that can be set by vendors to enforce
additional debugfs restrictions for userdebug/eng builds. The same flag
will be used to enable sepolicy neverallow statements to prevent new
permissions added for debugfs access.

Bug: 184381659
Test: make with/without PRODUCT_SET_DEBUGFS_RESTRICTIONS
Change-Id: I9aff974da7ddce9bf1a7ec54153b161527b12062
2021-04-07 16:47:59 -07:00
Yi-Yo Chiang
875442fde4 Remove obsolete var PRODUCT_CHECK_ELF_FILES
After aosp/1184262 is submitted, PRODUCT_CHECK_ELF_FILES is deprecated
and nobody is using this variable anymore.

Bug: 149715904
Test: Presubmit; Should be noop
Change-Id: Iaf4a6ae1fe4062684a9699b7ef999030ff483e16
2021-03-29 18:35:51 +08:00
Treehugger Robot
9ae28a750a Merge "Add filter to some boolean variables" 2021-03-24 23:20:53 +00:00
Inseob Kim
ce0671f057 Merge "Add WithDexpreopt soong variable" 2021-03-24 06:20:03 +00:00
Inseob Kim
3dfb8b8d7a Add filter to some boolean variables
add_json_bool converts non-empty string to true, and empty string to
false. But some of boolean variables are meant to be set either "true"
or "false". In that case "false" may lead to a mismatch. This adds
filter to boolean variables which are directly compared to "true", like

    ifeq ($(VAR),true)

Bug: 183483152
Test: build
Change-Id: I0dc4a05293a3233ae4958335781a19e6445a3799
2021-03-24 14:20:33 +09:00
Inseob Kim
84a8be3c52 Add WithDexpreopt soong variable
Test: m selinux_policy on sc-arc
Change-Id: Ieae24f65d74179d0604040a95f8aff4b027a2949
2021-03-23 23:21:24 +00:00
Inseob Kim
35f63019c9 Fix SepolicySplit soong variable
It should be "filtered" by "true" because all non-empty values become
true when using add_json_bool.

Test: m selinux_policy on sc-arc
Change-Id: I35d5881d83746230793cf8ced76885607e82334a
2021-03-23 20:47:39 +09:00
Inseob Kim
232f6ac676 Add PlatformSepolicyVersion to soong_config
PlatformSepolicyVersion and BoardSepolicyVers haven't assigned correctly
so far. Below is the reason why it hasn't been discovered yet.

DeviceConfig.PlatformSepolicyVersion() was added to support mixed
sepolicy build (setting BOARD_SEPOLICY_VERS and building vendor sepolicy
with old plat policy files). Soong compares PlatformSepolicyVersion()
and BoardSepolicyVers(), and used old vendor sources if both are
different. Back then, the only place where such logic played a role was
selinux contexts. Test codes were running as intended: after setting
BOARD_SEPOLICY_VERS the context files were built against old policies.

But there were two mistakes:

1) PlatformSepolicyVersion() was not added to soong_config.mk, so it was
always empty.
2) BOARD_SEPOLICY_VERS was set to default in system/sepolicy/Android.mk,
which was processed after soong_config. So if BOARD_SEPOLICY_VERS was
not set in BoardConfig.mk, BoardSepolicyVers() was empty, not
PLATFORM_SEPOLICY_VERSION.

And there were no issues as Soong only checked equality.

To fix the issue correctly, this commit adds the variable
PlatformSepolicyVersion, and then handles BoardSepolicyVers correctly by
returning PlatformSepolicyVersion if it's empty.

Test: set BOARD_SEPOLICY_VERS and see vendor_file_contexts changes
Change-Id: I4e306ec1f5225094a39f0c8d94f5e7683d70d60e
2021-03-22 22:34:40 +09:00
Inseob Kim
a3ae471485 Add sepolicy related variables
Bug: 33691272
Test: build
Change-Id: Ifbcd2c49d6ecf6d7e69d6b95bace168eccd17f13
2021-03-17 18:04:56 +09:00
Justin DeMartino
f15053ee39 Allow extending of the list of directories to be scanned for VSDK
Bug: 180925851
Test: m nothing, manually
Change-Id: I499f084f04e45eb719882be97e3a581ff868cc98
2021-03-12 19:38:14 +00:00
Jeongik Cha
c5da20e886 Deprecate PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS
There is no module relying on PRODUCT_ENFORCE_RRO_EXEMPTED_TARGETS

Test: m
Bug: 150820813
Change-Id: I461ab2654513a3b921bec5d46c39d474b6324ca2
2021-02-19 21:49:59 +09:00
Treehugger Robot
32b84909a1 Merge changes from topic "vendor_property_enforce"
* changes:
  Set BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE for goldfish
  Add BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE to BoardConfig
  Add PRODUCT_SHIPPING_API_LEVEL to productVariables
2021-02-17 07:12:30 +00:00
Jose Galmes
7185c6c500 Implement directed recovery snapshot.
Bug: 177451657
Test: m -j nothing
Change-Id: I902afe71e7577c1c41371f1422512170edf6e492
2021-02-09 07:41:40 -08:00
Ioannis Ilkos
8e568c52ab Remove Use_lmkd_stats_log from build
Use_lmkd_stats_log used to control LMKD_LOG_STATS when compiling lmkd.

However, for newer Android releases, we mandate that lmkd informs statsd of process kills (change id I8cb123b9488fbc6e88863c2f0e75f1422bcd282e)
After aosp/1555318 we compile lmkd with statsd by default, so this setting is a noop.

Change-Id: I91bd08198fe2275fb8aca77ae5ea637df360d416
Test: build
Bug: 177985094
2021-02-08 11:17:55 +00:00
Inseob Kim
43f4ef0221 Add BUILD_BROKEN_VENDOR_PROPERTY_NAMESPACE to BoardConfig
Bug: 175526482
Test: m vendor_property_contexts after making violations
Change-Id: I81512fefbe952ecaf31fd4b5d276fd32c6253c7f
2021-02-03 18:17:49 +09:00
Inseob Kim
a0884b90ae Add PRODUCT_SHIPPING_API_LEVEL to productVariables
Bug: 175526482
Test: m selinux_policy
Change-Id: I10195730e47398bdb455d554a1cb7d6b7ac28634
2021-02-03 16:23:42 +09:00
Bill Peckham
ddf8f61ce5 Merge "Enable prebuilt hiddenapi CSV files." 2021-01-20 17:43:48 +00:00
Inseob Kim
890f84fe71 Merge "Implement directed vendor snapshot" 2021-01-20 01:17:23 +00:00
Bill Peckham
e3cf60911a Enable prebuilt hiddenapi CSV files.
By enabling these hiddenapi CSV files to be prebuilt, it
becomes possible to create a split build that supports
the hiddenapi encode dex step, but doesn't contain all
of the java sources needed to generate the CSV files.

Bug: 175048716
Test: m nothing
Test: new TestHiddenAPISingletonWithPrebuiltCsvFile
Test: local build without prebuilt hiddenapi
Test: local build with prebuilt hiddenapi
Change-Id: Ia38c5016d2aeba54aa537a5ce601898d46330730
2021-01-16 22:07:40 +00:00
Evgenii Stepanov
10b4d0ad5d Include/exclude paths for memtag sanitizer.
Bug: b/135772972
Test: none
Change-Id: Ib198c359b92b82573cb66fd6d993aece0e9ff7d9
2021-01-11 21:15:21 -08:00