Commit graph

988 commits

Author SHA1 Message Date
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
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
David Brazdil
a5cc50ab4c Merge "Add hidden API list file variables" 2018-01-25 07:55:35 +00: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
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
David Brazdil
33bb091971 Merge "Add new API file names" 2018-01-20 10:06:22 +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
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
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
Yifan Hong
1e7ab9db8f Merge "framework_cm.xml: move to hardware/interfaces" 2018-01-11 19:14:24 +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
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
Treehugger Robot
ce5e4e251e Merge "Mark ANDROID_BUILD_TOP as obsolete" 2018-01-04 13:35:34 +00:00
Tobias Thierer
1644e2f1b7 Merge "Build with OpenJDK 9 -target 1.8 by default (attempt 4)." 2018-01-04 11:18:11 +00:00
Tobias Thierer
294111393e Build with OpenJDK 9 -target 1.8 by default (attempt 4).
This is cherry-picked from attempt 3, which was reverted
due to http://b/70862583.

Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.

This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.

Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.

To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false

Bug: 69449021
Test: Treehugger
Test: art/test/testrunner/run_build_test_target.py -j40 art-interpreter
Test: dalvik/dx/tests/run-all-tests

(cherry picked from commit ab1e54d5f1)

Change-Id: I119be15bd95747722114b970400b740fa47bf9e0
Merged-in: Ic42a518c90515b497e5cecec444ded373e403a4b
2018-01-04 11:08:14 +00:00
Dan Willemsen
07699636b0 Mark ANDROID_BUILD_TOP as obsolete
All users have been removed.

Test: check the build_test logs from aosp/master -> goog/master
Change-Id: I99e5630d7c13882c7667b0499c4f55633fa4535a
2018-01-03 15:15:38 -08:00
Colin Cross
5e0986cb51 Add R8 support to Soong.
Move R8_COMPAT_PROGUARD definition to Soong.
Copy the proguard_dictionary file so that the find
command that builds proguard_dict.zip can find it.

Test: m checkbuild
Change-Id: I28b2fce26ccb6225be0bd71802a43fe63df85daa
2018-01-03 14:21:35 -08:00
Dan Willemsen
74afb1d993 Switch some deprecated variables to obsolete
These are no longer used.

Test: check build_test logs for "has been deprecated"
Change-Id: Icb13891863d0b9b6a00e18d0f8f88e6306a24f8c
2017-12-27 16:59:38 -08:00
Treehugger Robot
15820578b2 Merge "Allow devices to extend the system manifest." 2017-12-23 01:17:24 +00:00
Steven Moreland
b14b530f82 Allow devices to extend the system manifest.
Introduces DEVICE_FRAMEWORK_MANIFEST_FILE, a list
of files which are added to system/manifest.xml.
This is required for devices to properly display
what hals they implement and also therefore for
them to pass vts_treble_vintf_test since it
now tests manifests based on hal origin.

Notice, this is named singularly to match
DEVICE_MANIFEST_FILE which is also a list of files.
They may be better both named "FILES", but for
consistency and legacy reasons, they can be thought
of as "everything that composes the X manifest
file".

Fixes: 70042049
Test: add system manifest extension which needs it
  and it no longer fails vts_treble_vintf_test for
  hals being served from the wrong partitions.

Change-Id: I1f59d5c3cadb7a7d4576b73196ca7b41103a49c5
2017-12-22 14:02:11 -08:00
Dan Shi
3c28ff7bff Merge "Auto generate test config files" 2017-12-21 21:53:12 +00:00
Tobias Thierer
1801a25d7c Merge "Pass OpenJDK 8's bootclasspath for host tools targeting <= 1.8." 2017-12-21 11:46:20 +00:00
Tobias Thierer
7e99d45ec2 Pass OpenJDK 8's bootclasspath for host tools targeting <= 1.8.
Host (as opposed to hostdex) tools compile and run against OpenJDK's
core libraries. Before this CL, the core libraries of the default
toolchain were always used, even when targeting an earlier language
version.

This meant that code that uses APIs from a later version of OpenJDK
than corresponded to LOCAL_JAVA_LANGUAGE_VERSION would compile, but
would fail to run under that earlier version of OpenJDK. It also
meant that calls to existing APIs might be reinterpreted; for
example, the return type of java.nio.ByteBuffer.clear() changed from
Buffer in OpenJDK 8 to ByteBuffer in OpenJDK 9. At compile time, this
was noted via the warning:
  bootstrap class path not set in conjunction with -source 1.8

After this CL, when targeting a language version <= 1.8 (which is
always the case when building with OpenJDK 8), some of OpenJDK 8's
core library/tools jars are now passed on the bootclasspath. The
decision to include the bootclasspath argument when building with
OpenJDK 8 was somewhat arbitrary, but has the advantage that we
discover any issues before we switch to OpenJDK 9.

Even when compiling with OpenJDK 9, use of OpenJDK 9 APIs will now
fail at compile time rather than at runtime; calls to existing APIs
will now be interpreted in OpenJDK 8 rather than 9 fashion. For
example, this means that dx and host-side CTS tests built with
OpenJDK 9 javac -target 1.8 will be runnable under OpenJDK 8.

Bug: 70521453
Bug: 70862583
Test: Checked that the bootclasspath argument was passed
      in the javac invocation targeting 1.8 during:
      make showcommands compatibility-common-util-hostsidelib
Test: make checkbuild

Change-Id: I9b6081edfdd2c3e9a450ae8a39c4e32c3d2cda92
2017-12-21 01:38:44 +00:00
Justin Yun
571737e8fc Set BOARD_VNDK_VERSION=current as a default value
For Android P or later launching devices, set BOARD_VNDK_VERSION to
"current" as a default value if the value is not defined yet.
"PRODUCT_USE_VNDK_OVERRIDE=false" can disable this feature.

Bug: 70480159
Bug: 62019611
Test: Unset BOARD_VNDK_VERSION
      Set PRODUCT_SHIPPING_API_LEVEL "28"
      - Check if BOARD_VNDK_VERSION is set to "current"
      Set PRODUCT_USE_VNDK_OVERRIDE to "false"
      - Check if BOARD_VNDK_VERSION is not defined

Change-Id: I8d37579e8c4ca1788705cbc8a42e8812e2b93a22
2017-12-21 08:15:19 +09:00
Dan Shi
efb892d858 Auto generate test config files
This change allows one to run atest <module name>. The TradeFed test
config file will be automatically created in testcases directory based
on the settings.

Bug: 69929803, 69932044
Test: m -j NotificationStressTests libminijail_test
add following lines in notificationtests/Android.mk,
before "include $(BUILD_PACKAGE)"
LOCAL_COMPATIBILITY_SUITE := general-test

Change-Id: Ib5e9cd152d957b5d5beb6ed23a899a021a7e06d6
2017-12-20 15:05:17 -08:00
Alan Leung
5260c8bdbc Merge "Revert "Enable R8 by default (third attempt)"" 2017-12-19 23:46:13 +00:00
Alan Leung
c2cd517418 Revert "Enable R8 by default (third attempt)"
Bug: 70858752

This reverts commit 658e4e4e3a.

Reason for revert: breaks com.android.systemui.util.leak.LeakDetectorTest#trackInstance_doesNotLeakTrackedObject

which breaks presubmit

Change-Id: I6759cbef6dd5149ddb57836cd080829a5394473d
2017-12-19 23:45:15 +00:00
Treehugger Robot
eba55d2515 Merge "Revert "Keep PRODUCT_FULL_TREBLE to true even when some requirements are not met"" 2017-12-19 20:32:34 +00:00
Søren Gjesse
6f516aef40 Merge "Enable R8 by default (third attempt)" 2017-12-19 07:12:05 +00:00
Søren Gjesse
658e4e4e3a Enable R8 by default (third attempt)
Test: m -j PRODUCT-aosp_x86-userdebug
Test: Check that some .vdex files built have R8 generated code
Change-Id: I5ab4ed75493404c1b330827fe0005510f5613a68
2017-12-18 20:16:28 +01:00
Treehugger Robot
2b1f0d1810 Merge changes from topic "kati-obsolete-full-treble"
* changes:
  .KATI_obsolete PRODUCT_FULL_TREBLE.
  PRODUCT_NOTICE_SPLIT from PRODUCT_FULL_TREBLE
2017-12-18 17:46:25 +00:00
Steven Moreland
27aaecaf1e Revert "Keep PRODUCT_FULL_TREBLE to true even when some requirements are not met"
This reverts commit 55e17a753e.

Reason for revert: Soong recognizes requirements.
Bug: 62019611
Test: still PRODUCT_FULL_TREBLE true on 2017 pixel

Change-Id: Id2b2186af5c9aa08e8f10ec2894f0f8d69f15d60
2017-12-18 17:44:16 +00:00
Steven Moreland
ae69e5787a PRODUCT_NOTICE_SPLIT from PRODUCT_FULL_TREBLE
- until PRODUCT_NOTICE_SPLIT is the default
- disallow PRODUCT_NOTICE_SPLIT_OVERRIDE because it
  doesn't need to be differentiated.

Bug: 69865032
Test: manual
Change-Id: I4a29c298862fc9fab51755bf19f236f61fbd784d
2017-12-15 14:52:07 -08:00
Søren Gjesse
cd13676221 Revert "Enable R8 by default (second attempt)"
This reverts commit f2a697725c.

Reason for revert: b/70710434

Change-Id: Ia6d42e4c2fc7e7a4ca67d42d7aaa57ab95c2cc9a
2017-12-15 15:18:57 +00:00
Yifan Hong
ed42caf94d Move fwk comp mat level logic into assemble_vintf
Deprecation schedule requirements is specified in assemble_vintf.
Move all checking logic to assemble_vintf.

Test: builds

Bug: 69636193
Change-Id: I2d62555633494014dc0005931de6c8ae9e6877fa
Merged-In: I2d62555633494014dc0005931de6c8ae9e6877fa
2017-12-14 15:35:15 -08:00
Yifan Hong
97de88c14e PRODUCT_COMPATIBILITY_MATRIX_LEVEL_OVERRIDE is deprecated.
It is replaced by FCM Version specified in the device manifest
directly.

Test: builds
Bug: 69636193
Change-Id: I9e2b871b4c6190107ba9fbb36495bb41c461a0a3
Merged-In: I9e2b871b4c6190107ba9fbb36495bb41c461a0a3
2017-12-14 15:35:15 -08:00
Søren Gjesse
f2a697725c Enable R8 by default (second attempt)
Test: m -j PRODUCT-aosp_x86-userdebug
Test: Check that some .vdex files built have R8 generated code
Change-Id: I06903dc30c802bbcffd6992c3c25a1b711a5875c
2017-12-14 22:24:48 +01:00
Colin Cross
fdea893833 Replace build/tools with build/make/tools
Test: m checkbuild
Change-Id: I8db6c27a6d2372f142d10568fe92d6f2e9a59252
2017-12-06 16:12:40 -08:00
Xin Li
5f03da0404 Merge "DO NOT MERGE: Merge Oreo MR1 into master" 2017-12-06 23:18:30 +00:00
Treehugger Robot
0765d53239 Merge "Add build script to generate TF test XML file with filters" 2017-12-06 22:51:43 +00:00
Tobias Thierer
a363f249e9 Merge "Revert "Default to building with OpenJDK 9 -target 1.8.""
am: 2ea4ed5911

Change-Id: I0fd225966b98a212b8c9712a4942cfe3e8bd9dc2
2017-12-06 14:09:31 +00:00
Tobias Thierer
d148a93adc Merge "Build with OpenJDK 9 -target 1.8 by default except for errorprone."
am: d4760b3eed

Change-Id: I051acf7e54d1fcbaf18943b11436d8566a2568a7
2017-12-06 11:09:39 +00:00
Tobias Thierer
a4fc423ebf Revert "Default to building with OpenJDK 9 -target 1.8."
After this revert CL topic, the default toolchain for Android
goes back to being OpenJDK 8.

This revert is being prepared ahead of time in case of
any problems with original change topic,
https://r.android.com/#/q/topic:bug_69449021

Bug: 69449021
Test: Treehugger

This reverts commit 3337fbfa6114379f13a35ad3d6bf9cb5a5b8689b

Change-Id: Ibc050ad9a87dceb336e7cd961015e70a639e43db
2017-12-05 02:10:02 +00:00
Tobias Thierer
5f36a62622 Build with OpenJDK 9 -target 1.8 by default except for errorprone.
Before this CL topic, the build toolchain for .java source files
used OpenJDK 8, targeting 1.8 (v52 class files) by default.

This CL topic switches the default to OpenJDK 9, but still
targeting 1.8 (v52 class files) by default. If USE_ERROR_PRONE
is set to true, then the default remains OpenJDK 8.

Code in the Android platform should generally be unaffected,
but if host tools that are now compiled and run using
OpenJDK 9 are causing problems for your team, then let me
know.

To manually switch back to the old behavior for now (continue
using OpenJDK 8), run this command in your shell:
export EXPERIMENTAL_USE_OPENJDK9=false

Bug: 69449021
Test: Treehugger
Test: "make core-oj", checked that compilation now uses
      OpenJDK 9 javac -target 1.8
Test: Checked that this is still compiled using OpenJDK 8.
      export EXPERIMENTAL_USE_OPENJDK9=false
      make core-oj

Change-Id: Iadae20d25e37d2cf0a89918a54af51fab1a4f01d
2017-12-05 02:10:02 +00:00
Søren Gjesse
efbd35a247 Merge "Prepare for switching from Proguard to R8"
am: 6af8e92040

Change-Id: I26b648931723476a5cd0c9208c07352466abcc2c
2017-12-01 06:48:18 +00:00
Søren Gjesse
6af8e92040 Merge "Prepare for switching from Proguard to R8" 2017-12-01 06:41:51 +00:00
Sundong Ahn
f3e8302088 Add LOCAL_SDK_VERSION := system_$(VER)
am: 5a44d1f069

Change-Id: Ief08f78484b654502d356c07d61063a16aad0572
2017-12-01 04:26:10 +00:00
Sundong Ahn
5a44d1f069 Add LOCAL_SDK_VERSION := system_$(VER)
The system_$(VER) can be set in LOCAL_SDK_VERSION, and the apk will use
android_system.jar at build time.
If LOCAL_SDK_VERSION is not defined and this module is installed in
vendor.img, LOCAL_SDK_VERSION is set to system_current.

Bug: 67724799
Test: 1. build && run on taimen
2. LOCAL_SDK_VERSION:=system_27 in ims.apk && build ims.apk && check
the vsdk_v27_intermediates.

Merged-In: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
Change-Id: I5b11c78b8fcd4a2f2a5e3b141527cd34dbe80018
(cherry picked from commit ef212cbe8d)
2017-12-01 00:39:07 +00:00
Søren Gjesse
896c30a65f Prepare for switching from Proguard to R8
Test: m -j PRODUCT-asop_x86-userdebug
Test: Check that no *.vdex files in the image are generated by R8

Change-Id: Ifd85d485fa5b6148723378a15c5faef849381ce1
2017-11-30 08:34:00 +01:00
Dan Willemsen
f20b59e4d7 Merge "Switch unused deprecated variables to obsolete"
am: f170166521

Change-Id: Ibe1d991ea61eb953fa161d0e2a04faac1c6309f4
2017-11-30 02:10:49 +00:00
Dan Willemsen
79fd696939 Switch unused deprecated variables to obsolete
These have no references in our master trees, so can now be marked as
obsolete.

Test: grep -R "<VAR> has been" <all build_test logs>
Change-Id: I72d2371176e78f38ed56741dd8527193eec7eae3
2017-11-29 13:44:32 -08:00
Dan Willemsen
efe230cef6 Merge "Mark envsetup.sh vars as deprecated in makefiles"
am: d7fcf6f459

Change-Id: I7da6187dc23bf7e74dbb7e8b686380070f565f70
2017-11-29 03:18:43 +00:00
Treehugger Robot
d7fcf6f459 Merge "Mark envsetup.sh vars as deprecated in makefiles" 2017-11-29 03:06:32 +00:00
Jayant Chowdhary
26f40c264d Merge "Export DIST_DIR to soong on dist builds."
am: 824958e880

Change-Id: Ic7c2f097e5c19cf80ce3b0b2c6ce170f908907b9
2017-11-28 22:46:56 +00:00
Jayant Chowdhary
824958e880 Merge "Export DIST_DIR to soong on dist builds." 2017-11-28 22:38:32 +00:00
Dan Willemsen
773386251d Mark envsetup.sh vars as deprecated in makefiles
For the envsetup.sh variables that should not be used in makefiles
(since they're not explicitly set up, and won't be available on the
build servers), mark them as deprecated.

Rework our documentation to have a landing page, and create a "Changes"
section where we can record changes like these. At some point I may go
and backfill some recent work.

Test: build/soong/build_test.bash
Change-Id: I54b9294ddf270245afdb58d17150db8098584e8a
2017-11-28 14:19:50 -08:00
Colin Cross
863dcf07d4 Merge "Add support for jacoco in soong"
am: 9798690282

Change-Id: I47534d7346e637aff019b10bfc395254c618d29c
2017-11-28 21:18:48 +00:00
Jayant Chowdhary
85fbcf4a68 Export DIST_DIR to soong on dist builds.
Bug: 64267858

Test: Adding DistDir to build/soong/android/variable.go enables access
      to DIST_DIR_SOONG.

Change-Id: I74faea11255edf37db6a4eaf193df300c363bfb7
2017-11-28 11:26:24 -08:00
Colin Cross
3fec81d978 Add support for jacoco in soong
Use jacoco values exported from soong and copy
jacoco-report-classes.jar to where the jacoco-report-classes-all.jar
rule can find it.

Bug: 69629238
Test: m EMMA_INSTRUMENT=true EMMA_INSTRUMENT_FRAMEWORK=true SKIP_BOOT_JARS_CHECK=true WITH_DEXPREOPT=false
Change-Id: If05381f415fb52a575746b8be0bfcd03d55b2153
2017-11-24 20:23:36 -08:00
Chih-hung Hsieh
39610026fb Merge "Add default -Wall -Werror or -Wall."
am: 6ddc7843cb

Change-Id: Ib9b93dbd61bb9141b88fb7f1f7c4ead3fd28accc
2017-11-21 21:24:12 +00:00
Chih-hung Hsieh
6ddc7843cb Merge "Add default -Wall -Werror or -Wall." 2017-11-21 21:19:01 +00:00
Steven Moreland
9642570a1b Merge "Make more Treble make variables read only."
am: cbf6fd55bf

Change-Id: I4a42de556f54b2c8721ff7935b21bc11cc583075
2017-11-20 19:16:02 +00:00
Treehugger Robot
cbf6fd55bf Merge "Make more Treble make variables read only." 2017-11-20 19:09:21 +00:00
Dan Willemsen
84d0f704eb Merge "Switch aidl and zipalign prebuilts to build-tools"
am: d6f229842a

Change-Id: Ifec1c2c4d2daf601a0301cfef7a7325b7c511214
2017-11-18 04:59:41 +00:00
Dan Willemsen
6353304dc9 Switch aidl and zipalign prebuilts to build-tools
So that they can be updated more regularly than prebuilts/sdk/tools.

Bug: 69431993
Test: tapas ExactCalculator; m
Change-Id: Id07ab43f9d9e0c794cc15f21b75ae88c3547d8bd
2017-11-17 18:40:45 -08:00
Chih-Hung Hsieh
1876acdd53 Add default -Wall -Werror or -Wall.
* Skip Android.bp, prebuilt, and HEADER_LIBRARIES targets.
* If neither -Wno-error nor -Werror is used, add default -Wall -Werror.
  However, if the build target is in a project
  under one of ANDROID_WARNING_ALLOWED_PROJECTS, add only -Wall.
* Dump name of modules using -Wno-error or added -Wall -Werror
  into file $(PRODUCT_OUT)/wall_werror.txt.

Bug: 66996870
Test: normal build
Change-Id: Ief8cf776e8613ed073a64dd271534688845d5c2c
2017-11-17 14:06:35 -08:00
Steven Moreland
0e6301c996 Make more Treble make variables read only.
This makes the following readonly if they are defined:
- PRODUCT_FULL_TREBLE_OVERRIDE
- Linker/sepolicy/vintf overrides for PRODUCT_FULL_TREBLE

Test: multiproduct_kati
Change-Id: Ib33e2e23b74a049e87667358bed331f86e517837
2017-11-17 12:46:54 -08:00
Tobias Thierer
ea43e16f60 Merge "Tweak comments for OpenJDK 9 build toolchain logic."
am: 2655e57bbb

Change-Id: I13b9520e95365dc2669d7a0c4832a322b7efca84
2017-11-17 18:25:32 +00:00
Tobias Thierer
7ef760b832 Tweak comments for OpenJDK 9 build toolchain logic.
This addresses review comments on the preceding CL
http://r.android.com/539055

Test: Treehugger
Change-Id: Icb0674190db3d638546a0ed49dbcb97d0698e549
2017-11-17 15:35:59 +00:00
Tobias Thierer
4ffaa14478 Merge "Break EXPERIMENTAL_USE_OPENJDK9 into {USE,TARGET}_OPENJDK9."
am: 446c9ba370

Change-Id: I0254955fa16e8b35396f9f350c961031272c6583
2017-11-17 15:19:30 +00:00
Tobias Thierer
f6bd495728 Break EXPERIMENTAL_USE_OPENJDK9 into {USE,TARGET}_OPENJDK9.
This CL topic breaks the single flag value EXPERIMENTAL_USE_OPENJDK9
into two flags USE_OPENJDK9 and TARGET_OPENJDK9 which are computed
independently in config.mk and config.go; this means that later
build logic no longer depends on / duplicates the semantics of an
unset EXPERIMENTAL_USE_OPENJDK9, because that later build logic
can use USE_OPENJDK9 and TARGET_OPENJDK9 instead. Thus, it becomes
slightly easier to change this default in future CLs (touching
only config.mk and config.go).

It also makes it more straightforward to convert .mk files
to .bp.

This CL also introduces a new allowed value "false" for
EXPERIMENTAL_USE_OPENJDK9. This fourth possible value currently
has the same semantics as a default/unset
EXPERIMENTAL_USE_OPENJDK9, but allows people to explicitly
switch back to the old semantics when the default changes.

Test: make showcommands core-oj (in environments with
      EXPERIMENTAL_USE_OPENJDK9 set to "", "1.8", and "true").
Bug: 38177295

Change-Id: Iaade9610b237722e5d175143808b8653b1e98996
2017-11-17 13:14:11 +00:00
Alan Leung
4eee474504 Merge "Rename r8 to r8-compat-proguard"
am: 81eeb78200

Change-Id: Ibe7c114115f627ae3f061f8087b93891af475e40
2017-11-17 03:15:09 +00:00
Alan Leung
7d6144d34b Rename r8 to r8-compat-proguard
Test: USE_R8=false USE_D8=true m -j32 && USE_R8=true USE_D8=true m -j32

Change-Id: I2610340cf75f8db5920e33fac542f0dcf294ce29
2017-11-16 17:24:01 -08:00
Jiyong Park
ad9feb4cac Merge "Keep PRODUCT_FULL_TREBLE to true even when some requirements are not met"
am: 8a89848373

Change-Id: If19df9e3560456c2f69e2faa54fe3cbbb1c045cb
2017-11-15 01:27:56 +00:00
Xin Li
44dd4881de Merge commit '66b8b530187b129934a685bf0c4349eef00e4b0c' from
oc-mr1-dev-plus-aosp-without-vendor into stage-aosp-master.

Change-Id: I7594bb72dd7e847292eb502edd918e41318aac29
Merged-In: Ide82473d358719f7e01cd2a4a85db954f3722f14
2017-11-14 11:36:22 -08:00
Jiyong Park
55e17a753e Keep PRODUCT_FULL_TREBLE to true even when some requirements are not met
When some of the full treble requirements are turned off,
PROUCT_FULL_TREBLE became false, which in turn cleared macro variables
guarded in treble: {cflags: "..."}.

Until when Soong recognizes each of the requirements (e.g.
treble_sepolicy: { }), don't reset PRODUCT_FULL_TREBLE to false
even when some of the requirements are not met.

Bug: 62019611
Bug: 68710251
Test: get_build_var PRODUCT_FULL_TREBLE returns true for aosp_walleye
Test: aosp_walleye boots to the UI
Change-Id: Iad3ee4f4462c82e9f9e1897f3ec019cdd16da358
2017-11-14 19:14:44 +09:00
Dan Shi
26efd3a8d1 Add build script to generate TF test XML file with filters
Bug: 68270274
Test: run 'atest' in frameworks/base
Change-Id: I99b741fae18997caa6aefbd3ab804e5d30e7ae36
2017-11-13 14:48:10 -08:00
Alex Deymo
cbb4ec6cf0 Merge "Update binary name to "brotli"." 2017-11-13 22:43:22 +00:00
Steven Moreland
33fdd8c4ef Break up PRODUCT_FULL_TREBLE into variables.
PRODUCT_SEPOLICY_SPLIT
PRODUCT_TREBLE_LINKER_NAMESPACES
PRODUCT_ENFORCE_VINTF_MANIFEST

Being able to selectively toggle these does several things:
- it's better software engineering (no longer conflating vars)
- easier bringup for devices.
- devices which don't require full Treble can opt out of only
  parts of it and still get the benefits of others.

Bug: 62019611
Test: manual

Merged-In: I728e32869baf043ae9a54e83e513fb99e560c827
Change-Id: I728e32869baf043ae9a54e83e513fb99e560c827
2017-11-13 10:32:52 -08:00
Alex Deymo
b10e07aea7 Update binary name to "brotli".
With the update of brotli to version 1.0.1 the new binary tool is now
called "brotli". This patch updates the scripts to use the new name.

Bug: 34220646
Test: `make dist`; ota_from_target_files on non-A/B device.
Change-Id: Ie8da4333388d029d5960a723a55efd875d8ee820
2017-11-13 18:11:45 +01:00
Dan Willemsen
a3d94873cf Merge changes from topic "soong_ui_java"
* changes:
  Remove Java PATH check, deprecate using PATH in Kati
  Remove JAVA_NOT_REQUIRED
2017-11-08 20:31:31 +00:00
Dan Willemsen
2ec3e4a257 Remove Java PATH check, deprecate using PATH in Kati
The Java PATH fixup is now handled within soong_ui, along with the
values of ANDROID_JAVA_HOME based on OVERRIDE_ANDROID_JAVA_HOME /
EXPERIMENTAL_USE_OPENJDK9.

Mark PATH as deprecated, so that any reads/writes will cause warnings.
This will be switched to obsolete once it's verified that there are no
more users.

Using PATH within Kati means that we've got to rebuild the ninja files
whenever your PATH changes, which is not ideal, especially since some of
the envsetup functions can change your PATH. In most cases you only need
to use PATH within the bash portions of the build rules ($${PATH}), which
isn't treated as a make variable, so won't produce an error.

I'm also planning on replacing PATH in a future change with our own
directory that has placeholders for everything in your PATH. This will
let us remove tools that shouldn't be used from the build.

Test: m nothing
Test: build/soong/build_test.bash on AOSP and internal master
Change-Id: I18d8d19cfba313ff9176345bf73ac34e8dbebfbb
2017-11-08 00:24:35 -08:00
Dan Willemsen
90879f50ea Remove JAVA_NOT_REQUIRED
This is no longer required.

Test: cs/JAVA_NOT_REQUIRED
Change-Id: I9f64e153c9f4af7df1c8dee4eaea3c7458be61c0
2017-11-07 17:43:36 -08:00
Søren Gjesse
c66d297e0a Use prebuild R8 for USE_R8=true
Instead of building R8 from external/r8 use the prebuild jar in
prebuilds/r8.

Test: m -j USE_R8=true

Change-Id: I9680ae430cdbc2b3beb910873c8eed27354f6af1
2017-11-07 16:21:50 +01:00
Treehugger Robot
ab5ce7e1fe Merge "Move BUILD_*_FROM_FILE to config.mk" 2017-11-04 01:22:26 +00:00
Colin Cross
e96bfdb337 Move BUILD_*_FROM_FILE to config.mk
BUILD_NUMBER_FROM_FILE and BUILD_DATETIME_FROM_FILE may need to
be referenced before main.mk has been parsed, move them to config.mk.

Bug: 68865363
Test: m -j TARGET_PRODUCT=full TARGET_BUILD_APPS=Gallery
      aapt dump xmltree out/target/product/generic/obj/APPS/Gallery_intermediates/package.apk AndroidManifest.xml | grep Version
Change-Id: I9361a394469e61fcdf5a2b9509ef2bb2b373d6e7
2017-11-03 16:35:02 -07:00
Dan Willemsen
52f74821d3 Switch deprecation message to $(warning)
This way it shows up when using the old copy of lunch, which hides
stdout.

Test: source old_envsetup; lunch aosp_marlin-eng
Change-Id: I4bccf37fe69c0d7affb5805d05a2750e5d9a3da4
2017-11-03 15:52:50 -07:00
Alan Leung
65168a4143 Workaround for USE_D8 not in --dumpvars-mode
Bug: 68406220
Test: m checkbuild && USE_D8=false m checkbuild
Change-Id: Ia9916fb69b22449ff9eadd334f135807d999276f
2017-11-02 15:31:03 -07:00
Treehugger Robot
dee5abd85a Merge "Always use MKE2FS to build ext4 image" 2017-11-02 21:34:49 +00:00
Jin Qian
f0ebe872a2 Always use MKE2FS to build ext4 image
Bug: 64395169
Change-Id: I0118fe8ee5f677fdb9da616a11de304b2aefd0ba
2017-11-01 16:37:38 -07:00
Treehugger Robot
9767853ed0 Merge "Export AAPT-related variables to soong" 2017-10-31 23:39:24 +00:00
Colin Cross
c7bd540a6e Export AAPT-related variables to soong
Test: m checkbuild
Change-Id: I1816df9b9cc7b51e228d6d847cefa2d51a524897
2017-10-30 17:31:44 -07:00
Dan Willemsen
ce9a40650d Remove make version check
We should never be using make here anymore, only Kati.

Test: none
Change-Id: I6e716d76e3656c2bad1cf17c6de92bdeda763d5b
2017-10-30 13:52:47 -07:00
Dan Willemsen
41cc5022c1 Merge "Prevent using config.mk from make, clean up unused code" 2017-10-30 20:11:32 +00:00
Søren Gjesse
6836c47b8b Merge "Added support for using R8 instead of Proguard + dx"
am: 9047dce212

Change-Id: Ibf7489aa1af1b2ae5fc5540b3eceec0c4a67a32b
2017-10-24 06:45:36 +00:00
Søren Gjesse
0c1fe64ce8 Added support for using R8 instead of Proguard + dx
With this change building with USE_R8=true will run R8 instead of Proguard + dx
for all targets that have LOCAL_PROGUARD_ENABLED set. R8 (through the
compatproguard wrapper) will use the same options as Proguard for now.

Additional Proguard configurations for R8 can be added using LOCAL_R8_FLAG_FILES
on individual targets. This makes it possible to make configuration updates
without touching the Proguard + dx configuration

Test: m -j
Test: m -j USE_D8=true USE_R8=true
Test: m -j USE_D8=true USE_R8=false
Test: m -j USE_D8=true
Change-Id: I78e8a0fd17cc5cefedccffe95b93c94a60a727f1
2017-10-23 08:58:30 +02:00
Nan Zhang
117151358c Merge "Remove Turbine definition from config.mk"
am: a6d7420c58

Change-Id: If37be35711fbb8e2c728915c23c54d86f41fa83a
2017-10-21 01:28:46 +00:00
Treehugger Robot
a6d7420c58 Merge "Remove Turbine definition from config.mk" 2017-10-21 01:20:45 +00:00