Commit graph

8888 commits

Author SHA1 Message Date
Yohann Roussel
ee57268cd7 Use Jack to check build
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
2016-03-01 16:34:08 +01:00
Dan Willemsen
d4390d3007 Remove unused config variables
These either don't exist or are not used.

Change-Id: I219e4691337223357797fae47ce112df8428bdfa
2016-03-01 01:14:03 -08:00
Dan Willemsen
de17aac9a0 Merge "Remove special cases in installclean"
am: fc7c3d33b8

* commit 'fc7c3d33b8b32042f8c12687fd269270b4e8ec90':
  Remove special cases in installclean
2016-03-01 07:06:44 +00:00
Dan Willemsen
fc7c3d33b8 Merge "Remove special cases in installclean" 2016-03-01 07:04:40 +00:00
Dan Willemsen
3545eeb6c1 Remove destination before copying file
If there's a symlink as the destination to one of these macros,
currently we'll write to the destination of that symlink instead of
overwriting the symlink. We've run into this a few times when a module
is added to replace a symlink that used to exist via
LOCAL_POST_INSTALL_CMD. These have required manual discovery, and
additions to CleanSpec.mk files:
http://android-review.googlesource.com/143334

Use `rm -f` for single-file targets to remove the destination before
copying. On Linux, `cp --remove-destination` can work, but is not
supported by Darwin or acp.

There may still be problems with dependencies when symlinks are
involved, since ninja will use the destination of the symlink to check
whether it is up to date. But at least with this change, if any
dependency gets regenerated, we'll properly reset the file.

Change-Id: I6d3ac0bd9ced5e21a0ff9dad0eaff012a7bc9c75
2016-02-29 22:22:29 -08:00
Olof Johansson
5cbf049710 Merge "sandybridge setup: no AES_NI, AVX, MOVBE"
am: b044f082e6

* commit 'b044f082e62dd8ac3d2a08b209c95842fb30838e':
  sandybridge setup: no AES_NI, AVX, MOVBE
2016-02-29 23:27:59 +00:00
Olof Johansson
b044f082e6 Merge "sandybridge setup: no AES_NI, AVX, MOVBE" 2016-02-29 23:27:04 +00:00
Dan Willemsen
7574cb582d Remove special cases in installclean
When switch build types or products, it's no longer necessary to special
case these projects that change their command line based on the build
type or product. Ninja keeps track of the command line last used to
create a file, and will mark it as dirty if the new command line is
different.

Change-Id: I905ff9599eae2952bddc05e7328f77f0849be20a
2016-02-29 15:15:16 -08:00
Dan Willemsen
d73633c082 Merge "Remove USE_NINJA=false"
am: 3bfc095f53

* commit '3bfc095f5373ca1756923f8aacdebdadc8ebd4ea':
  Remove USE_NINJA=false
2016-02-29 22:17:29 +00:00
Dan Willemsen
3bfc095f53 Merge "Remove USE_NINJA=false" 2016-02-29 22:16:14 +00:00
Ari Hausman-Cohen
746f40236b Adding a brillo_tests task.
Places whitelisted brillo tests and the whitelist itself
in a zip when run.

BUG: 27385399
Change-Id: I93c2ea8cc521292a6de811bb47bc87a727edd21f
TEST: manual make dist brillo_tests, confirmed desired files were in zip.
2016-02-29 13:48:06 -08:00
Nick Kralevich
7cf7bc0956 Merge "delete recovery policy on changing build types"
am: 1888ea5fef

* commit '1888ea5fef5f41ec3298bfd67f14b06e6dfb6f9c':
  delete recovery policy on changing build types
2016-02-29 16:46:08 +00:00
Nick Kralevich
1888ea5fef Merge "delete recovery policy on changing build types" 2016-02-29 16:44:37 +00:00
Nicolas Geoffray
efe15f7429 Merge "Check LEGACY_USE_JAVA7 before using 1.8."
am: 239783a7ff

* commit '239783a7ff9691ec92034f0268eeebbe75e906e3':
  Check LEGACY_USE_JAVA7 before using 1.8.
2016-02-29 12:29:31 +00:00
Nicolas Geoffray
8d772e26b4 Check LEGACY_USE_JAVA7 before using 1.8.
Fixes current bots not updated to Java8 yet.

Change-Id: I61f5a3f0de6ca0ee9eca64f0ee08454f93e59704
2016-02-29 12:08:42 +00:00
Shinichiro Hamaji
8f9b8ddf00 Merge "Link everything in libpthread.a to ckati"
am: a9b464770b

* commit 'a9b464770bf2a2a2cff279eb6042477786798d24':
  Link everything in libpthread.a to ckati
2016-02-29 11:05:46 +00:00
Shinichiro Hamaji
a9b464770b Merge "Link everything in libpthread.a to ckati" 2016-02-29 11:04:36 +00:00
Neil Fuller
59a8afcc88 Merge "Change the default for LOCAL_JAVA_LANGUAGE_VERSION from 1.7 to 1.8"
am: 008ebe4f04

* commit '008ebe4f04e41ef500bdbcab1b58cadcaec54cb5':
  Change the default for LOCAL_JAVA_LANGUAGE_VERSION from 1.7 to 1.8
2016-02-29 10:59:44 +00:00
Neil Fuller
008ebe4f04 Merge "Change the default for LOCAL_JAVA_LANGUAGE_VERSION from 1.7 to 1.8" 2016-02-29 10:58:09 +00:00
Nick Kralevich
3cb10bbd3b delete recovery policy on changing build types
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).

Change-Id: I4ebafe3712dc121644828f6538865061aad58cc0
2016-02-27 10:41:41 -08:00
Dan Willemsen
1c6dc5b942 Remove USE_NINJA=false
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
2016-02-26 21:48:31 -08:00
Colin Cross
44c7b4b80b Merge "Make multiple rules to generate a file an error"
am: 5e2e53e421

* commit '5e2e53e4216300aa841d65f95dd607be58983a14':
  Make multiple rules to generate a file an error
2016-02-27 05:14:02 +00:00
Dan Willemsen
5e2e53e421 Merge "Make multiple rules to generate a file an error" 2016-02-27 05:12:28 +00:00
Neil Fuller
db47d66b5e Change the default for LOCAL_JAVA_LANGUAGE_VERSION from 1.7 to 1.8
Modify the compiler flags for Jack and javac.

This has the following effects:
1) Generally, some of the type inference rules changed.
2) javac: bytecode is generated with the v52 major version (not v51)
3) jack: Java 8 language features are supported.

The javac / dx toolchain does not support Java 8 language features.

Bug: 26753820
(cherry picked from commit fda1ace26116a6677cc77c92c24e5259817fb86e)

Change-Id: I07769de473775d95b13feb38c0eb37086eb120f7
2016-02-26 14:56:38 +00:00
Shinichiro Hamaji
f4511161d5 Link everything in libpthread.a to ckati
With this workaround, we can delete a lot of unnecessary code
in ckati: https://github.com/google/kati/commit/8380fb8525adfb5

Change-Id: I3de1bf4cd6f2a65ee9322e8504459621871612fc
2016-02-26 17:03:55 +09:00
Dan Albert
2b8c384da3 Merge "Add a global define for non-external code."
am: 036b4fce25

* commit '036b4fce2516dfa755f6f9e5566b537ca81de5db':
  Add a global define for non-external code.
2016-02-25 22:20:40 +00:00
Dan Albert
036b4fce25 Merge "Add a global define for non-external code." 2016-02-25 22:17:42 +00:00
Dan Albert
5ae31ddedc Add a global define for non-external code.
There are some code policies we want to enforce more strictly, but
it's hard to do so for third party code because we have to either
carry the diff burden or upstream the patch, and in the latter case
the turnaround time for fixes can be problematic, and sometimes
upstream won't accept changes (sometimes people just need to win the
obfuscated C contest).

We define ANDROID_STRICT for any code that we expect to be able to
make these policy fixes as we change policies.

Change-Id: I15faf62cec1932dd859a082f66942b2606d0ff45
2016-02-25 12:25:43 -08:00
Ying Wang
7daeda5b80 Merge "Don\'t ignore LOCAL_INIT_RC if LOCAL_INIT_RC_32/64 is used."
am: 0e0e95e592

* commit '0e0e95e592d3538dc2e816e6d5291231b0cd47c7':
  Don't ignore LOCAL_INIT_RC if LOCAL_INIT_RC_32/64 is used.
2016-02-25 18:32:54 +00:00
Ying Wang
41d66783c4 Don't ignore LOCAL_INIT_RC if LOCAL_INIT_RC_32/64 is used.
It's a valid situation for all three of LOCAL_INIT_RC, LOCAL_INIT_RC_32,
and LOCAL_INIT_RC_64 to be used.

Bug: 26773181
Change-Id: If9661f93b1823279075fc3d55195f7a939e01b6f
2016-02-24 17:34:52 -08:00
Alex Light
e7e8cfb849 Merge "Mark the cortex-{a7,a53,a53.57} chips as supporting LPAE"
am: 4859b22e7d

* commit '4859b22e7ddd9ee95e603cf93676eb1dfc392b71':
  Mark the cortex-{a7,a53,a53.57} chips as supporting LPAE
2016-02-24 23:30:52 +00:00
Alex Light
4859b22e7d Merge "Mark the cortex-{a7,a53,a53.57} chips as supporting LPAE" 2016-02-24 23:26:02 +00:00
Alex Light
bdfeb3e760 Mark the cortex-{a7,a53,a53.57} chips as supporting LPAE
Bug: 27340895
Bug: 27324856

Change-Id: Id3994c6d334c8bb673fc3849550f591136a8dd6a
2016-02-24 13:54:11 -08:00
Stephen Hines
7882922ed0 Merge "Update to use the latest clang-2629532."
am: 78014dbaf6

* commit '78014dbaf6f7dc4894ab96a18da3635bc83df665':
  Update to use the latest clang-2629532.
2016-02-24 21:40:16 +00:00
Stephen Hines
352bccb65e Update to use the latest clang-2629532.
Bug: http://b/25642296
Change-Id: Ib6c94bc57f7145c1cc9b14338126132fc4648509
2016-02-23 21:58:06 -08:00
Olof Johansson
593eb7b8d7 sandybridge setup: no AES_NI, AVX, MOVBE
Sandy Bridge actually doesn't have all of these options. For example AVX is only
available on the higher-end SKUs (not on Celeron G550).

Change-Id: Ib595a9a6b464626d0c88525c6aaa4d69176645cc
2016-02-23 20:42:42 -08:00
Dan Willemsen
25afe2deec Merge "Warn more clearly when there are duplicate copied headers"
am: ca4b755563

* commit 'ca4b755563aa8d6d7544b38067bb82567f5fa255':
  Warn more clearly when there are duplicate copied headers
2016-02-23 23:53:58 +00:00
Dan Willemsen
ca4b755563 Merge "Warn more clearly when there are duplicate copied headers" 2016-02-23 23:46:25 +00:00
Colin Cross
a65f1aee84 Make multiple rules to generate a file an error
Pass -w dupbuild=err to ninja to make defining multiple rules to build a
file an error instead of a warning.  Proceeding with the build would
result in undefined behavior, and nobody notices the warning.

Change-Id: Iadac88f8835121a8685bff835acba638100bb654
2016-02-23 15:40:11 -08:00
Dan Willemsen
6f60f020d7 Warn more clearly when there are duplicate copied headers
When more than one makefile tries to copy a header to the same
destination, the warning is not clear, and hard to track down and assign
blame:

build/core/copy_headers.mk:15: warning: ignoring old commands for target `out/target/product/bullhead/obj/include/qcom/display/copybit.h'

With this change, the same behavior is kept, but the warning message is
more descriptive, and contains the offending Android.mk files:

build/core/Makefile:54: Duplicate header copy: out/target/product/bullhead/obj/include/qcom/display/copybit.h
build/core/Makefile:54: Defined in: hardware/qcom/display/msm8994/libcopybit/Android.mk hardware/qcom/display/msm8994/libcopybit/Android.mk

In this case, a $(CLEAR_VARS) is missing, so the same Android.mk file is
copying the same headers twice.

Bug: 27302058
Change-Id: Icf8f580ae71a78741db21c1d8f3213424459e637
2016-02-23 13:40:07 -08:00
Ying Wang
e087824722 Merge "Make sure my_src_jar is set up properly for host prebuilt jar"
am: de4078449f

* commit 'de4078449fd9764d1a63469d6efb0d90b9265ff9':
  Make sure my_src_jar is set up properly for host prebuilt jar
2016-02-23 18:09:22 +00:00
Ying Wang
86e74b96fc Make sure my_src_jar is set up properly for host prebuilt jar
Make sure my_src_jar is set up properly for host prebuilt jar when we
need to generate host .jack for host dalvik java libraries.

Change-Id: If85e27147cdc6e6a7a154c1cf308f9d0a71ff068
2016-02-22 16:17:36 -08:00
Elliott Hughes
466a220aed Merge "clang now supports -fdebug-prefix-map=."
am: 622179a175

* commit '622179a17501448a87cfec3a9bc21ea0398cb873':
  clang now supports -fdebug-prefix-map=.
2016-02-20 00:34:07 +00:00
Elliott Hughes
eb295fccb4 clang now supports -fdebug-prefix-map=.
Change-Id: Id0569831f09845871d8e6990c310516bea5a2510
2016-02-19 13:34:57 -08:00
Bill Yi
4a459aee75 Merge commit '75bbddecaa9f9d82c2f2751b389188f0a41e3284' into HEAD 2016-02-17 09:50:15 -08:00
Yohann Roussel
505dafb03b Add support for testing obfuscated app with Jack
Bug: 17481317

Change-Id: I80cb4e3991e858a39e7415fb7f1896d6992c950f
2016-02-17 16:01:58 +00:00
Sami Tolvanen
3e0fdfba85 Merge "Clear logd intermediates" 2016-02-16 21:52:13 +00:00
Dan Willemsen
69a4592aa5 Merge "Define a class for renderscript bitcode files" 2016-02-16 21:23:36 +00:00
Neil Fuller
c155d7d1aa Add new package: java.util.function
Bug: 26814204
(cherry-picked from commit 9429a880a3)

Change-Id: Ibd4f7a985ddcdb7564a79326ce846257882e294f
2016-02-16 11:49:14 +00:00
Dan Willemsen
c6e194ffad Define a class for renderscript bitcode files
These have been using SHARED_LIBRARIES, but aren't elf shared libraries.
Continue installing them to /system/lib[64], but do not apply any other
normal shared library logic to them.

Change-Id: I3055ff86bb7b116c7107c41578ed6f0f304b1cf1
2016-02-13 00:19:40 -08:00
Dan Willemsen
0a0b9d7bb8 Merge "Remove debug statement" 2016-02-12 23:41:37 +00:00
Chih-hung Hsieh
82953d72ac Merge "Use newest clang static analyzers." 2016-02-12 17:33:40 +00:00
Chih-Hung Hsieh
765c1ea6d7 Use newest clang static analyzers.
* 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

Change-Id: I5edb25b52998d871385dd000778db2ce83224078
2016-02-11 16:43:51 -08:00
Tao Bao
3124af3028 Makefile: Add the missing library in otatools.zip.
With the change in [1], delta_generator now needs
libprotobuf-cpp-lite.so instead of libprotobuf-cpp-lite-rtti.so to
generate A/B payloads.

[1] commit ab5bd668f6be600a8cceb8772e426c0aa902a5e1

Bug: 27145830
Change-Id: Ib9a93bf0fbe7fa44fc5fb94668d17fa1a2e07b05
(cherry picked from commit fdd2693b65)
2016-02-11 10:50:05 -08:00
Sebastien Hertz
91d20b06f5 Merge "Remove usages of jill.jar, use jack instead" 2016-02-11 08:48:44 +00:00
Sami Tolvanen
d7da0ffb20 Clear logd intermediates
Needed by changes from
  Idcdc5bff133f13c1267f0ec0a75cc8cf1ddbda0d

Bug: 26902605
Change-Id: Id3ca7889ede30b54b7af73dd50653ca1a20d59aa
2016-02-10 15:41:03 -08:00
Dan Willemsen
dbf0792279 Remove debug statement
Change-Id: Ic8b6082a61e2fb1b09b2b254312d3dc7ef59d987
2016-02-10 14:40:08 -08:00
Alex Klyubin
07d3dbd2ed Merge "Sign APKs using SHA-256 instead of SHA-1 when possible." 2016-02-10 21:35:06 +00:00
Dan Willemsen
a9556b33ff Merge "Tell Soong about HOST_CROSS_*" 2016-02-10 18:13:22 +00:00
Alex Klyubin
2cfd1d108c Sign APKs using SHA-256 instead of SHA-1 when possible.
This changes the build system to provide the signapk tool with the
minSdkVersion of the APK being signed. signapk in turn will then use
SHA-256 instead of SHA-1 if minSdkVersion is 18 (JB MR2) or higher
(see c2c49ed0c1).

To avoid increasing incremental OTA update package sizes for already
released platforms, release build scripts disable the above logic when
signing target files ZIPs for pre-N platforms.

Bug: 25643280

Change-Id: I3f2faaf49c6fa392ffbf1ee9f30de476f9f73231
2016-02-10 09:40:31 -08:00
Yohann Roussel
ccfa5c6761 Remove usages of jill.jar, use jack instead
Bug: 27113650
(cherry picked from commit d0bb7bdf5a)

Change-Id: Ie9be0d5c7e43ea857411431bb79db5cbb476484f
2016-02-10 18:07:15 +01:00
Dan Willemsen
d6e3b84185 Tell Soong about HOST_CROSS_*
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.

Change-Id: Iff664733e6991f4adbe8ddd620b091bbb55d1d86
2016-02-09 16:00:14 -08:00
Neil Fuller
dcd446e1e9 Merge "Allow java targets to support 1.8 source / target" 2016-02-09 23:01:40 +00:00
Dan Willemsen
8c4f25f12f Merge "Add 64-bit windows cross-compiles" 2016-02-09 20:54:10 +00:00
Dan Willemsen
fdf89cd575 Disable java when JAVA_NOT_REQUIRED is set
Change-Id: Id3056cde93302be20000bf7af33aeed0fa8fdf52
2016-02-08 17:02:48 -08:00
Dan Willemsen
9ecbf83259 Add 64-bit windows cross-compiles
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
Change-Id: I9f119411acb43e973ec1e6bca3c1dc291c91556c
2016-02-05 16:33:18 -08:00
Dan Willemsen
478913f88f Merge "Fix unused src tracking for generated .o files" 2016-02-05 18:12:20 +00:00
Colin Cross
9e8866f4a4 Merge "Don't build otatools for PDK" 2016-02-04 23:49:41 +00:00
Colin Cross
1b21a15049 Merge "Build .toc when building a module by name" 2016-02-04 23:13:31 +00:00
Colin Cross
481cc5a005 Don't build otatools for PDK
Change-Id: I5e73d103300ac938f80b3ff0af978c123d649fed
2016-02-04 15:09:23 -08:00
Dan Willemsen
444c323bc1 Fix unused src tracking for generated .o files
*.o files that are passed in via LOCAL_GENERATED_SOURCES are added
directly to all_objects, they are not mixed with the normal_objects that
we track. So omit them from they my_gen_src_files list so that we don't
warn that they're unused.

Change-Id: I94b85504032e70fbcc00207d6200557700dd0a89
2016-02-04 14:22:31 -08:00
Colin Cross
e2b8f68785 Build .toc when building a module by name
Building a module by name with make <module name>, or with mm or mma
through all_modules, should also build the .toc file so that future uses
of mm on modules that depend on this one can find the .toc file.

Bug: 26936761
Change-Id: Id0c592f0860a10b732b2b5b13c7e967c9bcb1c6b
2016-02-04 13:31:16 -08:00
Stephen Hines
cdb52b5186 Fix LLVM_RTLIB_PATH for new prebuilts.
This moved from lib/ to lib64/, but wasn't noticed because no one builds
with the profiler on by default.

Change-Id: I0155263b4a50437ea0864338fb34baefc3df59d2
2016-02-04 11:43:41 -08:00
Stephen Hines
1acfd54844 Merge "Switch to clang-2577113." 2016-02-04 07:34:05 +00:00
Neil Fuller
2428bfeb88 Allow java targets to support 1.8 source / target
This change enables build rules to specify:

LOCAL_JAVA_LANGUAGE_VERSION := 1.8

to enable -source 1.8 -target 1.8 for javac and
equivalent flags for Jack.

Bug: 26753820
(cherry-picked from commit cdfbe4a852)

Change-Id: I361c99dd599e7b4a041f02c9562e461da2b0502e
2016-02-03 17:08:39 +00:00
Colin Cross
655dd3ea76 Merge "Move PDK selection into config.mk" 2016-02-02 20:34:30 +00:00
Dan Willemsen
342037c0cf Merge "Fix typo" 2016-02-02 17:56:57 +00:00
Stephen Hines
6ef329eb4d Switch to clang-2577113.
Bug: http://b/25282907

This is actually based on clang/LLVM upstream revision r256229.

Change-Id: I335be68f196e5b55ac2816fa854e97b841b54240
2016-02-01 23:37:14 -08:00
Sebastien Hertz
4dad88980f Merge "Support code coverage with Jack" 2016-02-02 07:31:37 +00:00
Dan Willemsen
5709bd55f3 Fix typo
This was producing a number of unused source warnings for prebuilt files
using LOCAL_SRC_FILES_<arch>.

Change-Id: I48d1face7baf642f3ef17f957448ccb73788765f
2016-02-01 21:48:41 -08:00
Dan Willemsen
62f2e56c72 Track ObjC object mapping
Objective-C .m/.mm files were not being tracked, so they were showing
up as unused source files (on Darwin). They were also triggering an
internal build system warning because the new object list did not
match the current list.

Change-Id: I01fff8c5587fe168106c60782080d60744311f6f
2016-02-01 18:55:23 -08:00
Colin Cross
6b66fcf378 Move PDK selection into config.mk
config.mk needs to know TARGET_BUILD_PDK in order to select prebuilt
tools.  Move the selection of TARGET_BUILD_PDK into config.mk.

Change-Id: I1f73c92917887f27259b2db64b3779a2fe0df162
2016-02-01 18:05:07 -08:00
Shinichiro Hamaji
e786d21854 Merge "Use dependency files generated by llvm-rs-cc for Java" 2016-02-01 23:04:44 +00:00
Colin Cross
41fed8c082 Merge "Don't force color diagnostics outside of ninja" 2016-02-01 18:57:50 +00:00
Shinichiro Hamaji
52a1d6c666 Use dependency files generated by llvm-rs-cc for Java
This is a reland of 4c474617d4
This time, we use awk instead of sed, and the script works
on Mac.

For C++ code llvm-rs-cc defines two targets but it defines
three targets for Java. The sed script was updated to handle
both cases appropriately.

Bug: 26839129
Change-Id: I1bca7d253764554d552950e03deedabaa9b7f17e
2016-02-01 17:59:01 +09:00
Shinichiro Hamaji
d6184e1da9 Merge "Revert "Use dependency files generated by llvm-rs-cc for Java"" 2016-02-01 08:16:42 +00:00
Shinichiro Hamaji
5f50ea3bc9 Revert "Use dependency files generated by llvm-rs-cc for Java"
This reverts commit 4c474617d4.

Change-Id: I66c46360d0ccf927c807ddd5cfbc56cbd97ed4a2
2016-02-01 08:08:26 +00:00
Shinichiro Hamaji
3fdb9ad716 Merge "Use dependency files generated by llvm-rs-cc for Java" 2016-02-01 07:50:32 +00:00
Shinichiro Hamaji
465fd483f5 Merge "Use .KATI_DEPFILE for files generated by aidl-java" 2016-02-01 07:50:01 +00:00
Dan Willemsen
224466b1af Merge "Order objects based on LOCAL_SRC_FILES and LOCAL_GENERATED_SOURCES" 2016-01-30 02:44:12 +00:00
Alex Klyubin
01ac26d942 Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible." This is breaking CTS." 2016-01-29 23:58:27 +00:00
Alex Klyubin
061289c432 Revert "Sign APKs using SHA-256 instead of SHA-1 when possible." This is breaking CTS.
This reverts commit c2a36afd67.

Change-Id: I4389bf99aeb213198c1c501ba9462bd4a4540d0a
2016-01-29 23:56:44 +00:00
Lee Campbell
6c8e3e4108 Merge "brillo: Remove dependency on java for Brillo" 2016-01-29 23:42:19 +00:00
Lee Campbell
3d8bf2994c brillo: Remove dependency on java for Brillo
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
2016-01-29 15:38:53 -08:00
Alex Klyubin
c2a36afd67 Sign APKs using SHA-256 instead of SHA-1 when possible.
This changes the build system to provide the signapk tool with the
minSdkVersion of the APK being signed. signapk in turn will then use
SHA-256 instead of SHA-1 if minSdkVersion is 18 (JB MR2) or higher
(see c2c49ed0c1).

To avoid increasing incremental OTA update package sizes for already
released platforms, release build scripts disable the above logic when
signing target files ZIPs for pre-N platforms.

Bug: 25643280

(cherry picked from commit de5bc04717)

Change-Id: I4b100750e47788ab6ed897a0a5abfd33542e8676
2016-01-29 10:17:02 -08:00
Shinichiro Hamaji
4c474617d4 Use dependency files generated by llvm-rs-cc for Java
This is similar to 2e45fd036a
but this CL is for generated java code.

For C++ code llvm-rs-cc defines two targets but it defines
three targets for Java. The sed script was updated to handle
both cases appropriately.

Bug: 26839129
Change-Id: I5c7705c67f3c65c4c14f74558e603f8ec9f35879
2016-01-28 17:03:02 +09:00
Shinichiro Hamaji
2a0d1fee20 Use .KATI_DEPFILE for files generated by aidl-java
Bug: 26839129
Change-Id: Ief611969b28aea3bb12097ba91d40f3e5010d647
2016-01-28 16:13:05 +09:00
Dan Willemsen
3bb168f10d Order objects based on LOCAL_SRC_FILES and LOCAL_GENERATED_SOURCES
We have been reordering objects to the linker based on how they were
generated. In soong, they're ordered based on the order listed in the
src_files.

Keep track of which source files created which object files so that we
can create the ordered list. Optionally change the order, based on
BINARY_OBJECTS_ORDER. That way we can compare make and soong builds.

Since we're keeping track of the used source files, warn when an entry
in LOCAL_SRC_FILES is not used. (whether it is an unused file like a
header, or a typo)

LOCAL_GENERATED_SOURCES is not verified, since it is valid to add
headers and other files in that list (to set up dependencies).

Change-Id: I1dfbbb3aa570c11c1db3b7133e46ed0b8c3b8989
2016-01-27 16:48:02 -08:00
Sebastien Hertz
dfce8ad4f4 Support code coverage with Jack
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
2016-01-27 19:14:14 +01:00
Alex Klyubin
4a97cde443 Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."" 2016-01-27 17:49:40 +00:00