javac-check covers all classes.jars that are compiled with javac
instead of jack. This target is required by tools that still need java
class files as input.
Bug: 26705771
Change-Id: I6896b9a6026a2a0dae6145d1ef5a839756aa3458
My previous attempt at properly handling symlinked OUT_DIRs only worked
if the symlink was to a different directory, not one in the same
directory.
This time, make sure that both make and soong use the same
representation of the output directory by passing BUILDDIR to
bootstrap.bash. Soong has been updated to pick whether to use a relative
or absolute path back to the source tree depending on what makes sense.
If the BUILDDIR or the path back to the source tree change, re-run the
bootstrap.
Also, move the $OUT_DIR/Android.mk and $OUT_DIR/CleanSpec.mk generation
to before Kati runs. In the case that $TOP/out was symlinked to
$TOP/out.angler:
1) Soong generates out.angler/soong/Android.mk
2) Kati's find generator produces in-memory tree of the filesystem
3) $(shell ) creates out.angler/Android.mk
4) The emulated findleaves Android.mk search finds
out.angler/soong/Android.mk since the in-memory tree is never updated.
This doesn't happen in the normal case, because we pass --prune=$OUT_DIR
to findleaves.
Change-Id: Ib0fdae2e80f75ddcf33a3c8c5ea0978f5308b437
To rebuild odex files of Java libraries and apps,
we store the jars/apks without stripping the classes.dex inside the
platform.zip. We also save the build variables that may affect how we
rebuild an odex in pdk_dexpreopt_config.mk in the platform.zip.
We store the files and configuration only for libraries/apps that get
installed to the system.img (or vendor.img).
In PDK fusion build, we auto-generate prebuilt module definitions for
the javalib.jar and package.dex.apk carried in the platform.zip, using
configuration stored in pdk_dexpreopt_config.mk.
With the prebult modules, we override the implicit rule that directly
copies the odex from the platform.zip.
To rebuild odex of javalib.jar, we added support for prebuilt shared Java
library to prebiult_internal.mk. An installable prebuilt Java library is
treated as shared Java library, i.e. with classes.dex in the jar instead
of a set of .class files.
For apks in the platform.zip, we install the stripped version from
platform files inside platform.zip, instead of the package.dex.apk,
using a new variable LOCAL_REPLACE_PREBUILT_APK_INSTALLED. We can't
strip package.dex.apk because we can't re-sign the stripped apk at this
point.
We generate prebuilt module only if it's not already defined in the
source tree.
Bug: 27543283
Change-Id: I9e146f8b713d6f57c397fd28d88c9ab700757ca1
And everything special-cased on that. Add a warning if USE_NINJA is
set to let users know that it no longer changes anything.
Change-Id: Ib8739151fe26ea6bf8f76b7ac2b8f4097dab0b47
Brillo does not require Java. Add a JAVA_NOT_REQUIRED
flag to the build system to make the jdk requirment optional
Also don't build signapk for Brillo
BUG: 25281898
Change-Id: I31e68cc7d076bf6c234699c77c0ea1ea428be4f5
Building an app with Jack and with the environment variable
EMMA_INSTRUMENT_STATIC set to true will apply code coverage
onto the app targeting Jacoco.
Bug: 20115492
Change-Id: Ief3640fa3faa466f7f6aaa9739e06d3db24110a0
Temporary revert to help out Brillo folks.
It will be resubmitted tomorrow.
This reverts commit 4495f6afb8.
Change-Id: Id378c7d3a6e72e9be50f9404b19d5763568987a5
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true
And run envsetup.sh/lunch again.
Bug: 25786468
Change-Id: I8e00591a24d13e3b8b6baaafe0fdff6536c58770
This reverts commit c288d65762.
The launch control change that switched various builds
to JDK 8 was reverted so JDK 8 can't be mandatory without
breaking builds.
Change-Id: I5e3feb21488d3bb57c5718cfe105a931eeaa9587
When USE_SOONG=true, ignore any Android.mk file that has an Android.bp
file in the same directory.
Change-Id: Id79bd90c2aed5dafc2f8ad2c5b7eb0aa6e81dc18
Reverting until all continuous builds that cover branches downstream of master can be updated to use JDK 8.
This reverts commit 1bd16b67c4.
Change-Id: Icb0daa440a6286e07d3cfd9ff8b082b4154ebc21
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true
And run envsetup.sh/lunch again.
Bug: 25786468
Change-Id: Iba08a9d3cf73bae7124e431dfe87c20ac219591e
In user builds, adb without authentication is always disabled. However,
it doesn't work with the defaults because authentication doesn't work
without having ro.adb.secure=1 set. It makes sense to offer builds with
no adb but not builds with adb present in an unusable state (especially
as the default).
Bug: 22220212
Bug: 21862859
Change-Id: Ic22300a70586fd57692ac59d6873ab16dde70919
Also install and update the server if necessary.
The target start-jack-server produces no file so it's always built.
Since the dependency is "order only", it doesn't cause force rebuilt of
jack targets after start-jack-server execution.
Bug: 25443108
Change-Id: I1608d87d186694d47307e00337b1905f0b8079c4
It should be the complete name with suffix .so to use libart.
At present, unnecessarily falls back like below.
"Falling back from libart to libart.so after dlopen error:
dlopen failed: library "libart" not found"
Change-Id: Ie5da35a71d6661434d2097c842407e6a254f8f58
Signed-off-by: randy.jeong <randy.jeong@samsung.com>
ANDROID_GOALS: any Android goals that need to be built.
KATI_GOALS: goals that we need to pass to Kati.
NINJA_GOALS: goals we need to pass to Ninja.
For modifier Android goals (dist, INTERNAL_MODIFIER_TARGETS),
we don't need to pass them to Ninja. See also commit
80e46c7c5c.
Restore the dist rule removed by the above commit.
Previously "droid" was never passed to Ninja. That's incorrect.
"make droid docs" should build both docs and droiod.
Fixed with this change.
Change-Id: I5c28061fe0ebe7848872ee349056d029b787ff71
- For unmodified "make product-graph" and "make dump-products",
load only the current product configuration makefiles. This is much
faster than loading all product makefiles.
- For "make product-graph ANDROID_PRODUCT_GRAPH=--all",
"make dump-products ANDROID_DUMP_PRODUCTS=all", load all product
makefiles.
- Move product-graph.mk out of build tasks, so we can skip loading all
the Android.mks, which takes long and we don't really need them.
More importantly, with all product makefiles loaded, modules in
Android.mks are prone to clash (if they are conditionally included
by variables set up in product makefiles) and lead to parse-time
error.
Change-Id: Idc1d6b0c23eb2c8bb34fdd7a1fa4d56171768d21
kati takes the first @echo command in a rule and turns it in to a ninja
description that gets pretty-printed. The GET-INSTALL-PATH is only
@echo commands and is parsed by development/testrunner/runtest.py, so
it fails to parse the pretty-printed first test.
Add a dummy @echo to GET-INSTALL-PATH for kati to use as the
description, so the rest of the @echo commands are left unmodified.
Change-Id: I192fde48b26726a2f6760448f819243bd2f21312
Version of Jack used to compile a module can now be control from
a dedicated mk located in prebuilts/sdk/tools
Bug: 24564814
(cherry picked from commit b68c9a498d)
Change-Id: I7809dc966026ff94b5cb2daa7e2c63762ca4768d
Distinguish between parsing makefiles in make for a pre-ninja build,
parsing makefiles in kati for a ninja build, and parsing makefiles in
make for a non-ninja build by leaving USE_NINJA=true enabled for the
kati pass but also setting BUILDING_WITH_NINJA.
Change-Id: I63f1ce1efe08cd86fdf41f8051901f720b38cfaf
The tests goal is not a parse time goal.
The checkbuild goal is only a parse time goal so that it doesn't result
in a circular dependency between droid and checkbuild when
ANDROID_BUILD_EVERYTHING_BY_DEFAULT is set. Get rid of the circular
dependency by making droid depend on droid_targets, and droid_targets
depend on the targets that are normally built for droid. checkbuild can
then always depend on droid_targets, and droid can condtionally depend
on checkbuild without introducing a circular dependency.
Bug: 24413153
Change-Id: I231d80e05ffe321384a5efbcdf5578f86ad84da0
Build with kati + ninja by default, unless specifically disabled with
USE_NINJA=false in the environment or on the make command line.
Bug: 23565895
Change-Id: I1fa9f5c6eb4d4ed3f5b81454f89d19fd2f1f6abb
Similar to installed-files.txt, installed-files-vendor.txt lists the
content of vendor.img.
Bug: 24009297
Change-Id: Ib8112b19cc9f54d0c0d6a829063e4fe72d8ce664
Instead of using recursive make to change the HOST_OS when building the
windows SDK under linux, add the concept of cross-building to another
host os.
Bug: 23566667
Change-Id: I6dc525b601b6251d458d197c30bf4660d7485502
We still support HOST_OS=windows for the SDK host tools cross-builds, but
that's only when USE_MINGW is set when running under linux.
Change-Id: I37da87dc9fbbd69ba10ce4d7f2668ab3f6482d92
This moves all of the date references under build/ to using a single
datetime that can be set manually using BUILD_DATETIME.
It also adds an option, OVERRIDE_C_DATE_TIME, that if set to true, will
redefine __DATE__ and __TIME__ for all C/C++ files so that it matches
BUILD_DATETIME.
Bug: 23117013
Change-Id: I7c17a32b794a5adf40b9cd69136fb0ff9f6084ec
This moves all of the date references under build/ to using a single
datetime that can be set manually using BUILD_DATETIME.
It also adds an option, OVERRIDE_C_DATE_TIME, that if set to true, will
redefine __DATE__ and __TIME__ for all C/C++ files so that it matches
BUILD_DATETIME.
Bug: 23117013
Change-Id: I880ef103a26bca86bd7bf42d58e62e740a6228c8
The build system removes targets like "PRODUCT-full-eng" from
MAKECMDGOALS in build/core/product_config.mk.
Without this change, such target isn't passed to kati.
Change-Id: I0b3949ed1f5557445d7f5d5bd59b7875c0b2ea7f
Fix mmma uses like "mmma ./external/apache-harmony" by removing the
leading ./ in entries in BUILD_MODULES_IN_PATHS.
Change-Id: I414e734c8a29434fc89ddb2b745613c33709c5e3
If USE_NINJA=true, use kati to translate makefiles into ninja files,
and then execute them with ninja.
Builds kati from source using simplified versions of the rules
in binary.mk and definitions.mk.
Adds two new goals when USE_NINJA=true: generateonly will regenerate
build.ninja but not rebuild (useful for comparing build.ninja output
between runs), and fastincremental will skip regenerating build.ninja
and go directly to running ninja, providing ~5 second incremental
builds.
Change-Id: Ib85399e730f1fbb1be7371fafeee7d1c31080771
- Deleted unused functions in definitions.mk.
- lint is never fully functional in the platform source tree.
- Retire LOCAL_DIST_BUNDLED_BINARIES: now the build system/framework
supports JNI embedded in apk.
Change-Id: I6314cb20d1544c704ccbc4c1f9cccb9c54fb5a51
Using $(BUILD_NUMBER) inside a rule causes odd behavior, as the rule
is different every time make is run, but since make doesn't depend
on the command line it only ends up being built with the new value
if some other dependency has changed.
To allow ninja, which does depend on the command line, to provide the
same behavior, store the build number in out/build_number.txt, and
use a shell expansion to cat the file in rules that use it. This will
cause the rule command to stay identical between builds, while still
getting the new build number if the rule is rerun for a dependency.
Also use the same trick for BUILD_FINGERPRINT, and the date in
droiddoc rules.
Change-Id: I6c5e6b6b3ef4c613563d7f5604df0e401575ba5f
Introduce a way to speed up local builds. Don't build all test
modules if ANDROID_NO_TEST_CHECK is set to true.
On master branch this reduces what is built by more than
300 apps and 50 java libraries. Time for doing this on a
12 core machine running with -j13 is about 10 minutes.
Change-Id: I90feb108695ee60d0dbbf497644f767cc3748215
These directories are excluded in addition to OUT_DIR.
This can be useful if your build system has other output directories
beyond what OUT_DIR is set to.
Change-Id: I6d98a85bcc8c89279e939406a7fec32547e8922f