Commit Graph

210 Commits

Author SHA1 Message Date
Anton Hansson e47d6e4a8c Merge "Add make support for Aml_abis and Ndk_abis options" 2020-12-16 11:38:49 +00:00
Anton Hansson 5e05b8ef31 Add make support for Aml_abis and Ndk_abis options
Add a new TARGET_ARCH_SUITE which, when set to 'mainline_sdk' or 'ndk',
sets `Aml_abis: true` in soong.variables.

This is required to enable removing the custom soong.variables that
are being maintained for the ndk and mainline sdk builds.

Bug: 174315599
Test: TARGET_ARCH_SUITE=mainline-sdk m nothing; inspect soong.variables
      (ditto for ndk)
Change-Id: Ib651a637457310270840d721cdccf50bede3ee58
2020-12-15 12:46:46 +00:00
Treehugger Robot dec924e081 Merge "Revert^2 "Always turn on compatible property"" 2020-12-15 12:00:10 +00:00
Mohammad Islam 0a246e5e31 Merge "Add a product flag that will enable compressed APEX on device" 2020-12-09 14:34:42 +00:00
Mohammad Samiul Islam c87781a020 Add a product flag that will enable compressed APEX on device
The product flag is only defined in this CL. No device has been
configured to use this flag yet.

The flag is overridable using environment variable. This way, developers
can enable APEX compression on various targets.

Bug: 137802149
Test: build/soong/soong_ui.bash --dumpvar-mode PRODUCT_COMPRESSED_APEX #false
Test: export OVERRIDE_PRODUCT_COMPRESSED_APEX \
  build/soong/soong_ui.bash --dumpvar-mode PRODUCT_COMPRESSED_APEX #true
Change-Id: I10e4909258cee9b4670bc3f10ff3a0ad5013c864
2020-12-03 14:58:47 +00:00
JaeMan Park 38e3f08248 Merge "Add java sdk library enforcement flag" 2020-12-02 04:39:08 +00:00
Jingwen Chen 341928ecc5 Remove SOONG, SOONG_BUILD_NINJA, SOONG_IN_MAKE and SOONG_BOOTSTRAP.
These variables appear to be unused since Nougat, when Soong was
invoked through Make. This is no longer the case, since soong_build is
now invoked through soong_ui.

https://cs.android.com/android/platform/superproject/+/android-7.1.2_r36:build/core/soong.mk

Test: TH presubmit
Change-Id: I1cfe63144d559fa0da0e54474ed1e36fb3fa0555
2020-11-23 02:06:57 -05:00
Inseob Kim 2e88158571 Revert^2 "Always turn on compatible property"
This reverts commit facfb54ee4.

Reason for revert: Fixed broken targets

Change-Id: Ia713b08cf15fd356494984964a1e61eaa9991266
2020-11-19 09:48:49 +00:00
Inseob Kim facfb54ee4 Revert "Always turn on compatible property"
This reverts commit 9994e96c7d.

Reason for revert: broken targets on the internal branch

Change-Id: Ic440fb1ca6ae5774a1d51e8fe1f3724426511841
2020-11-18 11:04:17 +00:00
Inseob Kim 9994e96c7d Always turn on compatible property
It's mandatory for devices launching with Android P or later.
Some makefiles still depend on PRODUCT_COMPATIBLE_PROPERTY, so rather
than aggressively removing all codes, this forces
PRODUCT_COMPATIBLE_PROPERTY to be true.

Bug: 170082975
Test: m
Change-Id: I49dab8d573c21781e6295a8581a5ad2944e165d7
2020-11-17 10:00:40 +00:00
JaeMan Park afdd39fd10 Add java sdk library enforcement flag
Add java sdk library enforcement for inter-partition library
dependency, for ensuring backward-compatible libraries for
inter-partition dependencies.

Test: m nothing
Bug: 168180538
Change-Id: I6bfac54c3499b03003a3bc6c2bb62b165b4ce5f9
2020-11-06 01:34:39 +00:00
Paul Duffin bbd4fae4d7 Move boot jars package check to Soong
Passes the SKIP_BOOT_JARS_CHECK property through to Soong and removes
the boot jars check. Moves the check_boot_jars directory containing the
script and data file into build/soong/scripts.

Test: m check-boot-jars - for failing and passing cases
      verified manually that apart from path differences the same
      files (same check sum) were checked in both old make checks and
      the new Soong ones
Bug: 171479578
Change-Id: I61c128806065befce239bbdd5491567827e1b2f5
2020-10-29 11:07:55 +00:00
Yifan Hong 21f97e27be Export BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT to Soong
Test: pass
Bug: 156098440
Change-Id: I84f26f7f12c53c0cc120c8122e75f68571794ac7
2020-10-21 15:44:03 -07:00
Steven Moreland 1162536936 Merge "Reflect MALLOC_ZERO_CONTENTS default true." 2020-10-13 16:49:16 +00:00
Steven Moreland 38c8824187 Reflect MALLOC_ZERO_CONTENTS default true.
See corresponding build/soong change. This change sets the android
platform to zero all heap allocations by default. To give some
intuition for why this is no so underperformant, zeroing memory is one
way of priming caches.

The main goal of this is to prevent accidental reliance on allocations
being zero, which is UB in C++. In some situations, allocations are
almost always guaranteed to be 0, and so resulting flakes can be
extremely rare.

Bug: 131355925
Test: allocated memory successfully getting zerod
Change-Id: I8c27fbc8c06420a15d022eb810595599d1e56aa0
2020-10-12 18:44:05 +00:00
Felix Elsner d7df770c4a soong_config: Support SYSTEM_EXT* sepolicy vars
The new variable name reflects its actual usage.

Keep compatibility with BOARD_PLAT_* because it has been a
convention for years. Also add warning messages for BOARD_PLAT_*
variables via KATI_deprecated_var.

Test: `make selinux_policy` with
      `SYSTEM_EXT_{PUBLIC,PRIVATE_SEPOLICY_DIRS}` set,
      observe additions in `$(TARGET_COPY_OUT_SYSTEM_EXT)/etc/selinux`

Signed-off-by: Felix Elsner <google@ix5.org>
Change-Id: I58c64839cc513ae082cd3ee3c1e108843ea7439e
2020-10-07 15:56:52 +08:00
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