Commit graph

184 commits

Author SHA1 Message Date
Yifan Hong
cfb917a1c7 Add vendor_dlkm partition.
Test: define vendor_dlkm for CF.
Bug: 156020364

Change-Id: I459059e1c20df7a285a377b8b3bbc8decc60b124
2020-07-13 14:20:56 -07:00
Roland Levillain
cd80a6afea Turn COVERAGE_PATHS and COVERAGE_EXCLUDE_PATHS into obsolete variables.
(cherry picked from commit c276bf4f3cc72e479d21c7bd0b34673d93e76f9a)

Test: m nothing
Bug: 158212027
Change-Id: Ibc0dbfd21465ab6fc5b826a52bf605910af283e7
Merged-In: Ibc0dbfd21465ab6fc5b826a52bf605910af283e7
2020-07-08 12:56:29 +01:00
Colin Cross
5c0acab3e2 Merge "Rename Native_coverage to GcovCoverage in Soong" 2020-06-23 03:06:53 +00:00
Martin Stjernholm
74920e6e43 Propagate TARGET_BUILD_APPS to Soong.
Used to select SDK variants of native libraries when building unbundled
apps only. This allows unbundled modules to access the platform
variants (and typically their versioned APEX stubs).

Test: m (on AOSP master)
Test: TH (including ub-launcher3-master)
Bug: 157549171
Change-Id: I74f0bcebe8b66b81b2c80e9d448f5d24dc9ab991
2020-06-17 04:15:00 +01:00
Colin Cross
74f121d18f Rename Native_coverage to GcovCoverage in Soong
Pass the NATIVE_COVERAGE Make variable to Soong as the more accurate
GcovCoverage.  Also remove NATIVE_LINE_COVERAGE, it doesn't do anything
different from NATIVE_COVERAGE, and NATIVE_COVERAGE is always set when
NATIVE_LINE_COVERAGE is set.

Bug: 159059537
Test: m checkbuild
Change-Id: Ib26a0e29f09b87400fd8bc41d2c06a4a8a397a19
2020-06-16 18:01:52 -07:00
Roland Levillain
17541b9512 Introduce product variables to select Java code coverage paths in Make.
Introduce product variables `JavaCoveragePaths` and
`JavaCoverageExcludePaths` (resp. populated from environment variables
`JAVA_COVERAGE_PATHS` and `JAVA_COVERAGE_EXCLUDE_PATHS`). Use them to
control which Java modules are candidate for instrumentation based on
their source path. By default (when `JavaCoveragePaths` is empty),
have all Java modules be candidate for instrumentation, to preserve
the existing behavior.

Test: export EMMA_INSTRUMENT=true \
        && export EMMA_INSTRUMENT_FRAMEWORK=true \
        && export JAVA_COVERAGE_PATHS=art \
        && m
Bug: 158212027
Bug: 156284897
Change-Id: I5de6eb460709d7d66d81e3432e11f94ff14dd1c9
2020-06-15 11:51:56 +01:00
Roland Levillain
d160a49df3 Merge "Rename native code coverage paths product variables in Make." 2020-06-15 10:12:10 +00:00
Roland Levillain
bad8b386e6 Rename native code coverage paths product variables in Make.
Rename `CoveragePath` and `CoverageExcludePaths` as
`NativeCoveragePath` and `NativeCoverageExcludePaths` (resp.).
Also, populate `NativeCoveragePath` and `NativeCoverageExcludePaths`
from environment variables `NATIVE_COVERAGE_PATHS` and
`NATIVE_COVERAGE_EXCLUDE_PATHS` (resp.).

Test: m nothing
Bug: 158212027
Change-Id: I409dbb04b09744a7bd95a4b69361e858b9f89e23
2020-06-14 19:14:56 +01:00
Colin Cross
c3ad80467e Use inclusive language in build/make
Test: m checkbuild
Change-Id: I54a7e55d3fdd5571ef1ae33ebe443c10d138fd28
2020-06-11 14:37:54 -07:00
Martin Stjernholm
7a430fd4c8 Introduce TARGET_BUILD_UNBUNDLED.
Setting this flag enables unbundled building, i.e. without support for
building the system image and other platform targets. This
functionality was previously enabled by TARGET_BUILD_APPS, and setting
that still implies TARGET_BUILD_UNBUNDLED.

This helps unbundled builds that aren't apps, e.g. ART runtest builds.
Specifically, with the topic of the child CL
https://r.android.com/1324517 TARGET_BUILD_UNBUNDLED does not imply
disabling dexpreopting, unlike TARGET_BUILD_APPS.

TODO: There may still be app-specific conditions that are incorrectly
controlled by TARGET_BUILD_UNBUNDLED, in particular on the Soong side
through config.UnbundledBuild().

Test: Flash & boot
Test: TH, in particular builds green on ub-launcher3-master
Bug: 157549171
Change-Id: Ic09fc879117ee06cab5444edfc280ed2b52d2870
2020-06-11 01:09:07 +01:00
Elliott Hughes
9b824d5ceb Remove TARGET_PREFER_32_BIT.
Bug: https://issuetracker.google.com/138812821
Test: builds
Change-Id: I2ff7793c8b1eb56f6be63375cc7b70aa44254443
2020-06-08 16:36:52 -07:00
Treehugger Robot
592a675e7d Merge "Remove TARGET_PROJECT[_SYSTEM]_INCLUDES" 2020-05-04 23:25:20 +00:00
Dan Willemsen
e6bd1d2060 Remove TARGET_PROJECT[_SYSTEM]_INCLUDES
Everything should be getting device specific kernel headers from the
device_kernel_headers header library these days.

This does change the behavior of system libraries on devices using the
VNDK -- they no longer get device-specific kernel headers by default, as
we generally expect the system image to be device-independent. The few
libraries that may still need this can use:

 LOCAL_HEADER_LIBRARIES += device_kernel_headers

Test: treehugger
Change-Id: I90ccb921d58b8d27dd0118a974202696e0af745f
2020-05-01 17:43:45 -07:00
Evgenii Stepanov
701cbae7e5 [make] Zero and pattern initialization of heap memory.
Bug: 155227507
Test: build with and without MALLOC_PATTERN_FILL_CONTENTS, MALLOC_ZERO_CONTENTS
Change-Id: If6a7345411553c582ed713cfe661ce69e524de0f
2020-04-29 15:32:51 -07:00
Jooyung Han
7fcd3b36ee Remove PLATFORM_VERSION_FUTURE_CODENAMES
It has been wrong to split ALL_VERSIONS into exclusive two sets of
before/after TARGET_PLATFORM_VERSION.

And PLATFORM_VERSION_ALL_CODENAMES supports all *active* list of
non-finalized codenames.

Bug: 152960049
Test: m
Merged-In: I1e87206a7f261e587cf079cb6b7025ca16aa4fe4
Change-Id: I1e87206a7f261e587cf079cb6b7025ca16aa4fe4
(cherry picked from commit abe575d17b)

Exempt-From-Owner-Approval: cp from master
Change-Id: I1e87206a7f261e587cf079cb6b7025ca16aa4fe4
2020-04-14 02:06:19 +00:00
Yi Kong
bcbcd65a99 Add platform-wide sampling PGO option
Test: build
Bug: 79161490
Change-Id: Ibd30fffa0a97ca76155891f3aec8d7891226b9f1
2020-03-24 07:01:59 -07:00
Jeongik Cha
d99e77d6d6 Make RRO packages for system_ext
Until now, packages from system_ext don't create RRO packages, instead
it uses static overlay, but to make system_ext common, it should use
RRO.

Bug: 150820813
Test: m && check if there are RRO packages that use from system_ext apps
Change-Id: Id0ddb66adca07a6bb4dda66fbee49fd476ac5342
2020-03-18 00:55:48 +00:00
Colin Cross
d68a88402f Move build number file to out/soong
Move the build number file to out/soong so Soong can treat it
as an output path, and pass the name of the file to Soong instead
of the command to read it.

Test: m checkbuild
Change-Id: I9e1aecf33d11fe4fde34cd57cc9b1f1ad49b0424
2020-02-25 00:06:46 +00:00
Ivan Lozano
3cd1ebeaee Remove execute-only support.
With kernel support being removed for execute-only memory layouts,
remove support for XOM until there's kernel support again.

This allows us to gain the code-size improvements from
"-z noseparate-code".

Bug: 147300048
Test: Compiled binaries no longer marked XOM by default.

Change-Id: I08a054e903b202f513d3b3381afd606bb87cf257
2020-02-13 14:20:28 -05:00
Ulya Trafimovich
36101543e9 Make PRODUCT_BOOT_JARS and PRODUCT_UPDATABLE_BOOT_JARS disjoint.
This is to unify boot jars with system server jars:
PRODUCT_SYSTEM_SERVER_JARS and PRODUCT_UPDATABLE_SYSTEM_SERVER_JARS
do not overlap.

Test: aosp_walleye-userdebug boots

Exempt-From-Owner-Approval: cherry-pick.
Bug: 146363577
Change-Id: Ief8994cc34cb6f7951051313dd66a1334a3a73b4
Merged-In: Ief8994cc34cb6f7951051313dd66a1334a3a73b4
(cherry picked from commit 19ed3a0db7)
2020-02-13 13:36:11 +00:00
Kyriakos Ispoglou
c3627b55dd Add support for LINE_COVERAGE (2/2)
This is the 2nd part of the CL.

Bug: b/147604881
Test: Code works successfully on Taimen devices
Change-Id: I834c8743f1f66e7515952b804e6da8a99edf8c2e
2020-01-31 14:37:11 -08:00
Treehugger Robot
a4d2d6578e Merge "Rename NativeCoverage to Native_coverage" 2020-01-31 03:12:22 +00:00
Ramy Medhat
a9cc25d785 Add RBE support for Javac, R8, and D8 if respective env vars are set.
Test: aosp_crosshatch build with and without the new variables.
Change-Id: I252ff5dd8e372edf8c86e25348c8a2bfab41d70d
2020-01-28 10:25:25 -05:00
Colin Cross
74daa974bb Rename NativeCoverage to Native_coverage
Rename NativeCoverage to Native_coverage so it can be used as a
product_variable in Soong.

Test: m checkbuild
Change-Id: I86463a5c9b6cf4ba628cbdfb200625dc1e59e559
2020-01-24 14:27:11 -08:00
Yifan Hong
9a190e25d0 Export BOARD_USES_RECOVERY_AS_BOOT to soong.
Test: pass
Bug: 147347110
Change-Id: I4ba4f626f02c42b1700a971326557abd23da8340
2020-01-23 13:21:09 -08:00
Oliver Nguyen
125f7dc84d Merge "Add CLANG_COVERAGE build flag to soong config." 2020-01-22 22:34:35 +00:00
Justin Yun
f19d840d13 Define PRODUCT_PRODUCT_VNDK_VERSION
PRODUCT_PRODUCT_VNDK_VERSION sets the VNDK version for product
partition. It may have "current" to use the PLATFORM_VNDK_VERSION.
If PRODUCT_PRODUCT_VNDK_VERSION is set, the native modules in product
partition are enforced to use VNDK's only from the system partition
as BOARD_VNDK_VERSION did to vendor partition.

Bug: 144534640
Test: build
Change-Id: I7ea148f0f8b7e44be7810adcacb30702d66831f1
2019-12-21 00:49:09 +00:00
Oliver Nguyen
f0fdf80540 Add CLANG_COVERAGE build flag to soong config.
Bug: 143977934
Test: m CLANG_COVERAGE=true
Change-Id: Ief6302a1724a9e8d5bd1a48ded4eb7d15ddf18de
2019-12-11 14:58:53 -08:00
Jooyung Han
9efe534ef1 Add PRODUCT_INSTALL_EXTRA_FLATTENED_APEXES
For GSI targets, this variable is set true, and Soong will install both
"flattened" and "unflattened" APEXes together in /system_ext and /system
respectively.

Bug: 137802149
Test: lunch aosp_arm64-userdebug && m
  resulting apex images under /system/apex
  and flattened apexes under /system/system_ext/apex

Change-Id: Ib72d1b9dbd59727942da39323ee7e60ac6e14882
2019-12-12 02:04:43 +09:00
Jeongik Cha
7452979a9e Enforce hidden apis usage in product(make)
Only if PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE is set,
every app and java library in product cannot use hidden APIs anymore.

Bug: 132780927
Test: m
Test: set PRODUCT_ENFORCE_PRODUCT_PARTITION_INTERFACE, and check whether build
error occurs.
Change-Id: Ib6c260a16b9cbb95be70d8db3082a15e151687f1
2019-11-06 19:41:47 +09:00
Peter Collingbourne
784db1a741 Add support for $(TARGET_EXPERIMENTAL_MTE) in product configs.
We are bringing up support for ARM Memory Tagging Extension in the platform,
but the required patches have not yet landed in the upstream kernel. This
change adds support for a product variable that products may set to true to
declare support for an experimental userspace interface to MTE. Setting the
variable to true causes a product configuration to be enabled which will
activate code in bionic and scudo that uses the interface.

This variable should not be set to true in shipping products because
the userspace interface has not been finalized and is subject to change.
Once the support patches have landed in the kernel, bionic and scudo will
be changed to use the official interface and the variable will be removed.

Bug: 135772972
Change-Id: Ie3d2619bc09c134e0da073c65805e7ec049687e1
2019-11-01 15:33:52 -07:00
Roland Levillain
7672ab85d9 Rename Soong variable FlattenApex as Flatten_apex.
This is so that it can be used as a Soong/Blueprint property.

Test: m
Bug: 139277987
Change-Id: I009817e040994738814c92ee007aec9ef2cfa838
2019-08-13 15:07:44 +01:00
Inseob Kim
316f77ba3c Include headers and props to VNDK snapshot
For all vndk snapshot libraries, header files exported by the libraries
will be included to the snapshot. Android.bp will contain necessary
information to link against/install vndk snapshot libraires:
export_include_dirs, export_system_include_dirs, export_flags, and
relative_install_path.

Bug: 132818174
Test: 1) VNDK_SNAPSHOT_BUILD_ARTIFACTS=true \
           development/vndk/snapshot/build.sh
Test: 2) development/vndk/snasphot/update.py
Test: 3) see contents of Android.bp and include directories
Change-Id: I3ed179b613ca51f7854dc819783a962a56b973eb
2019-08-08 18:46:31 +09:00
Elliott Hughes
0548439172 Remove PRODUCT_IOT.
Test: treehugger
Change-Id: Ic214ebda6c65e7e51e39151b10f4ce965b35c121
2019-07-30 09:01:15 -07:00
Ramy Medhat
f7eb2f829c Merge "Add RBE mk file to support bootstrapping RBE and setting relevant environment variables." 2019-07-23 11:49:10 +00:00
Ramy Medhat
ec8b8dfa3e Add RBE mk file to support bootstrapping RBE and setting relevant
environment variables.

Test: Built aosp_arm-user with and without USE_RBE. With USE_RBE,
used a simple proxy script in place of rewrapper.

Change-Id: Ifb6bfd9f7292346f4750a6a409aa0def4e3c0363
2019-07-17 14:22:00 +00:00
Colin Cross
cea6dcd135 Merge "Don't escape BuildNumberFromFile" 2019-07-17 02:45:02 +00:00
Colin Cross
91b78978fd Don't escape BuildNumberFromFile
Change BuildNumberFromFile to be unescaped.  This will allow passing
ctx.Config().BuildNumberFromFile() to RuleBuilder, which will handle
the necessary escaping.

Test: no change to out/soong/build.ninja
Change-Id: Iab8df0ecf08d7078093c89a994382eab394117a5
2019-07-16 10:21:41 -07:00
dimitry
fb2449f7b7 Add NativeBridgeRelativePath config variables
This will allow us to unhardcode relative paths for native-bridge
binaries in soong.

Test: make PRODUCT-cf_x86_phone-userdebug
Change-Id: I72b33ee610c92d41e1370fcaa1512529c5d7c88c
2019-07-12 16:08:00 +02:00
Justin Yun
6151e3f1ea Rename product_services to system_ext
Bug: 134359158
Test: build and check if system_ext.img is created
Change-Id: I67f2e95dd29eac6a28e07e24ea973d3a134c3bfc
2019-07-09 08:57:19 +00:00
Treehugger Robot
2459515d3a Merge "Move verify_uses_libraries.sh out of dexpreopt" 2019-05-29 18:09:01 +00:00
Felix
c3cdac6662 soong_config: Include BOARD_VENDOR_SEPOLICY_DIRS
BOARD_VENDOR_SEPOLICY_DIRS should be used in favour of
BOARD_SEPOLICY_DIRS.

Signed-off-by: Felix <google@ix5.org>
Change-Id: I7098d05ad6ec4fbddf536582f4820e6ff8d2120e
2019-05-28 14:00:15 +02:00
Colin Cross
56199af6c2 Move verify_uses_libraries.sh out of dexpreopt
dexpreopt usually gets a dex jar instead of the final APK, which
means targetSdkVersion can't be parsed out of it.  Move the
shared library verification to a tool that operates on the final
AndroidManifest.xml instead.  verify_uses_libraries.sh is still
used to verify prebuilts where we don't have an AndroidManifest.xml
and must parse it out of the APK.

Test: m Gallery2
Bug: 132357300
Change-Id: I6ade74b6144c73aee094f5d5ff343067ca0a0e5a
2019-05-26 17:42:17 +00:00
Inseob Kim
10e02dcd43 Generate VNDK snapshot with Soong except configs
This is the first commit to generate VNDK snapshot with Soong: .so
files, some txt files, and notice files are captured with Soong. As
ld.config.txt is currently in Android.mk and will be deprecated soon,
configs files (and zipping all of artifacts) are still handled with
Makefile.

Bug: 131564934
Test: 1) DIST_DIR=out/dist development/vndk/snapshot/build.sh
Test: 2) try installing vndk snapshot with:
         development/vndk/snapshot/update.py

Change-Id: Ia904e8a1b44824d6c9556ada93bf1616620a1363
2019-05-14 06:40:08 +00:00
dimitry
3e63052e2b Enable native_bridge
Bug: http://b/77159578
Test: make
Change-Id: Ia078073ff27e10156d552a7a94b961c020d4e38d
2019-05-03 15:32:15 +02:00
Inseob Kim
cd0e477d8f Build contexts files with Soong
This is to migrate sepolicy Makefiles into Soong. For the first part,
file_contexts, hwservice_contexts, property_contexts, and
service_contexts are migrated. Build-time tests for contexts files are
still in Makefile; they will also be done with Soong after porting the
module sepolicy.

The motivation of migrating is based on generating property_contexts
dynamically: if we were to amend contexts files at build time in the
future, it would be nicer to manage them in Soong. To do that, building
contexts files with Soong can be very helpful.

Bug: 127949646
Bug: 129377144
Test: 1) Build blueline-userdebug, flash, and boot.
Test: 2) Build blueline-userdebug with TARGET_FLATTEN_APEX=true, flash,
and boot.
Test: 3) Build aosp_arm-userdebug.

Change-Id: I486f7065207468697320776f726b732077656c6c
2019-04-23 10:11:14 +09:00
Dan Willemsen
7f25f2aed9 TARGET_FS_CONFIG_GEN is a list, not a single path
Bug: 130787336
Test: m oemaids_header_gen oemaids_headers passwd group
Test: Set TARGET_FS_CONFIG_GEN to a list of paths
Change-Id: I5186b378fea8865f46cfd891420ba576f36e2565
2019-04-18 17:16:50 +00:00
Dan Willemsen
d32e6d1314 Convert oemaids_headers / passwd / group to Soong
Bug: 118089258
Test: m oemaids_header_gen oemaids_headers passwd group
Change-Id: Ie3b92a499b44391e0692da5d9ad067089a62aabb
2019-04-10 20:46:33 -07:00
Colin Cross
e257b26059 Export more config values to Soong
Export more config values to Soong that will be use dto generate
robolectric's build.prop.

Bug: 122331577
Test: m checkbuild
Change-Id: I1e9dd165772a071cf78927b3bf1e29e01290a42e
2019-04-02 22:57:43 -07:00
Anton Hansson
cece1e03af Merge "Read product/device RRO dirs separately from soong" 2019-03-21 11:28:19 +00:00