Commit graph

726 commits

Author SHA1 Message Date
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
Colin Cross
e97e69359a Use java prebuilts
Point the make java variables at JDK prebuilts in
prebuilts/jdk/jdk8, add them to the path, and clean up
some old overrides.

Reapplies Ibbeb30fab96e45aedd5bb6d710d1170f85789982 after updating
some more manifests to include the prebuilts.

Bug: 62956999
Test: m -j checkbuild
Change-Id: I9e27aa5cb04d1ed09e43b798e5d654843afc000f
(cherry picked from commit 1931750940)
2017-07-20 15:14:26 +00:00
Colin Cross
4d69df5191 Merge "Revert "Use java prebuilts"" 2017-07-19 22:44:12 +00:00
Colin Cross
02112900cc Revert "Use java prebuilts"
This reverts commit 1931750940.

Change-Id: I7a99fd6c53d35a2a674f2d60b113a727f3c453ce
2017-07-19 22:42:46 +00:00
Colin Cross
26e1b6d6c2 Merge "Use java prebuilts" 2017-07-19 22:08:48 +00:00
Treehugger Robot
c7e3e962f8 Merge "Revert "Use dx.jar directly"" 2017-07-18 07:08:19 +00:00
Colin Cross
e44e75aa89 Revert "Use dx.jar directly"
This reverts commit e37a3c959a.

Reason for revert: breaks art test runner

Change-Id: Ice0cd3020ddec7f31eb789867a45f047a75a05d0
2017-07-18 05:22:59 +00:00
Colin Cross
c68434c971 Merge "Use dx.jar directly" 2017-07-17 20:40:13 +00:00
Jeff Gaston
483fae7430 Merge "Update to latest jacoco usage" 2017-07-17 20:36:39 +00:00
Colin Cross
1931750940 Use java prebuilts
Point the make java variables at JDK prebuilts in
prebuilts/jdk/jdk8, add them to the path, and clean up
some old overrides.

Bug: 62956999
Test: m -j checkbuild
Change-Id: Ibbeb30fab96e45aedd5bb6d710d1170f85789982
2017-07-14 14:18:53 -07:00
Jeff Gaston
aaae43cd24 Update to latest jacoco usage
Bug: 36792868
Test: EMMA_INSTRUMENT_STATIC=true m -j

Change-Id: I419b543283b52be9a72f5c6b10e4cbea68782174
2017-07-14 13:04:05 -07:00
Tianjie Xu
b0a29ad8c2 Generate brotli compressed {}.new.dat for full OTA
Brotli has a better compression ratio than deflation. So for non-AB
full OTA, we can compress the new.dat with brotli first and store it
in the zip package.
This increase the OTA generation time by ~5 minutes for a full OTA
(measured based on 2.0G system.new.dat)

Bug: 34220646
Test: Generate a full OTA for bullhead
Change-Id: I9c0550af8eafcfa68711f74290c8e2d05a96648f
2017-07-14 10:53:21 -07:00
Colin Cross
e37a3c959a Use dx.jar directly
Use $(JAVA) to invoke dx.jar instead of the dx wrapper script.
Also allow the dx command line or the dx jar to be specified on
the command line.  Allows better dependencies on dx.jar, and
doesn't rely on having java on the path.

Bug: 62956999
Test: m -j checkbuild
Change-Id: I5f265132690ad28b3139954fea44eb0c4a43393a
2017-07-07 13:34:33 -07:00
Colin Cross
cd20d5980c Refactor prebuilt tools
Put the prebuilt and non-prebuilt tools selections into the two
clauses of an if block to simplify the next patch.

Test: m -j checkbuild
Change-Id: Idd01bc81a2b619f7fc23df7566a01b46598433a3
2017-07-07 18:16:28 +00:00
Bryan Eyler
d4794315ff Re-compute DX command if it changes for PDK.
Bug 62360631
Tested build of PDK.

Test: builds
Change-Id: I7cbd649a8a3ce4326e513d5a808b76fbb011d99e
Merged-In: I7cbd649a8a3ce4326e513d5a808b76fbb011d99e
(cherry picked from commit af4bde4239)
2017-07-06 16:22:01 -07:00
Colin Cross
0851df8c82 Provide make variables for java binaries
Replace java -> $(JAVA), etc. to prepare for moving java binaries
out of the path and using full paths to them.

Test: builds
Bug: 62956999
Change-Id: I5dfcd0d4e855ecde69cd127169e9545e59723d12
2017-07-01 01:03:14 +00:00
Colin Cross
b12d4b7ac2 Get java config from soong
Soong will export java config variables.

Test: builds
Change-Id: If185543f8f36a30e7632946c16351d44f012bd6a
2017-06-22 17:21:05 -07:00
Mariano Giardina
1e14bc3b7b Merge "Revert "core: Move core.oat bootjar definitions into core/config"" 2017-06-15 11:01:29 +00:00
Mariano Giardina
2f137ee118 Revert "core: Move core.oat bootjar definitions into core/config"
This reverts commit 8c50798243.

Possible culprit of breakage in git_master sdk_google_aw_x86:
FAILED: out/target/product/generic_x86/dex_bootjars/system/framework/x86/boot.art 
ex2oatd E 06-15 03:56:00 47990 47990 runtime.cc:1761] Failed to return pre-allocated NoClassDefFoundError
dex2oatd F 06-15 03:56:00 47990 47990 thread.cc:3591] Check failed: new_exception != nullptr 

Testing if Treehugger passes with the rollback before submitting

https://android-build.googleplex.com/builds/submitted/4101897/sdk_google_aw_x86-sdk/latest/view/logs/build_error.log

Change-Id: Iceac31e775eaf3cd5fd9b3d2a17d3af200e35b27
2017-06-15 10:14:51 +00:00
Treehugger Robot
aa09aa819f Merge "Set JAVAC_WRAPPER if USE_GOMA is set." 2017-06-15 07:28:26 +00:00
Igor Murashkin
8c50798243 core: Move core.oat bootjar definitions into core/config
TARGET_CORE_JARS and HOST_CORE_JARS define the minimal
bootclasspath jars necessary to run with dalvikvm/art.

Also refactor PRODUCT_BOOT_JARS to reuse TARGET_CORE_JARS.

(These changes are required to figure out what --bootclasspath_entry
to pass to desugar).

Bug: 36902714
Test: make -j32 && make -j32 build-art-host build-art-target
Change-Id: I620e28be41047a1d501d7f144fe415ee4a0af36f
2017-06-14 10:02:09 -07:00
Yoshisato Yanagisawa
4f3e5685fc Set JAVAC_WRAPPER if USE_GOMA is set.
Now, people can also use goma for building javac.  Let me make it by
default.

Test: USE_GOMA=true m -j4
Bug: 62334576
Change-Id: I941ce42dc0f9cbd0dcc00e6fd19368c3af11695f
2017-06-14 07:57:54 +00:00
Dan Willemsen
ccc48163ea Fix ALLOW_MISSING_DEPENDENCIES in PDK builds
ALLOW_MISSING_DEPENDENCIES was being set up before TARGET_BUILD_PDK, so
PDK builds were not triggering ALLOW_MISSING_DEPENDENCIES.

Bug: 62086238
Test: m -j nothing (check out/soong/soong.variables for AllowMissingDependencies)
Test: PDK_FUSION_PLATFORM_ZIP=test.zip m -j nothing (check AllowMissingDependencies)
Change-Id: I70919fbc7e397e55356cb467c6218cf6e7279c6c
2017-06-02 15:25:20 -07:00
Treehugger Robot
b5e90583ef Merge "Move math function definitions." 2017-06-02 00:11:04 +00:00
Steven Moreland
a64f33668e Move math function definitions.
Created math.mk and moved all math function definitions there.
Then, included this file in config.mk. This allows the functions to be
used by whatever includes config.mk (envsetup and build).

Test: manually setting combinations of PRODUCT_SHIPPING_API_LEVEL
  and PRODUCT_FULL_TREBLE_OVERRIDE and looking at values of
  PRODUCT_FULL_TREBLE.
Bug: 62229856
Change-Id: Icdab4214a1e65ae202411613dbcb9c9ea5f43b09
2017-05-31 20:41:49 +00:00
Treehugger Robot
dddd7738d0 Merge "Update RenderScript build config and definitions." 2017-05-26 22:29:36 +00:00
Miao Wang
a9fed83fae Update RenderScript build config and definitions.
Bug: 38342163

  - obj/lib is deprecated and TARGET_OUT_INTERMEDIATE_LIBRARIES will be
  removed. We need to use per-module intermediates directory instead.
  - prebuilts/ndk/current folder is gone. For libm and libc, we just
  need ndk/r10 as stub libs for linking.

Test: mm and made sure this does not affect on device target.
Test: make -j50 FORCE_BUILD_RS_COMPAT=true RSTest_Compat works as
expected.

Change-Id: I8fbf5c10322707849a23c6b0dacc28b028db451e
2017-05-26 13:48:08 -07:00
Dan Willemsen
562baccae8 Remove the rest of showcommands, dist goal
showcommands is all handled in soong_ui, make/kati/ninja never see the
argument.

Remove the dist goal, since we'll never pass it to ninja, only to Kati
as a modifier.

Remove DUMP_%, since that's not used anywhere (it appears to be in our
code search via the NDK build system)

Test: m -j showcommands dist
Change-Id: I0d1498128caece685e98c2c2b5b0c3f545da0e11
2017-05-26 12:57:04 -07:00
Treehugger Robot
5d80b734f2 Merge "Move dataclean and installclean to soong_ui" 2017-05-23 22:32:34 +00:00
Treehugger Robot
d5f8deb3ac Merge "Makefile: copy mke2fs.conf to ota root" 2017-05-23 19:45:37 +00:00
Tobias Thierer
00e3bd93da Merge "Make: Don't rely on presence of tools.jar in toolchain." 2017-05-22 09:33:31 +00:00
Tobias Thierer
3c4c0b6ab3 Make: Don't rely on presence of tools.jar in toolchain.
Some cts, doclava and javassist code uses private APIs that require
tools.jar to be on the classpath when building with the standard
OpenJDK 8 toolchain. However, OpenJDK 9 toolchains do not have this
file nor require it to be on the classpath. The reliance on the
presence of tools.jar means that AOSP can currently not build on
such toolchains.

After this CL, when EXPERIMENTAL_USE_OPENJDK9 is set, the value of
HOST_JDK_TOOLS_JAR is empty.

That flag can be set via:

export EXPERIMENTAL_USE_OPENJDK9=true

and unset via:

unset EXPERIMENTAL_USE_OPENJDK9

Test: make checkbuild (using OpenJDK 8 toolchain)
Test: manually confirmed that device boots
Bug: 38177295
Change-Id: Icc5451b51e44a574fd21024d434ed1fa8711de17
2017-05-20 14:17:05 +01:00
Steven Moreland
2b32469c47 Add soong variable for PRODUCT_FULL_TREBLE.
Required to preserve sane defaults for old codebases.

Test: inspect soong.variables
Test: ensure PRODUCT_SHIPPING_API_LEVEL is set in config.mk
Bug: 38415912
Change-Id: I0244fb02754663be3106391c9360fd1b2cc00d4a
2017-05-18 17:16:09 -07:00
Dan Willemsen
0f2ab46038 Move dataclean and installclean to soong_ui
This can be a little faster, but also means that we don't need to call
kati/ninja twice when we need to handle the automatic installclean.

Test: m -j installclean
Test: m -j dataclean
Change-Id: I8f5e5544bcf30c58bf9abee30a37256cb18436ac
2017-05-18 13:42:40 -07:00
Jin Qian
3bac9b132e Makefile: copy mke2fs.conf to ota root
Bug: 34947454
Change-Id: I99999c4f56df295c0bb028daf3dcc0898176c5ed
(cherry picked from commit 53524b5da9)
2017-05-16 17:33:22 -07:00
Treehugger Robot
26d769ea3f Merge "Allows DX alternative Jar." 2017-05-16 21:50:49 +00:00
Alan Leung
83857b6cbd Allows DX alternative Jar.
Test: m -j20 ANDROID_COMPILE_WITH_JACK=false DX_ALT_JAR=/mnt/m02/dx_alt.jar

Change-Id: I6163280101ff973bc8202a82d2fed42cf0ce6209
(cherry picked from commit b147846b67)
2017-05-16 13:34:42 -07:00
Dan Willemsen
bd8ac3284d Move clean/clobber to soong_ui
So that we don't have to load up all the makefile state just to remove
the output directory.

Starting from a completely empty out directory:
 kati:    16s
 soong_ui: 2.0s

From a minimal out directory (m -j blueprint_tools):
 kati:     3.8s
 soong_ui: 0.4s

Test: m -j clean
Test: m -j clobber
Change-Id: Iec1ce032c7cc7ed102430080e857fc421b66309c
2017-05-15 14:02:38 -07:00
Colin Cross
f899251e12 Clear LOCAL_JACK_ENABLED for ANDROID_COMPILE_WITH_JACK=false
CL I2189055aac9deccc36b8eab8e949796dddadf7a1 moved the
ANDROID_COMPILE_WITH_JACK=false check to configure_local_jack.mk,
which broke some modules that use ifndef LOCAL_JACK_ENABLED to
change their behavior we jack is disabled.  Clear
DEFAULT_JACK_ENABLED when ANDROID_COMPILE_WITH_JACK=false so
that LOCAL_JACK_ENABLED is cleared.

Bug: 37483961
Test: m -j checkbuild
Change-Id: I0d08946c57182689624c57f4952d7cecaa0b82b3
2017-05-02 18:58:29 -07:00
Tao Bao
3465f2ad56 Merge "Add the missing dependency on payload generation script." 2017-05-02 23:42:44 +00:00
Colin Cross
b17f285169 Support LOCAL_JACK_ENABLED := javac_frontend
Allow working around Jack bugs by using javac to compile *.java
to class files, and then pass through Jack for desugaring,
proguarding, and dexing.

Also make ANDROID_COMPILE_WITH_JACK=false override LOCAL_JACK_ENABLED.

Bug: 37483961
Test: m -j checkbuild
Test: Add LOCAL_JACK_ENABLED := javac_frontend to a target
Change-Id: I2189055aac9deccc36b8eab8e949796dddadf7a1
2017-04-28 13:39:12 -07:00
Tao Bao
e53c6e7200 Add the missing dependency on payload generation script.
For A/B OTAs, ota_from_target_files.py calls brillo_update_payload
script to generate the payload entry in an A/B OTA package.

Bug: 37443093
Test: lunch aosp_marlin-userdebug && rm
      out/host/linux-x86/bin/brillo_update_payload && m otapackage
Change-Id: I3845786b6c934c709f32e12a63cd6ea1f303d380
2017-04-19 21:30:15 -07:00
Colin Cross
5f89212e24 Filter and colorize javac output V3
Add soong_javac_wrapper to all javac commands. soong_javac_wrapper
colorizes javac output, and hides noisy messages.

Previously attempted in I7e8fcd2e4e1ed3ff530a8ccfe931ceb7e411e0ad
and I449a61ed2c95b3e1afd51a31a11baab15d97e2f2.

Test: m -j ANDROID_COMPILE_WITH_JACK=false
Change-Id: I9d7a20d766fadab323a4cf95e5734741b3f578bb
2017-04-18 21:04:58 +00:00
Treehugger Robot
df69a927d8 Merge "Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""" 2017-03-30 00:53:06 +00:00
Colin Cross
fc8ead6609 Revert "Revert "Revert "Add soong_javac_filter to all javac commands"""
This reverts commit 440079b84b.

Adding the pipe interferes with error codes, which results
in an empty classes-full-debug.jar output file being left
after the failure.  The next build sees the output file with
an up-to-date timestamp and doesn't rerun the failing rule.

Bug: 36666657
Change-Id: I6658edb766d8ba3120f88e3d8d6eda6ea6c691da
2017-03-29 21:01:24 +00:00
Makoto Onuki
9fe97e231b Add USE_FILESLIST_GO to switch to fileslist.go
fileslist.go is still disabled by default.  To enable, use:
USE_FILESLIST_GO=true m -j

Bug: 36274890
Test: Manual, with m -j

Change-Id: I722e17fa7fb6ba91e2b2c44cd7524d974cbe4a56
2017-03-24 16:12:16 -07:00
Treehugger Robot
df58de6303 Merge "hardware/interfaces: Android.mk always -Werror" 2017-03-08 23:16:35 +00:00
Steven Moreland
324c436084 hardware/interfaces: Android.mk always -Werror
Bug: 35840847
Test: pass
Change-Id: I6ebf3f5d279ff405446592cdabaeca9d1fdf6cf9
2017-03-08 16:29:50 +00:00
Steven Moreland
a2e734d786 Add vnod.
Short name for vendorimage-nodeps like snod.

Bug: 33356516
Test: works
Change-Id: Iad62aa5a021d603fa9cebe90f4e28cf09d5d49ae
2017-03-07 12:17:51 -08:00
Howard Chen
adbb9c30d1 Support kernel modules in vendor, recovery images
Support BOARD_VENDOR_KERNEL_MODULES which accepts a list of the
kernel module binaries. Binaries listed there are copied to
$(TARGET_OUT_VENDOR)/lib/modules and 'depmod' is executed to generate
the dependencies. BOARD_RECOVERY_KERNEL_MODULES is similarly
implemented to provide a way to specify kernel modules to be copied
to the recovery image.

Bug: 33305644
Test: android master build on marlin and load dummy modules
Merged-In: I0a58a270dbb0d2d38fd089f4abff66e62e14fac1
Change-Id: Ia5f429508ca3d7c77448358e42af6efa98fa8624
2017-03-03 18:35:30 -08:00