Commit Graph

194 Commits

Author SHA1 Message Date
Felix Elsner 501ca68fd5 soong_config: Plat->SystemExt*SepolicyDirs
Align with changes in build/soong and system/sepolicy.

Test: build

Signed-off-by: Felix Elsner <google@ix5.org>
Change-Id: I73b773a4fb0bd626a989251d5c61381fcafaa1eb
2020-10-07 15:56:03 +08:00
Jeongik Cha 0d1d98157a Introduce BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES
If BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES has a numeric value,
it replaces "current" or "system_current" with the version which
the flag indicates.

Bug: 163009188
Test: BOARD_CURRENT_API_LEVEL_FOR_VENDOR_MODULES=29 m, and then check if every vendor
java module's sdk_version is 29 if its sdk_version was current.

Change-Id: I8c7cf21563b984b8e9ef398192031b1f66d96494
2020-08-24 23:16:19 +09:00
Dan Willemsen a3f6632de9 Remove obsolete PDK build functionality
This hasn't worked for a couple years, and continues to bitrot. Just
remove it.

Test: treehugger
Change-Id: Iea6caf3c08252a560155e095135c5ddaad712991
Merged-In: Iea6caf3c08252a560155e095135c5ddaad712991
2020-08-11 01:12:01 +00:00
Jeongik Cha 66853bb381 Merge changes from topic "b/160390776"
* changes:
  Unset ENABLE_PREOPT when DISABLE_PREOPT is set
  Introduce TARGET_BUILD_UNBUNDLED_IMAGE
2020-08-10 00:51:56 +00:00
Yifan Hong 3c1041fb22 Add BOARD_KERNEL_MODULE_INTERFACE_VERSIONS.
This is a list of KMI versions used to filter gki_apex modules. Only
gki_apex modules with kmi_version field that are in the list are created.

Test: build GKI APEXes
Bug: 162888350
Change-Id: I0f582f6ea200d52482fd4065c8f4f8b32efc4dee
2020-08-05 15:45:23 -07:00
Jeongik Cha d05b57a362 Introduce TARGET_BUILD_UNBUNDLED_IMAGE
- TARGET_BUILD_UNBUNDLED_IMAGE is similar to TARGET_BUILD_APPS, but
its targets are the unbundled partitions instead of apps.
- Rename TARGET_BUILD_APPS_USE_PREBUILT_SDK to TARGET_BUILD_USE_PREBUILT_SDKS
because it is used even without TARGET_BUILD_APPS.
-Instead of TARGET_BUILD_APPS, use TARGET_BUILD_USE_PREBUILT_SDKS
to build java modules with prebuilt sdks, and propagate to Soong.

Bug: 160390776
Test: TARGET_BUILD_UNBUNDLED_IMAGE=true m vendorimage
Change-Id: Ie096212ccbcca0018baae55e106af693b002c9e5
2020-08-03 15:47:09 +09:00
Yifan Hong 1ba1092e0a Merge "Add BOARD_KERNEL_BINARIES." 2020-07-31 19:13:38 +00:00
Yifan Hong e4aca26aef Add BOARD_KERNEL_BINARIES.
Test: use it
Bug: 161563386
Change-Id: Id07dffe7d8ef5122c7cf337b29fecba128fc7640
2020-07-29 14:51:00 -07:00
Kiyoung Kim 7ae3ce79aa Deprecate VNDK-Lite
Android S would not support upgrade from O-MR1 devices, so VNDK Lite
configuration is no more valid. This change removes all VNDK-Lite
related steps and makr BOARD_VNDK_RUNTIME_DISABLE as deprecated
variable.

Bug: 158719241
Test: m -j passed
Change-Id: Ifb355da936933843862426e7ddfce9c7f69cea61
Merged-In: Ifb355da936933843862426e7ddfce9c7f69cea61
2020-07-20 05:39:29 +00:00
Yifan Hong f496f1b94f Add odm_dlkm partition.
Test: define odm_dlkm in CF.
Bug: 156020364
Change-Id: I5593d09a1cdf13e651a13e951336555a7475865e
2020-07-16 12:34:29 -07:00
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