Commit Graph

34623 Commits

Author SHA1 Message Date
Calin Juravle 965f8aec4c Replace -classpath with --class-loader-context for preopt
Use --class-loader-context to pass the context to dex2oat instead of using
runtime arguments.

In preparation to simplify dex2oat handling of contexts.

Bug: 38138251
Test: make & check that the prebuilds have '&' as their classpath key
Change-Id: Iad2fc4364173f59f41886556222ec69f87a0bd52
2017-08-02 17:19:27 -07:00
Dan Albert cd38b86016 Add PLATFORM_VERSION_FUTURE_CODENAMES.
PLATFORM_VERSION_ALL_CODENAMES isn't actually all the code names, just
the ones active in our current target. We need the list of all targets
so we can validate code names in NDK stub templates even if they're in
the future. Unfortunately, all_codenames has been baked into
build.prop for ages, so we're stuck with this name. Improve the
comments and add PLATFORM_VERSION_FUTURE_CODENAMES to cover to cover
the future targets.

Test: make checkbuild
Test: check $ANDROID_PRODUCT_OUT/system/build.prop
Bug: None
Change-Id: I81fed6f761e5362ef3050be9d1e3fb17739feadd
2017-08-02 17:17:41 -07:00
Colin Cross cf021094f1 Merge "Clean jack intermediates" 2017-08-02 17:02:03 +00:00
Treehugger Robot 9bd6605abe Merge "Vendor modules in make also have __ANDROID_VNDK__ defined." 2017-08-02 03:39:33 +00:00
Yifan Hong d7aa8417de Vendor modules in make also have __ANDROID_VNDK__ defined.
Bug: 64277220
Test: BOARD_VNDK_VERSION m -j
Change-Id: Ia9811ea526d0878b539c8c3da9e82e6bf33fe8e8
Merged-In: Ia9811ea526d0878b539c8c3da9e82e6bf33fe8e8
2017-08-01 18:54:10 -07:00
Treehugger Robot 5af2027e34 Merge "Revert "Revert "emulator: create qemu images for system,vendor""" 2017-08-01 23:16:25 +00:00
Dmitry Shmidt 795bed9329 clang: Allow LOCAL_CLANG exception for device/google/contexthub project
It is built by non-eabi gcc

Bug: 35666637
Test: Manual

Change-Id: I10b4364b66f6cad907b1271250506500aeb11fd5
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2017-08-01 15:48:03 -07:00
Alexey Polyudov 1e8c34b95f Merge "build: aux: Fix link type checking for AUX builds" 2017-08-01 22:46:20 +00:00
Alexey Polyudov 55ebe631b4 build: aux: Fix link type checking for AUX builds
AUX build environent is volatile and is only instantiated in
a context of AUX-aware module.
link-type checking is happening outside such context, and
is not able to correctly determine AUX build dependencies.

1. Save enough of context in LINK_TYPE variable;
   Use AUX-<variant-name> instead of AUX
2. Load correct set of AUX meta build vars before
   building link_type rules

Bug: 62060489
Test: make auxiliary

build no longer tries to access "/STATIC_LIBRARIES" path

Change-Id: I9764d4a0740da1c55a6f8429398872fc4362942c
2017-08-01 13:37:35 -07:00
Colin Cross bc291e63a0 Clean jack intermediates
Jack is no longer the default java compiler, clean the intermediates
to save space.

Bug: 36902714
Test: manual
Change-Id: I368442c8ad71eb5839c52839f2aa6ca55cf20bdd
2017-08-01 13:12:40 -07:00
Bo Hu f0d50bbef0 Revert "Revert "emulator: create qemu images for system,vendor""
This reverts commit 9b99ddc8a5.
and add syste-qemu.img to the dependency list of sdk target

Test: build sdk target successfully

Change-Id: Idb0bee56275f3bfe33ba7d29463e4b8e0699ec33
2017-08-01 13:00:53 -07:00
Colin Cross 6ce5a428ae Merge "Compile with javac by default" 2017-08-01 18:24:12 +00:00
Bo Hu a2ea9626e5 Merge "Revert "emulator: create qemu images for system,vendor"" 2017-08-01 06:52:44 +00:00
Bo Hu 9b99ddc8a5 Revert "emulator: create qemu images for system,vendor"
This reverts commit b5d0503758.

Change-Id: Ie46a3a3dd99dec42673b3e3bd5b9085ca0480a8d
2017-08-01 06:50:07 +00:00
Treehugger Robot 94be321cae Merge "Fix test suite zip generation on mac" 2017-08-01 03:51:28 +00:00
Colin Cross f3a4340435 Fix test suite zip generation on mac
Don't use sed -i, it requires an argument on mac and is eating the
-e parameter, which causes the command to not be applied.

Also clean up the temporary list files so they don't clutter up
$OUT.

Test: m -j device-tests
Bug: 64226094
Change-Id: Ie71820fc2d1cd812717bf0c156af011ca723e9f6
2017-08-01 01:51:30 +00:00
Treehugger Robot 571e5d47b7 Merge "emulator: create qemu images for system,vendor" 2017-08-01 01:49:39 +00:00
bohu b5d0503758 emulator: create qemu images for system,vendor
For raw system.img and vendor.img do not have
partition table and init refuses to mount them
in first stage mounting.

For emulator build:
create partitioned system-qemu.img for system.img;
create partitioned vendor-qemu.img for vendor.img
if applicable.

Change-Id: I64fdcdafc303cf2f74a1e96653e7afe259f0af98
2017-07-31 16:28:40 -07:00
Treehugger Robot 218a0c0c70 Merge "Continue using the real make if -C is used" 2017-07-29 08:11:32 +00:00
Treehugger Robot dce396a70f Merge changes Ic89cc4c0,I189cd144,Id51726ae,I8b777c88,Ia4573464, ...
* changes:
  Add support for using profiles for boot images
  Add PRODUCT_SYSTEM_SERVER_DEBUG_INFO property
  Add product system server compiler filter property
  Allow custom compiler filters for system server jars
  Install preopted profiles on device
  Default profile usage based on the existence of the profile
  Use speed-profile instead of quicken for the profile case
2017-07-29 00:01:09 +00:00
Dan Willemsen e984224899 Continue using the real make if -C is used
To allow building other make-based systems from the top of the android
tree.

Bug: 64145979
Test: get_make_command
Test: get_make_command -C
Test: get_make_command -C.
Test: get_make_command -C .
Test: get_make_command -j test
Test: get_make_command test-C
Test: get_make_command " -C"
Test: make
Test: make -C.
Change-Id: I406dd2706f19e5d2a6afdff441335f4e01ba6d12
2017-07-28 21:08:12 +00:00
Colin Cross 75b50421af Compile with javac by default
javac is replacing jack as the default compiler for platform builds.
Leave it on for unbundled builds, we don't have a solution for lambdas
in unbundled builds yet (b/62038127).

Temporarily allow products to continue to default to jack by setting
PRODUCT_COMPILE_WITH_JACK=true.

This reapplies I1c3857f64eafa445ad1b9dd94eff85bef05f4649.

Bug: 36902714
Test: m -j checkbuild
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L50600000086240009&nodeType=Trybot
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L68900000086676531&nodeType=Trybot
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L37200000086753998&nodeType=Trybot
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L74600000087054271&nodeType=Trybot
Test: sailfish-userdebug boots and basic interactions work
Test: art tests pass
Test: libcore tests pass
Change-Id: Icd1b549cd8a010758a6e5d98b39569fcd1825f60
2017-07-28 13:01:32 -07:00
Mathieu Chartier a61acf62c9 Add support for using profiles for boot images
Added two product flags:
PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION

If PRODUCT_USE_PROFILE_FOR_BOOT_IMAGE is enabled (default false), a
art profile is used to create the preopted boot image. This profile
is also passed to the runtime in AndroidRuntime.cpp.

The profile is created from the
PRODUCT_DEX_PREOPT_BOOT_IMAGE_PROFILE_LOCATION variable that defaults
to "frameworks/base/boot-image-profile.txt".

(cherry picked from commit 77226f6333)

Bug: 37966211
Test: make and flash

Merged-In: Ic89cc4c0c4d39aa9726843f5d9c2fb1dedeb7885
Change-Id: Ic89cc4c0c4d39aa9726843f5d9c2fb1dedeb7885
2017-07-28 11:17:32 -07:00
Mathieu Chartier f0db908ea7 Add PRODUCT_SYSTEM_SERVER_DEBUG_INFO property
Used for specifying if a product should get system server mini debug
info. Defaults to true.

Can be disabled by doing
PRODUCT_SYSTEM_SERVER_DEBUG_INFO := false

The property overrides WITH_DEXPREOPT_DEBUG_INFO, so if
PRODUCT_SYSTEM_SERVER_DEBUG_INFO is true but
WITH_DEXPREOPT_DEBUG_INFO is false, system server will have mini
debug info.

(cherry picked from commit 94f5f93236)

Bug: 62862291
Test: make

Merged-In: I189cd144ce3ade5f02855db022874c8dd45cbdf3
Change-Id: I189cd144ce3ade5f02855db022874c8dd45cbdf3
2017-07-28 11:17:24 -07:00
Mathieu Chartier 6228ec2d07 Add product system server compiler filter property
The product only needs to specify
PRODUCT_SYSTEM_SERVER_COMPILER_FILTER. This determines what compiler
filter system server jars are compiled with.

(cherry picked from commit 6a90210c62)

Test: update marlin device
Test: make and look at services.odex

Bug: 62356545

Merged-In: Id51726ae03576d7b4eb784b861158bb451c39deb
Change-Id: Id51726ae03576d7b4eb784b861158bb451c39deb
2017-07-28 11:17:17 -07:00
Mathieu Chartier abcf66b538 Allow custom compiler filters for system server jars
Passing down a compiler filter in LOCAL_DEX_PREOPT_FLAGS or
PRODUCT_DEX_PREOPT_DEFAULT_FLAGS will no longer always get
overridden to speed.

(cherry picked from commit b8d3cc02cd)

Bug: 62356545
Test: make and flash

Merged-In: I8b777c8881cba6b11cda56d27f0a714c92d70d94
Change-Id: I8b777c8881cba6b11cda56d27f0a714c92d70d94
2017-07-28 11:17:09 -07:00
Mathieu Chartier 98f44b7f20 Install preopted profiles on device
They are stored in /system/etc/profiles/, these will be copied to
the over the data profiles during fist boot. This means is required
to avoid missing JIT samples for the preopt compiled methods.

(cherry picked from commit 44c9c076d3)

Bug: 38032017

Test: make and flash
Test: adb shell ls -l /system/etc/profiles/

Merged-In: Ia4573464ac39c4720e0d9e8a29b8ea4213bd9d78
Change-Id: Ia4573464ac39c4720e0d9e8a29b8ea4213bd9d78
2017-07-28 11:17:00 -07:00
Mathieu Chartier fcc8d8b26d Default profile usage based on the existence of the profile
Currently this only checks vendor/google_data/art_profile, but the plan
is to use a per product directory in the near future.

(cherry picked from commit 6324c2d291)

Bug: 38032017
Test: make and make sure the profile was used (calculator).

Merged-In: I8de6484dbcac5fc040ad70f97e97d193b317af8c
Change-Id: I8de6484dbcac5fc040ad70f97e97d193b317af8c
2017-07-28 11:16:53 -07:00
Mathieu Chartier 229d0534dc Use speed-profile instead of quicken for the profile case
Reduces calculator launch from 354 -> 325 with a profile.

(cherry picked from commit c5536ffbd3)

Bug: 38032017

Test: mm

Merged-In: I795a2d3f4db5546be4d77c3716e69d20d8f23549
Change-Id: I795a2d3f4db5546be4d77c3716e69d20d8f23549
2017-07-28 11:16:43 -07:00
Tobias Thierer 1d9689b3e7 Merge "Allow builds with costum toolchains." 2017-07-27 10:41:18 +00:00
Tobias Thierer 67352ffa1f Merge "Build: Experimental option to default to -source 1.9 -target 1.9" 2017-07-27 10:40:43 +00:00
Colin Cross 9143549df7 Merge "Revert "Compile with javac by default"" 2017-07-27 06:04:02 +00:00
Colin Cross 36062e8076 Revert "Compile with javac by default"
This reverts commit 268dfa4d91.

Bug: 36902714
Change-Id: I69edf1a52300b50c45bd02c203f8843963357506
2017-07-27 06:02:15 +00:00
Treehugger Robot 28989a9a22 Merge "Don't add .vendor suffix for vendor-only modules" 2017-07-26 23:57:41 +00:00
Jiyong Park a9c4c71756 Don't add .vendor suffix for vendor-only modules
Soong now adds .vendor suffix only for modules having both core and
vendor variants. Furthermore, names listed in LOCAL_SHARED_LIBRARIES
are correct (= have .vendor suffix when the dependent lib has variants).
Therefore, make does not need to force add .vendor suffix when parsing
modules from soong.

Bug: 37480243
Test: BOARD_VNDK_VERSION=current m -j <name> is successful, where <name>
is one of the vendor-only libraries in Soong. (i.e.
android.hardware.renderscript@1.0-impl)
Test: m -j does not break anything

Change-Id: Id8d0d01313c63496a10de4cd3ddb9f75180efef6
2017-07-27 08:54:43 +09:00
Colin Cross 262d597530 Merge "Compile with javac by default" 2017-07-26 23:52:34 +00:00
Colin Cross 268dfa4d91 Compile with javac by default
javac is replacing jack as the default compiler for platform builds.

Bug: 36902714
Test: m -j checkbuild
Test: https://android-build.googleplex.com/builds/view-workplan?viewType=Table&workplanId=L50600000086240009&nodeType=Trybot
Test: sailfish-userdebug boots and basic interactions work
Test: art tests pass
Test: libcore tests pass
Change-Id: I1c3857f64eafa445ad1b9dd94eff85bef05f4649
2017-07-26 23:42:23 +00:00
Dan Willemsen 76a75aa72d Merge "Only run Kati twice on a clean build due to clean_steps.mk" 2017-07-26 23:28:00 +00:00
Dan Willemsen 770a498e99 Merge changes I863200b2,Ifdd9663b
* changes:
  Run `uname -sm` once, don't use python for HOST_OS_EXTRA
  Stop calling `java -version`, remove HOST_JDK_IS_64BIT_VERSION
2017-07-26 21:31:05 +00:00
Tobias Thierer d61f28bf56 Build: Experimental option to default to -source 1.9 -target 1.9
Enabled via:

export EXPERIMENTAL_USE_OPENJDK9=true

Other nonempty values of EXPERIMENTAL_USE_OPENJDK9 will
allow OpenJDK 9 toolchains, but will still default to
-source 1.8 and -target 1.8.

Note that -source 1.9 and -target 1.9 does not currently
successfully build.

Test: Treehugger.
Bug: 38177569

Experimental flag to set LOCAL_JAVA_LANGUAGE_VERSION := 1.9

Change-Id: I9eb881b3fbd1806984a132f6da7b5a4cc6612247
2017-07-26 22:24:15 +01:00
Dan Willemsen ce7f8dd15a Run `uname -sm` once, don't use python for HOST_OS_EXTRA
This saves 20-50ms for `lunch` (~7-10%), and double that for every build
execution.

Test: Check HOST_OS_EXTRA on Linux & Mac
Change-Id: I863200b2287c8867f40606237895b1d3ad91e1b3
2017-07-26 10:49:22 -07:00
Dan Willemsen dc068b0762 Stop calling `java -version`, remove HOST_JDK_IS_64BIT_VERSION
All users of this variable have been removed. This command was adding
50-175ms to `lunch` (~15-30%), and was running at least twice (serially)
in every build too.

Test: cs/HOST_JDK_IS_64BIT_VERSION
Test: prebuilts/jdk/jdk8/linux-x86/bin/java -version, is 64-bit.
Change-Id: Ifdd9663b010ec45918b29ac037849f49c8cd8f69
2017-07-26 10:49:04 -07:00
Tobias Thierer 1b53ea0908 Allow builds with costum toolchains.
Android bundles an OpenJDK-derived toolchain to avoid issues with
unsupported toolchains. For development / experiment purposes, this
CL the toolchain to be overridden via OVERRIDE_ANDROID_JAVA_HOME.

It is an error for OVERRIDE_ANDROID_JAVA_HOME to be set but not
point to a valid toolchain, but this error is not explicitly
checked for.

Bug: 38177295
Test: Treehugger

Change-Id: I72f641f560501e498f9c86a4380f19941fca11ad
2017-07-26 17:54:11 +01:00
Treehugger Robot 2aef19528e Merge "Apks are again allowed to use vendor libs as before" 2017-07-26 00:45:24 +00:00
Colin Cross 1907b9905e Merge "Enable ubsan check flag in build" 2017-07-25 17:48:06 +00:00
Treehugger Robot 194893ee6c Merge "Make JAVA_HOME absolute inside build" 2017-07-25 04:37:40 +00:00
Dan Willemsen e6f756091c Only run Kati twice on a clean build due to clean_steps.mk
Write into a temp file, then use `cmp` to determine whether to update
the actual file. This means that we'll only run Kati twice on a clean
build, since we'll omit the redundant write during the regeneration
check.

Simplify writing using $(file >) instead of $(shell), which doesn't have
character count limitations.

Bug: 35970961
Test: m clean; m -j nothing; m -j nothing; m -j nothing
Test: Ensure clean_steps.mk is equivalent before/after
Change-Id: Id574f416647434ab8d11ed3481da21b55e8797b7
2017-07-24 21:16:38 -07:00
Colin Cross 3a1544ab1a Make JAVA_HOME absolute inside build
Export JAVA_HOME as an absolute path to commands running inside
a build.

Should fix errors invoking gradle from inside a build:
ERROR: JAVA_HOME is set to an invalid directory: prebuilts/jdk/jdk8/linux-x86
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.

Test: treehugger
Change-Id: I16e4482b2d74ede0843715be3b08c65ce33cf403
2017-07-24 19:27:31 -07:00
Colin Cross 45d2ef40f2 Merge "Use java prebuilts" 2017-07-25 00:39:42 +00:00
Steve Muckle 7397b59cca Merge changes I49e4a1a6,I668a396c
* changes:
  fix builds on macOS when kernel modules are used
  package modules.alias onto device
2017-07-24 21:40:21 +00:00