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
Bug: http://b/27482631
This fixes an issue where krait compiles were not passing the proper
flags to the assembler when -no-integrated-as is used. This was
preventing ART from switching to clang in some cases.
(cherry picked from commit c503d8ef58)
Change-Id: I4a0efb78f37fee73bf61841f0347328b8f61c192
As a middle way between full preopt/high performance/long builds,
and no preopt/low performance/fast turnaround, preopt only the
boot image in eng builds.
Bug: 26794212
Change-Id: I4a2692f3ce84823cd40c6b7d672fd73257739ef8
The rule that builds boot.art also produces boot.oat, boot-*.art, and
boot-*.oat as a side effect, and the install rule for boot.art was
installing them using *.art and *.oat. This meant that PDK builds had
no rule to install the extra files, so it used the ones from the
platform.zip file instead of the locally built ones.
Generate a list of the files that should be produced by the boot.art
build, and manually create install rules for them that depend on the
built boot.art and are depended on by the installed boot.art.
Bug: 27546601
Change-Id: I9734491c3179bca2d4b2ae13b0c6a03e4c26b0b2
Any artifacts that are targeting SDK versions < 24
and not explicitly setting the LOCAL_JAVA_LANGUAGE_VERSION
are now defaulted to 1.7.
Bug: 27495650
Bug: 26753820
Bug: 27377071
Change-Id: Ia903cd5bf14c1947c485384d095a93c0aa23d272
It is needed to insert testdata section into simpleperf cts test.
Bug: 27387280
Change-Id: I58cea106d135f535626d8624a016bd2aaceeb8ea
(cherry picked from commit 273e9109c1)
Calling $(abspath) is better than checking and prepending $(PWD) if
necessary.
Bug: 27429759
Change-Id: Ia156f8a5d6b88b6090f4d23c7f9166bd62d3ab70
(cherry-pick from commit 80ceadc945)
1. Combined ~10 calls to the make build system to only one.
We added a phony target "dump-many-vars" to the build system to dump
"<var>=<value>" pairs. We then store the pairs as shell variables.
With this cache get_build_var/get_abs_build_var can just return
the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.
In internal source tree lunch time was reduced from ~15s to ~1.5s.
Bug: 27429759
(cherry picked from commit 08800fd905)
Change-Id: I862a0ec3c1aae97c552054dacec133e857042edf
- For host Java libraries, java-lib-files should return javalib.jar.
- Host dalvik Java libraries are special: factor out
host-dex-java-lib-files.
- Be explict that jack-lib-deps equals jack-lib-files.
Bug: 27451686
Change-Id: I9235384354e119ef7ebbf29b7e525d1ceea242e0
Allows passing the *.base_fs or *.map files for system and vendor in
INTERNAL_SYSTEM_BASE_FS_PATH and INTERNAL_VENDOR_BASE_FS_PATH variables
respectively.
Internal Design Doc: go/incremental-ext4
BUG: 26839493
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
Change-Id: Ie57ef6dbfa6084268b6535fe0a673a3b4aaa6e2f
Signed-off-by: Mohamad Ayyash <mkayyash@google.com>
This will allow us to convert icu4j-icudata / icu4j-icutzdata
targets to "host" targets rather than "target" targets.
Right now they are forcing Jack off just so they can use
javac + jarjar (even though the resulting file is used on
host).
Bug: 27218410
Change-Id: I7062c698389d98b0dde5690280a9140c3b12cbf7
* changes:
Remove debug statement
Tell Soong about HOST_CROSS_*
Update to use the latest clang-2629532.
Use newest clang static analyzers.
Add 64-bit windows cross-compiles
We expect to build the module's own packare-res.apk from the
LOCAL_STATIC_ANDROID_LIBRARIES in this case.
Bug: 25958912
Change-Id: I4d0294c867f5fb636983d630493a3b188279cae9
Run jack with no outputs as a quick check for compilation errors and use
a timestamp to store that check was made.
Bug: 19069325
(cherry picked from commit 43084d9f49)
Change-Id: I9b84b503b28cfdfa245f91da0061ee3a79386b28
This configures Soong to build windows binaries, which requires support
for 64-bit windows binaries in BUILD_PREBUILT for USE_SOONG=true.
module_arch_supported.mk did not support 64-bit being the secondary
architecture when evaluating multilib conditionals. All other uses of
HOST_*_IS_64_BIT already check the proper version.
(cherry picked from commit d6e3b84185)
Change-Id: I99cb69ea1756b8258f15d3630c75c9ffe277aaef
When the build type changes (for example, from "shamu-userdebug"
to "shamu-user"), the build system doesn't delete all files
and start over. Rather, build artifacts from the old build type
are reused for the new build type.
This is problematic for the recovery SELinux policy, which differs
between build types. Reusing a userdebug policy on a user build
is inappropriate and could lead to security bugs.
Force the deletion of the recovery SELinux policy when changing
build types, so it can be properly regenerated. This is consistent
with how we treat the normal SELinux policy (see commit
a8b3d54101).
(cherry picked from commit 3cb10bbd3b)
Change-Id: I1d8ad7e06112777c66abed4546dadb85d35e33e1
* When WITH_STATIC_ANALYZER is set and non-zero, and clang compiler is used,
call new clang ccc-analyzer or c++-analyzer.
* Otherwise, if WITH_SYNTAX_CHECK is set and non-zero,
call compiler with -fsyntax-only.
* Replace "--sysroot=path" with "--sysroot path", to work with ccc-analyzer.
* ccc-analyzer executes the original compilation command to generate
object files before calling clang with --analyze to do static analysis.
* When clang is called with --analyze, macro __clang_analyzer__ is defined.
BUG: 13287788
(cherry picked from commit 765c1ea6d7)
Change-Id: I6e51e51ff4ed3ce514f60d090494dcdf6e520b04
This is mostly the same as the existing 2ND_HOST / HOST_CROSS support.
The interesting thing I did here was make x86 the 'first' architecture,
and x86_64 the second. This way LOCAL_MULTILIB := first defaults to
32-bit windows modules.
windows-x86/bin <- defaults to 32-bit executables
windows-x86/lib <- 32-bit libraries, like before
windows-x86/lib64 <- 64-bit libraries
windows-x86/obj <- 32-bit intermediates
windows-x86/obj64 <- 64-bit intermediates
Then modules are registered with the names:
host_cross_liblog <- 32-bit, like before
host_cross_liblog_64 <- 64-bit
Bug: 26957718
(cherry picked from commit 9ecbf83259)
Change-Id: Iab2d36e20d7002568c3534e7781e9ac8ab21a4a9
- Restore old ordering of resource files to match AAPT behavior
- Change the order in which overlays are processed.
Change-Id: I9da88f6b4124e7f89a70eb485b4591d5c4c87d38