Commit Graph

15063 Commits

Author SHA1 Message Date
Yi Kong cbcf11cba0 Compiler-rt libraries now use i386 instead of i686
Since Clang-4579689, crt libraries use i386 instead of i686. Update the
hardcoded paths to the new names.

Bug: 72942266
Test: N/A
Change-Id: I24f8f5742ac2fecd374fdaa3be8a11f410d31cbf
2018-02-08 14:08:44 +08:00
Justin Yun 69ae572779 PRODUCT_TREBLE_LINKER_NAMESPACES must be true for BOARD_VNDK_VERSION
If PRODUCT_TREBLE_LINKER_NAMESPACES is not true when
BOARD_VNDK_VERSION is defined, report a build error.
To enable VNDK, linker namespace must be configured.

Bug: 72704254
Test: Try to build with one of them is missing
Change-Id: I804704e2f48fa44c8f998183508741d5cc40e4ce
2018-02-08 05:53:48 +00:00
Jaekyun Seok c227ce7c25 Enable BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED for full-treble products
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED can be true only if early-mount of
partitions is supported. But the early-mount must be supported for full
treble products, and so BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED should be
set by default for full treble products.

Additionally this CL sets ro.vndk.version regardless of
BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED.

Bug: 73078796
Test: tested with walleye
Change-Id: Icfe1b6957b55b0f9261d34d7e92db3dc5073cb58
2018-02-08 11:49:16 +09:00
Treehugger Robot 058d6c2d1e Merge changes from topic "vintf_matrix_sepolicy"
* changes:
  core/config.mk: Add PLATFORM_SEPOLICY_COMPAT_VERSIONS
  Move PLATFORM_SEPOLICY_VERSION from system/sepolicy/Android.mk
2018-02-07 22:32:44 +00:00
Simran Basi a132154c18 build: Default test modules to null-suite
The LOCAL_COMPATIBILITY_SUITE tag is used to package tests and
auto-generate test configs for use in the test infrastructure
and locally by atest.

Rather than update hundreds of makefiles across the tree, this
change adds significant atest support to many unittests.

Bug: 73000943, 72969679, 71510529
Test: `atest NotificationStressTests` works as expected.
Change-Id: I1b0a779b8366aee4b4df98181267f72fcb68916a
2018-02-07 11:57:22 -08:00
Sundong Ahn 7a02001fa9 Change the naming policy of system_$(VER)
The module name of system_$(VER) prebuilt file is system_sdk_v$(VER).
But this is inconsistent with sdk_v$(LOCAL_SDK_VERSION) in prebuilts/sdk.
So, system_sdk_v$(VER) is changed to sdk_vsystem_$(VER) to use the same
naming policy.

Bug: 72031391
Test: build
Change-Id: I379c0f9aa0de7407489eeec2b07ee7727e81d69d
2018-02-07 03:37:24 +00:00
Treehugger Robot 9ffbc10126 Merge "LOCAL_HOST_REQUIRED_MODULES support" 2018-02-07 01:57:18 +00:00
Isaac Chen b943fb63bf Merge "Add ro.vendor.product.cpu.* to vendor/build.prop" 2018-02-07 01:57:12 +00:00
Treehugger Robot c82c0a81ec Merge "Support LOCAL_SDK_VERSION := core_current" 2018-02-06 22:37:16 +00:00
Simran Basi 893098b06c LOCAL_HOST_REQUIRED_MODULES support
Allows target modules to directly request host modules they
require to be built and installed as well.

Bug: 72761631
Test: Added LOCAL_HOST_REQUIRED_MODULES to a target apk test and
      the host module was built.

Change-Id: I5aca11b3ba8b54676f068d337f1c9ba0e0b01997
2018-02-06 14:18:45 -08:00
Treehugger Robot 9f573a420e Merge "Replace $(shell find | sort) with $(sort $(shell find))" 2018-02-06 21:21:08 +00:00
Stephen Hines f733f896d3 Merge "Switch to clang-4579689." 2018-02-06 18:35:41 +00:00
Treehugger Robot 08ba09ed7f Merge "Clear local robolectric testing variables" 2018-02-06 16:55:09 +00:00
Dan Willemsen be0b6cee4f Replace $(shell find | sort) with $(sort $(shell find))
Kati's find emulator doesn't understand "| sort", so use use the make
function instead so that we can emulate the find commands.

 before: *kati*: shell time (regen): 1.316989 / 187
 after:  *kati*: shell time (regen): 1.249748 / 184

The time has a lot of variance, the important change is the reduction in
number of shell commands. Kati has other issues with some of these (it
doesn't support find's implicit -a), which is why it only goes down by
3. I'll be fixing Kati separately to handle those cases.

Test: diff out/build-aosp_taimen.ninja before&after
Change-Id: I5c8c2993f01a8a6af84963e903a8a0c186a61e82
2018-02-05 23:07:58 -08:00
Yifan Hong 9bf93017d4 core/config.mk: Add PLATFORM_SEPOLICY_COMPAT_VERSIONS
This is a list of sepolicy versions that the framework supports.

Test: build framework compatibility matrix
Test: boots

Bug: 67920434
Change-Id: I82365742172b653eadb7b5315398e06cace4e000
2018-02-05 15:55:11 -08:00
Yifan Hong 8f4547cde9 Move PLATFORM_SEPOLICY_VERSION from system/sepolicy/Android.mk
Test: builds
Bug: 67920434
Change-Id: I3b29fd188e755039a1fcf4814c578a2220567bf1
2018-02-05 15:55:11 -08:00
James Lemieux bb426739ce Clear local robolectric testing variables
This prevents them from mistakenly bleeding between test targets.

Bug: 72384841
Test: make Run_TeleService_robotests
Change-Id: Ie2c047be1450420f8e27b8b45e9416e96b477b45
2018-02-05 15:39:18 -08:00
Yifan Hong 87328762e4 Move system manifest / device matrix build rules
Test: build these files
Change-Id: I6467f4b7ce421358c30ad7a4c72a77dcc2ed3f88
2018-02-01 15:36:40 -08:00
Yi Kong 421733f693 Switch to clang-4579689.
Bug: 68397894
Test: http://go/clang-4523590-testing
Change-Id: Id3fbac182869e92ab9b7d27d63d9f28c565c7b08
2018-02-01 10:24:04 -08:00
David Brazdil edd4716ff9 Merge "Revert "Revert "Apply hiddenapi build tool on boot jars""" 2018-02-01 09:25:51 +00:00
Jiyong Park 5ebca30d21 Support LOCAL_SDK_VERSION := core_current
core_current is a pseudo SDK version which is a core Java API subset of
the Android API. It is expected to be mainly used for external Java
projects which are agnostic to Android; such as junit, guava, etc.

A module built with this SDK version can only link to java modules of
the same kind. It can't depend on modules built with LOCAL_SDK_VERSION
:= current or without LOCAL_SDK_VERSION.

Bug: 72206056
Test: m -j
Change-Id: I34a9696393aa6704fd6684a40ea5b05d3fb46b23
2018-02-01 17:14:55 +09:00
Isaac Chen 8d11febd59 Add ro.vendor.product.cpu.* to vendor/build.prop
CPU/ABIs related information is already in system/build.prop. It
should also be included in the vendor image so it can still be
examined outside of a device, build environment, or $OUT directory,
by a standalone utility to check its basic characteristics and if
it's compatible with some specific system image (usually GSI).

Bug: 72079894
Test: Built and verified aosp_x86(_64):
      # On host
      $ grep ro.vendor.product.cpu $OUT/vendor/build.prop
      # On device
      $ getprop | grep ro.vendor.product
      $ su
      # grep ro.vendor.product /vendor/build.prop

Change-Id: Ic9ac8065d5983710840e33a805f982de75d86ce3
2018-01-31 14:27:37 +08:00
David Brazdil b8fa6dd104 Revert "Revert "Apply hiddenapi build tool on boot jars""
This reverts commit 4a2926a44e.

Reason for revert: The original CL caused two issues:
1) Increased app startup because `profman` failed to verify boot
jars and created an empty profile for the boot image. All methods
in the framework therefore ran interpreted/JITed. New flag
"--skip-apk-verification" has been added to `profman` to fix
the issue in CL Iad614e47feada293218c11cff985a8012ca49a0f.
2) Caused a crash in Mockito CTS tests because jvmti did not
remove hiddenapi access flags from boot jars before using them.
This has been fixed with CL Ibc9a96a6b541c06844f276db009ac29514f7a3bb.

Bug: 64382372
Bug: 72550707
Test: make test-art-host
Change-Id: Ie8c58714455662f042f56b2977b01b75c5ec7d2f
2018-01-30 18:25:46 +00:00
Bowgo Tsai 8b5f514038 Renames sepolicy files from nonplat_* to vendor_*
Bug: 64240127
Test: boot an existing device
Change-Id: I6d6ac7d9dee450b2a20649e5f4dbb8976f48061e
2018-01-30 16:15:12 +08:00
Dan Willemsen 157fbf771b Merge "Clean up some kati warnings" 2018-01-30 07:43:27 +00:00
Treehugger Robot d33cac8af1 Merge "Write SOONG_MODULES_MISSING_PGO_PROFILE_FILE to $DIST_DIR" 2018-01-30 06:34:15 +00:00
Dan Willemsen 893bebc44b Clean up some kati warnings
Kati has a `--warn` option that adds some extra Kati-specific warnings
-- like using undefined make functions, undefined user functions, likely
bad variable lookups, etc. Some of these are bugs, others are fine doing
nothing. This fixes up all of them in the core build system.

It also complains about $(eval) usage in a recipe not being recommended.
Those aren't handled as part of this change.

Bug: 72661763
Test: build-aosp_arm.ninja is identical before and after
Change-Id: I8e00af142a7745236d3ad4efc9e91ec3ce71a511
2018-01-29 16:23:37 -08:00
Pirama Arumuga Nainar ae9595674b Write SOONG_MODULES_MISSING_PGO_PROFILE_FILE to $DIST_DIR
Bug: http://b/72642679

Store missing profile files and the modules that refer to them, passed
via SOONG_MODULES_MISSING_PGO_PROFILE_FILE variable, to
$DIST_DIR/pgo_profile_file_missing.txt as part of the 'dist' target.

Test: 'm dist' and verify creation of pgo_profile_file_missing.txt.
Change-Id: I4ac0a1f413cbb99b33ad1903aeebd3ebcf3b9f59
2018-01-29 14:48:08 -08:00
Tobias Thierer e1b94da7c8 Merge "javac 9 -target 1.9: Move bootclasspath jars onto classpath." 2018-01-29 10:51:24 +00:00
David Brazdil 4e6c5218db Merge "Add flag to control hidden API warning toasts" 2018-01-29 10:22:10 +00:00
Dan Willemsen 4133793ce3 Fix multilib test data being installed twice to the same place
Fixes lots of warnings of the form:

build/make/core/base_rules.mk:606: warning: overriding commands for target `out/target/product/generic_arm64/testcases/simpleperf_unit_test/testdata/perf.data'
build/make/core/base_rules.mk:606: warning: ignoring old commands for target `out/target/product/generic_arm64/testcases/simpleperf_unit_test/testdata/perf.data'

Test: lunch aosp_arm64-eng; m device-tests
Change-Id: I32575d25f3aef1d4000fcb63d6ffc025ad21f937
2018-01-26 16:57:57 -08:00
Alex Light 9f1e629503 Merge "Revert "Apply hiddenapi build tool on boot jars"" 2018-01-26 18:40:55 +00:00
Alex Light 4a2926a44e Revert "Apply hiddenapi build tool on boot jars"
This reverts commit b7f00ed2af.

Bug: 72550707
Bug: 64382372
Test: atest CtsInlineMockingTestCases

Reason for revert: Causing invalid dex files to be passed to jvmti
                   agents. This causes CtsInlineMockingTestCases and
                   other tests to fail.

Change-Id: I50129e94791b9e2bef919fe398b4250ae461195b
2018-01-26 18:16:52 +00:00
David Brazdil 41847e1917 Add flag to control hidden API warning toasts
Just like visual warnings about improper use of native libraries,
warnings about the usage of hidden APIs will be displayed in non-
final, non-user builds only.

Bug: 64382372
Test: make
Change-Id: Id0a4200f912ac3303026cb26b6d8974c47332828
2018-01-26 12:19:32 +00:00
David Brazdil 2e36f52738 Move locations of all hidden API lists into the build folder
ART buildbots are broken because they build against a pinned commit of
the framework and thus lack the build rules to generate hidden API lists
We aim to fix this by generating dummy API lists in the build folder.
This patch changes the location of the blacklist and dark greylist from
frameworks/base/config/ to ${TARGET_COMMON_OUT_INTERMEDIATES}/... . On
normal builds, the framework will copy its text files into the build
folder.

Test: make
Bug: 64382372
Change-Id: I9b55d2865599e367d9c4be4f834182f5c084c3bf
2018-01-26 11:35:36 +00:00
Tobias Thierer 0276db1ec7 javac 9 -target 1.9: Move bootclasspath jars onto classpath.
When building with OpenJDK 9's javac with -source 1.9 -target 1.9,
a runtime image (with system modules) is used via the --system
command line flag, instead of --bootclasspath.
The runtime image only contains the default libraries (libcore)
but is missing other libraries that might be on the bootclasspath
for a particular build target.

This CL fixes compilation for this case by adding the missing
jars onto the classpath instead.

This already used to work but was broken by CL [1]. I attempted
to conditionally revert some of that CL's changes to java_common.mk
for the case of language level 1.9, but couldn't get it to work.
Therefore this CL follows a different approach.

[1] http://r.android.com/519552

Bug: 38177569
Test: Treehugger
Test: Ran "EXPERIMENTAL_USE_OPENJDK9=true make checkbuild docs"
      and spot-checked some javac invocations to confirm that the
      system modules libs were not included in the bootclasspath,
      but other libs were.

Change-Id: I48fd11aac9b310bfa58dee0f9cfb3ef33f10bca8
2018-01-26 02:48:48 +00:00
Treehugger Robot 9f1b1f90a1 Merge "Fix comment indicator on endif" 2018-01-26 01:21:26 +00:00
Bryan Eyler 57b5232def Fix comment indicator on endif
It's referring to the wrong if start.

Change-Id: I6f78aee54fb89fb5f69a4e86102d5a8e2cc2bbd1
2018-01-25 14:55:31 -08:00
Treehugger Robot 98fce11494 Merge "Fix INSTALLED_ -> BUILT_ missing refactor piece." 2018-01-25 21:23:28 +00:00
Steven Moreland 915f35166f Fix INSTALLED_ -> BUILT_ missing refactor piece.
Some of the dependencies for target-files-package were
refactored but only partially. Since these are satisfied
by transitive dependencies, the problem wasn't noticed
earlier.

Bug: N/A
Test: target-files-package finds dependencies

Change-Id: Ibdd7587f87735148e55d3b9835478075b6547efc
2018-01-25 10:45:26 -08:00
David Brazdil b7f00ed2af Apply hiddenapi build tool on boot jars
Restrictions on usage of private APIs require encoding new information
into the dex files of the boot class path. ART now contains a new build
tool called `hiddenapi` which takes three lists of class member
signatures (blacklist, light and dark greylist), finds the class members
in their respective dex files and modifies their access flags in place.

This patch invokes the `hiddenapi` tool on all JARs in
PRODUCT_BOOT_JARS. For Java libraries built with Makefiles the tool is
invoked after the dexer directly on DEX files. For Soong-built
libraries, the build system has to unzip the JAR produced by Soong,
apply `hiddenapi` and rezip again. This is due to the fact that the
PRODUCT_BOOT_JARS variable is not available to Soong.

Bug: 64382372
Test: m
Change-Id: I6ce897d204459c8b6f46ed49e0909ff76c08a9ed
2018-01-25 09:22:08 +00:00
Nicolas Geoffray f90b7e1948 Merge "For prebuilts, use the built_module for nostripping dexpreopt." 2018-01-25 08:58:48 +00:00
David Brazdil a5cc50ab4c Merge "Add hidden API list file variables" 2018-01-25 07:55:35 +00:00
Jaekyun Seok 8fe7f9bfa2 Merge "Support /product partition" 2018-01-25 03:53:37 +00:00
Alexey Polyudov ea55e8c86c Fix syntax error in makefile soong namespaces handling
Change-Id: I5254f7877422e23f3c3b69f37f1be849a12e296a
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
2018-01-24 17:01:21 -08:00
Jaekyun Seok b7735d8105 Support /product partition
This CL adds the following build flags to support building product partition
from Android build system.
- BOARD_AVB_PRODUCT_ADD_HASHTREE_FOOTER_ARGS
- BOARD_AVB_PRODUCT_KEY_PATH
- BOARD_AVB_PRODUCT_ALGORITHM
- BOARD_AVB_PRODUCT_ROLLBACK_INDEX_LOCATION
- BOARD_PREBUILT_PRODUCTIMAGE
- BOARD_PRODUCTIMAGE_EXTFS_INODE_COUNT
- BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE
- BOARD_PRODUCTIMAGE_PARTITION_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_BLOCK_SIZE
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR
- BOARD_PRODUCTIMAGE_SQUASHFS_COMPRESSOR_OPT
- BOARD_PRODUCTIMAGE_SQUASHFS_DISABLE_4K_ALIGN
- BOARD_USES_PRODUCTIMAGE
- LOCAL_PRODUCT_MODULE
- PRODUCT_FOOTER_ARGS
- PRODUCT_PRODUCT_BASE_FS_PATH
- PRODUCT_PRODUCT_VERITY_PARTITION
- TARGET_COPY_OUT_PRODUCT
- TARGET_OUT_PRODUCT*

And PRODUCT_PRODUCT_PROPERTIES is added to save product-specific
properties in /product/build.prop.

Bug: 64195575
Test: succeeded building product.img with BOARD_PRODUCTIMAGE_PARTITION_SIZE,
BOARD_PRODUCTIMAGE_FILE_SYSTEM_TYPE and PRODUCT_PRODUCT_VERITY_PARTITION.

Change-Id: I774e6a38003734421591e51bed103802ff84f432
2018-01-25 09:33:58 +09:00
David Brazdil ae6915ead0 Add hidden API list file variables
Add variables for the hidden API blacklist and dark and light greylist
files. These are text files with signatures of boot class path class
member with restricted access for non-platform code.

Bug: 64382372
Test: m
Change-Id: I5639c5269872ac626efc69bd3a374a7a7125d502
2018-01-24 20:48:54 +00:00
Nicolas Geoffray e3e19f0dfa For prebuilts, use the built_module for nostripping dexpreopt.
Earlier, we would use the prebuilt directly, which doesn't go through
build optimizations like uncompressing the dex files.

bug: 63920015
Test: m -j32 && verify priv-apps prebuilt's vdex don't contain
      the dex code.

Change-Id: I1a69d3b6832e3a940616f71a95c13091a4220b4b
2018-01-24 15:20:33 +00:00
Treehugger Robot 082837365d Merge "Add BOARD_EXT4_SHARE_DUP_BLOCKS to share duplicated blocks on ext4" 2018-01-24 04:10:42 +00:00
Treehugger Robot 3fcaecec8a Merge "Don't use old VNDK and SystemSDK versions for new devices" 2018-01-24 02:25:38 +00:00
Jiyong Park 95f9313445 Don't use old VNDK and SystemSDK versions for new devices
We need to prevent vendors from using old VNDK and SystemSDK versions
for newly launched device. Otherwise, deprecating old versions of the
APIs would be really difficult.

Specifically, it is enforced that

PRODUCT_SHIPPING_API_LEVEL <= BOARD_VNDK_VERSION

PRODUCT_SHIPPING_API_LEVEL <= min(BOARD_SYSTEMSDK_VERSIONS)

Bug: 72126206
Test: manually setting BOARD_VNDK_VERSION to 24 in
device/google/wahoo/BoardConfig.mk and choosecom to walleye
Test: m -j shows an error on BOARD_VNDK_VERSION
Test: BOARD_SYSTEMSDK_VERSION="25 26" m -j shows an error on
BOARD_SYSTEMSDK_VERSION

Change-Id: I17646487a9c77a6a5110749e22ba47f0f75920cf
2018-01-24 09:59:09 +09:00
Treehugger Robot ae891fb19e Merge "Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS" 2018-01-23 03:35:19 +00:00
Jin Qian fde9f7906b Add BOARD_EXT4_SHARE_DUP_BLOCKS to share duplicated blocks on ext4
This option applies to system.img and vendor.img.

Bug: 64109868
Change-Id: Ib4c7384049dca08e57441ef71cc81c2fba4462dd
2018-01-22 17:21:11 -08:00
Treehugger Robot 12c68db516 Merge "Don't strip for eng builds." 2018-01-22 19:51:12 +00:00
Nicolas Geoffray ed6ee7b64d Don't strip for eng builds.
bug: 72150787
Test: m
Change-Id: Ifdd403dfecb440e32c4d0c00a7543820b2098359
2018-01-22 15:07:37 +00:00
Nicolas Geoffray ec1fdc8813 Merge "Tighter control of stripping in dex_preopt_odex_install." 2018-01-22 13:37:56 +00:00
Tobias Thierer 4bb18a8a2e Merge "Experimental feature: LOCAL_PATCH_MODULE option in .mk files." 2018-01-22 11:34:18 +00:00
David Brazdil 33bb091971 Merge "Add new API file names" 2018-01-20 10:06:22 +00:00
Treehugger Robot a663b8fb1c Merge "Revert "Overflow sanitization in frameworks/ and system/."" 2018-01-20 03:54:23 +00:00
Ivan Lozano c5ef21febf Revert "Overflow sanitization in frameworks/ and system/."
This reverts commit c2d7db1c7d.

Change-Id: I3bab6a359bcec605a8120bf106bf121090eb63fe
2018-01-20 01:44:11 +00:00
Alex Klyubin a1b5dfe151 Reland: Add boot.art.rel files to system image
This file is used to verify that all differences between /system
boot*.art and /data/dalvik-cache boot*.art only consist of relocation
changes. The goal is to mitigate /data/dalvik-cache boot*.art files
being a persistence vector.

Test: Build and ensure boot.art.rel files are on the image.
Bug: 66697305
Change-Id: I68c445da46b2d3099ee347a04af4fbb84da85b0d
2018-01-19 14:34:32 -08:00
Ivan Lozano ee960154e5 Merge "Overflow sanitization in frameworks/ and system/." 2018-01-19 15:55:38 +00:00
Treehugger Robot d3a6ff9bdb Merge "Revert "Add boot.art.rel files to system image"" 2018-01-19 14:35:01 +00:00
Ian Pedowitz 74076b7556 Revert "Add boot.art.rel files to system image"
This reverts commit d616e0e820.

Reason for revert: b/72207339 - user builds are failing with this change

Bug: 72207339
Bug: 66697305
Change-Id: Ia309d04d837851ae11518f05aca468ecca895e6f
Test: Before the revert, taimen-user does not build.  After the revert taimen-user builds
2018-01-19 12:43:38 +00:00
Jiyong Park 641b6cc6b0 Add PLATFORM_SYSTEMSDK_VERSIONS and BOARD_SYSTEMSDK_VERSIONS
PLATFORM_SYSTEMSDK_VERSIONS is the list of System SDK versions that the
platform is supporting. Contrary to the public SDK where platform
essentially supports all previous SDK versions, platform support only a
few recent System SDK versions, since some of old System APIs are
gradually deprecated, removed from the following SDKs and then finally
deleted from the platform. This will be part of the framework manifest.

The list can be specified by setting PLATFORM_SYSTEMSDK_MIN_VERSION. If
it is set to an old version number, then System SDKs from the version
to the current version (PLATFORM_SDK_VERSION) are considered to be
supported by the platform. If PLATFORM_SYSTEMSDK_MIN_VERSION is not set,
only the latest System SDK version is supported.

Next, BOARD_SYSTEMSDK_VERSIONS is the list of System SDK versions that
the device is using. This is put to the device compatibility matrix
device is using. The device and the platform is considered as compatible
only BOARD_SYSTEMSDK_VERSIONS in the device compatibility matrix are
in the PLATFORM_SYSTEMSDK_VERSIONS in the framework manifest.

When BOARD_SYSTEMSDK_VERSIONS is set, a Java app or library in vendor or
odm partitions which didn't specify LOCAL_SDK_VERSION  is forced to use
System SDK. Also, the build system does the additional integrity check
to ensure that LOCAL_SDK_VERSION is within BOARD_SYSTEMSDK_VERSIONS or
PLATFORM_SYSTEMSDK_VERSIONS (if BOARD_SYSTEMSDK_VERSIONS isn't set).

Bug: 69088799
Test: m -j
Test: BOARD_SYSTEMSDK_VERSIONS=P m -j
Change-Id: If4d59f6030e4cc402e015701d0caf94aeec37263
2018-01-19 15:42:05 +09:00
Treehugger Robot eb38b51733 Merge "Add boot.art.rel files to system image" 2018-01-19 05:14:36 +00:00
Nicolas Geoffray 3972a47e9f Tighter control of stripping in dex_preopt_odex_install.
- Move logic to uncompress dexs in an APK in dex_preopt_odex_install.mk
  and definitions.mk.
- Explicitly mark nostripping cases where dexpreopt will not embed the dex
  file in the APK.

bug: 63920015
Test: m
Test: verify priv-apps dexs are uncompressed and unstripped
Test: Verify a non priv-app APK with uncompressed dex doesn't get stripped.

Change-Id: I624a03e3d965cebc0cae43fd6f7a6260178e6b8a
2018-01-18 22:42:46 +00:00
Jaekyun Seok 0538ff796f Enforce PRODUCT_COMPATIBLE_PROPERTY for products shipping with Android P
PRODUCT_COMPATIBLE_PROPERTY will be set as true for products shipping
with Android P, and ro.actionable_compatible_property.enabled will be set
as a system default property accordingly.
But if PRODUCT_ACTIONABLE_COMPATIBLE_PROPERTY_DISABLE is set,
ro.actionable_compatible_property.enabled will be false.

Bug: 38146102
Test: tested on walleye with PRODUCT_COMPATIBLE_PROPERTY_OVERRIDE=true
Merged-In: Ifc1279a360b140c4d94edd32db7de3c6c7317297
Change-Id: Ifc1279a360b140c4d94edd32db7de3c6c7317297
(cherry picked from commit 2528cd26c0)
2018-01-18 21:11:53 +09:00
Alex Klyubin d616e0e820 Add boot.art.rel files to system image
This file is used to verify that all differences between /system
boot*.art and /data/dalvik-cache boot*.art only consist of relocation
changes. The goal is to mitigate /data/dalvik-cache boot*.art files
being a persistence vector.

Test: Build and ensure boot.art.rel files are on the image.
Bug: 66697305
Change-Id: I41486dd541e429f2f2b4c4a521009ee5e81e50b9
2018-01-17 15:20:06 -08:00
Mathieu Chartier 8fd29b3653 Don't default my_use_profile_for_boot_image to true for PDK builds
This causes an unsatisfiable dependency on frameworks/base.

Bug: 67663308
Test: make

(cherry-picked from commit 83bae866e6)

Change-Id: Iba0c3893b49386591f84eb893abf0b577b9716a0
Merged-In: I06e45e8ca66ab6547bf1df25119dda80d44e50f6
2018-01-16 20:02:27 -08:00
Mathieu Chartier ce94494b93 Enable profile based boot image by default
Use profile based boot image instead of the compiled classes version.

Results using profile from ag/2815407
Storage savings:
Boot art+vdex+oat size: 78305556->61539326 (-17MB)

New system server profile has more methods (1.5MB -> 4MB oat) since it
has more coverage from use cases.

Ram savings (sample averages for CUJ test):
Average PSS of 3 runs (~100 samples total):
.Boot_vdex: 9359K -> 9902K
.oat_mmap: 21857K -> 13372K
.Heap: 29779K -> 29483K
.Boot_art: 15736K -> 18096K
.LinearAlloc: 9112K -> 8965K
Total PSS: 85846K -> 79819K (-6MB)

Average pages read from flash (512MB device) for CUJ tests (3 samples):
1508MB -> 1183MB

Bug: 37966211
Test: make and flash

(cherry-picked from commit bf9023ae7a)

Change-Id: Icf3039ef871b68d806ef7b7c8ad2220c3a37ce90
Merged-In: Id8f9b08490a50e2ccf39e8acc00b0c4e8ec782b0
2018-01-16 20:02:18 -08:00
Ivan Lozano c2d7db1c7d Overflow sanitization in frameworks/ and system/.
Enables signed and unsigned integer overflow sanitization on-by-default
for modules in frameworks/ and system/ by using the integer_overflow
sanitization setting. This applies sanitization to dynamically linked
binaries and shared libraries, and comes with a default set of regex for
functions to exclude from sanitization.
(see build/soong/cc/config/integer_overflow_blacklist.txt)

Prepare to enable minimal runtime diagnostics for integer overflow
sanitization on userdebug and eng builds.

Adds an additional Make and product variable pair to apply integer
overflow sanitization by default to additional code paths.

Bug: 30969751
Bug: 63927620

Test: Included paths are being sanitized.

Test: CTS test suite run on Pixel, runtime errors resolved.
Test: Performance impact in benchmarks acceptable.
Test: Boot-up successful on current Google devices.
Test: Teamfooded in diagnostics mode on Pixel for a month.

Test: Phone calls, camera photos + videos, bluetooth pairing.
Test: Wifi, work profiles, streaming videos, app installation.
Test: Split-screen, airplane mode, battery saver.
Test: Toggling accessibility settings.

Change-Id: Icc7a558c86f8655267afb4ca01b316773325c91a
2018-01-16 10:17:02 -08:00
David Brazdil 97b22ce9a8 Add new API file names
Doclava now generates new API signature files. Add their filenames
to config.mk.

Bug: 64382372
Test: make
Change-Id: I6aed1b2e0575ddb8c89cea5fa7709023eb6f30a3
2018-01-16 15:02:28 +00:00
Stephen Hines 504bd79e86 Merge "Remove unnecessary USE_CLANG_PLATFORM_BUILD." 2018-01-12 18:19:45 +00:00
Treehugger Robot ba4641931b Merge "Disable availability macros in libc++ on Darwin." 2018-01-11 23:44:22 +00:00
Dan Shi 6704727b69 Merge "Add a flag to disable auto-generating test configs." 2018-01-11 22:59:39 +00:00
Stephen Hines 178cf8e4d4 Remove unnecessary USE_CLANG_PLATFORM_BUILD.
This build variable is unnecessary now that GCC is completely
unsupported for Android platform builds.

Bug: http://b/64032869
Test: Builds
Change-Id: I9d44ebd7129cb2bdfbb26d37922db19c6fb9efc9
2018-01-11 14:29:23 -08:00
Dan Albert 9262b6fead Disable availability macros in libc++ on Darwin.
libc++'s headers are annotated with availability macros that indicate
which version of Mac OS was the first to ship with a libc++ feature
available in its *system's* libc++.dylib. We do not use the system's
library, but rather ship our own. As such, these availability
attributes are meaningless for us but cause build breaks when we try
to use code that would not be available in the system's dylib.

Test: removed the darwin check and checked showcommands on linux
Bug: None
Change-Id: I5f69f337baa29fcdf84b5e2fe46bf4f85904d1cd
2018-01-11 13:24:32 -08:00
Dan Shi 2035abfb8d Add a flag to disable auto-generating test configs.
Bug: 71714007
Test: m -j <module for *ts suite>
m -j NotificationStressTests
confirm NotificationStressTests.config generated

Change-Id: I372a227a07633ab8d335a8435baf5dd6081bb27e
2018-01-11 11:22:52 -08:00
Yifan Hong 1e7ab9db8f Merge "framework_cm.xml: move to hardware/interfaces" 2018-01-11 19:14:24 +00:00
Treehugger Robot 38228f2156 Merge "Switch back to llvm-ar." 2018-01-11 07:36:07 +00:00
Tobias Thierer f795dcb767 Experimental feature: LOCAL_PATCH_MODULE option in .mk files.
Specifying this option causes the make target's sources
and classpath dependencies to be patched into the specified
module via --patch-module (if the build toolchain implements
the module system, ie. when targeting 1.9). This allows tests
to compile that have classes in packages under test.

Currently, only java.base is on the module path (everything
else is on the classpath), and only when using -target 1.9
(ie. EXPERIMENTAL_USE_OPENJDK9=true).

Bug: 71699916
Test: Treehugger
Test: Checked that I was able to compile some ojluni & icu
      test sources that had classes in (libcore) packages
      under test.

Change-Id: I044fb9d904754ed281f574ab3dd52235cf0d7fec
2018-01-11 01:13:13 +00:00
Yifan Hong 919dcf1b6e framework_cm.xml: move to hardware/interfaces
Test: m dist
Bug: 69636193

Change-Id: Ic15a445d700552cb0973d6919ed5843bdecba363
2018-01-10 16:32:04 -08:00
Stephen Hines d612b8329a Switch back to llvm-ar.
This properly sets -format=gnu for all non-Darwin targets, because
llvm-ar is cross-platform (but defaults to the host environment).

Bug: http://b/71618641
Test: m checkbuild
Change-Id: Ib5d1c112a4ac792a11d1a0721ae6b0a5f9a42727
2018-01-10 15:55:52 -08:00
Dan Willemsen 08dc8498fe Merge "Switch to build-tools bison" 2018-01-10 21:49:28 +00:00
Treehugger Robot 9eba210e23 Merge "Remove support for stlport." 2018-01-10 00:12:48 +00:00
Treehugger Robot 8d3fde909e Merge "base_rules.mk: Don't use is_native for MULTILIB modules." 2018-01-09 05:05:30 +00:00
Treehugger Robot 139f458ced Merge "Remove armv5te" 2018-01-09 03:18:34 +00:00
Dan Willemsen ecae349e19 Switch to build-tools bison
Test: m
Test: mma external/dtc
Change-Id: Ia8e837f77238cb07e23de24f98c77aba9ff0f8dd
2018-01-08 17:38:33 -08:00
Dan Willemsen dd3a27394f Remove armv5te
This architecture only existed for unbundled use, but even the NDK is
removing support in their r17 release, so just remove support for it.

Test: build/soong/build_test.bash -only-config
Test: check buildserver configs, I don't see anything still using armv5
Change-Id: Ic183b510c9ada94438bd4cc2b9362fa438a29ced
2018-01-08 15:26:16 -08:00
Simran Basi 7160b06db9 base_rules.mk: Don't use is_native for MULTILIB modules.
Currently we determine if a test artifact has multiple build
outputs by checking if it is NATIVE_TEST, NATIVE_BENCHMARK, or
LOCAL_MULTILIB and declare the module is_native.

This is technically not true therefore let's use a different
variable to determine if we need multiple architecture directories.

Bug: 71554249
Test: make sl4a -j ; Results in an autogenerated empty configuration file.
Change-Id: I17c8f3ef7e1cd502b57e25c71688f12a35a9787d
2018-01-08 13:03:07 -08:00
Dan Albert 1759e2d2f1 Fix allowed STL types for system libraries.
Static libraries using the system STL have type
native:ndk:system:none, not native:ndk:system:shared, since no
actually linking takes place. These are still allowed to be linked to
platform modules.

Test: make checkbuild
Bug: None
Change-Id: Ib999bb0f422ec3938daa740fca5681e153d6525a
2018-01-08 12:42:20 -08:00
Yi Kong 259b2741bb Merge "Revert "Switch to llvm-ar"" 2018-01-08 19:51:19 +00:00
Yi Kong 4f2e033447 Revert "Switch to llvm-ar"
This reverts commit 5128702ed3.

Bug: 71694982
Reason for revert: Broke Mac build

Change-Id: I1044eccf943bae3c99e7527bd13989c70743b3d4
2018-01-08 18:09:54 +00:00
Yi Kong 9e700abdfa Merge "Switch to llvm-ar" 2018-01-05 22:54:53 +00:00
Dan Albert 19fbd1ce39 Remove support for stlport.
Test: make checkbuild
Bug: None
Change-Id: Iaaaecbe2608fe7a880236f3bbad0fcfcf62b5096
2018-01-05 11:49:43 -08:00
Dan Albert 94f95cf504 Remove support for gnustl.
Test: make checkbuild
Bug: None
Change-Id: Iaddd40b32f84395a76efaaa74be38770085617d5
2018-01-05 11:49:43 -08:00
Dan Albert 4297c39e75 Also restrict NDK linking by static/shared STL.
Test: make checkbuild
Bug: None
Change-Id: I0eb29ec483c069d1c12f444fd2e94cc6eb320f93
2018-01-05 11:49:43 -08:00
Stephen Hines 5128702ed3 Switch to llvm-ar
llvm-ar is required for platform LTO build.

With GNU ar, we used crsPD flags, however 'P' flag is not supported by
llvm-ar. Since none of the platform archive files are built using third
party AR, the 'P' flag should not matter to us. However we've been
relying on one side-effect of 'P', where  'ar foo.a some/path/to/obj.o'
when foo.a already has a file named 'obj.o' will be an append operation,
regardless whether the existing one is the same (ar has no way of
telling the difference). We workaround this by always appending ('q'
flag) for llvm-ar. This may result in larger intermediate archive files
(more duplication) but will not affect the final build result.

Bug: 71618641
Test: m checkbuild
Change-Id: Id96a244cfe49cecfba08cc868dd18934ecb4ff23
2018-01-04 23:50:17 -08:00
Colin Cross 96029a1276 Merge changes I9fda7fe3,I0a34b2b4,Ie64a283d
* changes:
  Clear resource_export_package outside conditionals
  Fix adbs after move from build/tools to build/make/tools
  Use proguard.jacoco.flags for EMMA_INSTRUMENT_STATIC
2018-01-05 06:22:35 +00:00