Commit graph

920 commits

Author SHA1 Message Date
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
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