Commit graph

9114 commits

Author SHA1 Message Date
Neil Fuller
0e8ec505f6 Make the language version selection smarter
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
(cherry-picked from commit decb797276)

Change-Id: I0734b6e690bea32def3dc435c9ce0bd90b845e79
2016-03-14 11:40:01 +00:00
Dan Willemsen
d53c0c7b45 Handle out being a symlink
Soong needs to be able to reverse the relative path to out. Switch to
absolute paths if .. won't work because of out being a symlink to
somewhere else.

Bug: 27612837
Change-Id: Ib8b9e0f80523148cfd4b69a03d164578916d8fd5
2016-03-11 16:29:23 -08:00
Yohann Roussel
94451580af Inform Jack of the min sdk
Set Jack min sdk according to LOCAL_SDK_VERSION. Gives Jack current
version when LOCAL_SDK_VERSION is not available.

Bug: 27371864
Change-Id: Ieba0219494f29d2737d2ca234317c3af7e5e72c8
2016-03-11 11:55:57 +01:00
Sami Tolvanen
926096eff6 Merge "Revert "build: pass version and patch level to mkbootimg"" 2016-03-11 00:11:25 +00:00
Sami Tolvanen
494a9090f9 Revert "build: pass version and patch level to mkbootimg"
This reverts commit 8fb47f191f.

Bug: 27580174
Change-Id: Id87fd1e8da217438757d5a0fa4bbef7aea6770fc
2016-03-11 00:08:57 +00:00
Stephen Hines
bda10679be Merge "Switch to clang-2658975." 2016-03-10 22:46:01 +00:00
Sen Jiang
d8c715bf34 Add zlib_fingerprint to target_files.zip
Test: make dist
Bug: 27156099

Change-Id: I4608de70ad4dfe6523b832bbf7002dcccefe932f
2016-03-10 13:46:47 -08:00
Dan Willemsen
b8744a26e4 Merge "Use hermetic ckati/makeparallel prebuilts" 2016-03-10 07:22:37 +00:00
Joe Onorato
fcec686a25 Turn off excess printing during the build which makes errors harder to find.
Change-Id: I588de5ddc0aa7dcaacc4ea185c13c2fa3748888a
(cherry-pick from commit 401ffaeb75)
2016-03-09 18:09:02 -08:00
Dan Willemsen
1487f31d83 Use hermetic ckati/makeparallel prebuilts
Currently, we're building against the native host version of libc++ and
other headers. Instead, use prebuilts of ckati/makeparallel built with
Soong against the included libc++ and sysroot. Building ckati /
makeparallel doesn't work well in unbundled branches that don't have all
of the libc++ dependencies to do successful host builds.

KATI is default variable defined when running under Kati, don't use it
for other purposes. Use CKATI instead.

Bug: 27533820
Change-Id: I82d66f5e34e3341a3cee4c5c83cd1d9a54d057ff
2016-03-09 17:19:30 -08:00
Todd Kennedy
27c3223a77 Merge "Define TARGET_OUT_VENDOR_APPS_PRIVILEGED" 2016-03-09 20:54:22 +00:00
Dan Willemsen
ee4a6fa59e OSX: Use the oldest SDK, but always set our target to 10.8
Build binaries usable on older machines even if older SDKs are not
installed. Older SDKs can no longer be installed on newer Xcode
versions.

Change-Id: I0c9f2534466a127a19107820879c2856bfac0076
2016-03-09 10:52:59 -08:00
Dan Willemsen
e607224349 Merge changes I1fccee8d,Ib343df6d,I2f1984c2
* changes:
  Fix C++ on Darwin
  Remove support for /Developer
  Remove support for Darwin 10.6 SDK
2016-03-09 18:31:17 +00:00
Dan Willemsen
441d646c6f Fix C++ on Darwin
We've been including the system libc++ headers even if we're building
against our version of libc++. Stop doing that, and only add the headers
to our path if we're using the system libraries.

If nothing is specified, on recent OSX versions, libc++ is the default
c++ library instead of libstdc++. We've been explicitly including the
libc++ headers on all versions, but that breaks old versions. Force us
over to libc++, since the system libstdc++ does not support C++11, and
libc++ is still supported on our oldest version (10.8).

Change-Id: I1fccee8da0f425e10ccc9d3247ed40664eb6ada0
2016-03-08 20:15:21 -08:00
Dan Willemsen
2a24bad8cc Remove support for /Developer
/Developer was removed in Xcode 4.3. Our minimum SDK version is 10.8,
which implies at least Xcode 4.4, and our documentation requires
Xcode 4.5.2.

Change-Id: Ib343df6ded6e98222d8ee2e542e1f3fadd2b1397
2016-03-08 13:53:15 -08:00
Dan Willemsen
fcefd5f6d8 Remove support for Darwin 10.6 SDK
Our minimum version is 10.8

Change-Id: I2f1984c2227861a3c784f2a5070853c2d1b250d6
2016-03-08 13:22:36 -08:00
Sami Tolvanen
450f15111c Merge "build: pass version and patch level to mkbootimg"
am: b32d845090

* commit 'b32d845090d19d2dfbbf32d4628ef81478325927':
  build: pass version and patch level to mkbootimg
2016-03-08 16:08:14 +00:00
Sami Tolvanen
b32d845090 Merge "build: pass version and patch level to mkbootimg" 2016-03-08 16:02:24 +00:00
Dan Willemsen
90074f7f1f Merge "Reexport include dirs for whole static libs"
am: e2379484ab

* commit 'e2379484ab96e7e5f9a60061557e492068ef1789':
  Reexport include dirs for whole static libs
2016-03-08 00:16:45 +00:00
Dan Willemsen
e2379484ab Merge "Reexport include dirs for whole static libs" 2016-03-08 00:14:02 +00:00
Martin Blumenstingl
7b578cbf10 Merge "Removed duplicate definition of E2FSCK"
am: d7a4e56a87

* commit 'd7a4e56a87c324378e60f5989a14a5d5addfd456':
  Removed duplicate definition of E2FSCK
2016-03-08 00:05:12 +00:00
Colin Cross
d7a4e56a87 Merge "Removed duplicate definition of E2FSCK" 2016-03-07 23:54:40 +00:00
Elliott Hughes
9c34174b76 Merge "Move BUILD_NATIVE_BENCHMARK over to libgoogle-benchmark."
am: ef0c20621d

* commit 'ef0c20621d7b82f25f8fa669a0b2d8031588169d':
  Move BUILD_NATIVE_BENCHMARK over to libgoogle-benchmark.
2016-03-07 21:22:53 +00:00
Elliott Hughes
ef0c20621d Merge "Move BUILD_NATIVE_BENCHMARK over to libgoogle-benchmark." 2016-03-07 21:17:45 +00:00
Ying Wang
ad68d904a1 Merge "Fix dumping variables of absolute paths."
am: dd70b91060

* commit 'dd70b9106079f39738c129c6f874576748f92d3e':
  Fix dumping variables of absolute paths.
2016-03-07 20:04:13 +00:00
Sami Tolvanen
8fb47f191f build: pass version and patch level to mkbootimg
Add --os_version and --os_patch_level arguments to mkbootimg.

Needs matching changes from
  I57682611e0c27fec5ed284da7d9a788383ff98b1

Bug: 27498078
Bug: 22914603
Change-Id: I04e20b0de40d864aac92ac7bcf466a6cbde3d0e4
2016-03-07 11:55:22 -08:00
Ying Wang
80ceadc945 Fix dumping variables of absolute paths.
Calling $(abspath) is better than checking and prepending $(PWD) if
necessary.

Bug: 27429759
Change-Id: Ia156f8a5d6b88b6090f4d23c7f9166bd62d3ab70
2016-03-07 11:30:35 -08:00
Martin Blumenstingl
764f9339f1 Removed duplicate definition of E2FSCK
Change-Id: I810711ad05e198ee1f9606c37649e80df7b55fa5
2016-03-06 22:38:19 +01:00
Ying Wang
87545466a8 Merge "Delete relics left behind by commit 86e6b7ed51 ."
am: 880c9ffe7a

* commit '880c9ffe7a47c163f986f7bc02963bbde1c83c0f':
  Delete relics left behind by commit 86e6b7ed51 .
2016-03-05 00:32:27 +00:00
Ying Wang
880c9ffe7a Merge "Delete relics left behind by commit 86e6b7ed51 ." 2016-03-05 00:29:00 +00:00
Ying Wang
2fdafd2596 Delete relics left behind by commit 86e6b7ed51 .
Change-Id: I81febc28f471727fc37335b11e47749753a57997
(cherry-pick from commit 0f59fdf30d)
2016-03-04 16:28:01 -08:00
Dan Willemsen
14950e0db7 Merge "Tell soong about MALLOC_SVELTE"
am: fd2691c35f

* commit 'fd2691c35f6e0c7b5339befa8afefaebdfb72283':
  Tell soong about MALLOC_SVELTE
2016-03-04 23:55:48 +00:00
Dan Willemsen
fd2691c35f Merge "Tell soong about MALLOC_SVELTE" 2016-03-04 23:53:36 +00:00
Stephen Hines
c503d8ef58 Switch to clang-2658975.
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.

Change-Id: I24966bf1ff84305df3586ab01d1aae7d5922aa11
2016-03-04 14:40:56 -08:00
Dan Albert
1bbd4dac85 Merge "Get gtest includes from the exported headers."
am: f8b170dc52

* commit 'f8b170dc52575f16a63bfd6b6710efb46580c8b2':
  Get gtest includes from the exported headers.
2016-03-04 22:34:39 +00:00
Dan Albert
f8b170dc52 Merge "Get gtest includes from the exported headers." 2016-03-04 22:30:58 +00:00
Elliott Hughes
577f8407e9 Move BUILD_NATIVE_BENCHMARK over to libgoogle-benchmark.
Bug: http://b/24803663
Change-Id: I1565cf680298a1765e88162d8b0e59dedba29bd7
2016-03-04 13:37:43 -08:00
Dan Willemsen
851983bbf2 Merge "Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S"
am: 6d813d8c92

* commit '6d813d8c9223ba6e55e98f23a8a8c2248466feff':
  Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S
2016-03-04 20:59:24 +00:00
Dan Willemsen
6d813d8c92 Merge "Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S" 2016-03-04 20:52:57 +00:00
Dan Willemsen
a7808accf4 Reexport include dirs for whole static libs
When a static library uses LOCAL_EXPORT_C_INCLUDE_DIRS, then is included
entirely in another library with LOCAL_WHOLE_STATIC_LIBRARIES, all the
symbols are reexported, so reexport the headers too.

Change-Id: I92cf17894fc991a5b5ecb59ca5e095e407c98de4
2016-03-04 12:47:37 -08:00
Ying Wang
be81620114 Merge "Speed up lunch/tapas/etc. shell utility functions."
am: d3c08f8b76

* commit 'd3c08f8b763c1d8f865896cf7d03d1794bdd14fe':
  Speed up lunch/tapas/etc. shell utility functions.
2016-03-04 19:06:53 +00:00
Ying Wang
08800fd905 Speed up lunch/tapas/etc. shell utility functions.
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
Change-Id: I24e88598f6fab598ef26518885fd5e86e71a772d
2016-03-04 11:01:57 -08:00
Ying Wang
9f68962c47 Merge "Align up java-lib-files and java-lib-deps."
am: 58b8c86f84

* commit '58b8c86f84ad0bf8fb3bb7dfc259fd1e3ce0dae1':
  Align up java-lib-files and java-lib-deps.
2016-03-04 18:54:25 +00:00
Ying Wang
ea04f821fc Align up java-lib-files and java-lib-deps.
- 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
(cherry-pick from commit 063d0455e0)
2016-03-04 10:39:24 -08:00
Neil Fuller
55d4ec523e Merge "Add JarJar support to BUILD_HOST_JAVA_LIBRARY"
am: b97ce3bb61

* commit 'b97ce3bb613c1ea18c9aea42e829ac34039b7679':
  Add JarJar support to BUILD_HOST_JAVA_LIBRARY
2016-03-04 13:09:22 +00:00
Neil Fuller
b97ce3bb61 Merge "Add JarJar support to BUILD_HOST_JAVA_LIBRARY" 2016-03-04 12:58:45 +00:00
Neil Fuller
432bdaa2f7 Add JarJar support to BUILD_HOST_JAVA_LIBRARY
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
(cherry picked from commit 30b21ad579)

Change-Id: I4f16896606bcfdd00164078eeb142d05b29bb832
2016-03-04 12:02:40 +00:00
Dan Willemsen
df9acac680 Do not apply GLOBAL_CFLAGS_NO_OVERRIDE to host *.S
Target assembly files do not get these cflags, align the host
definitions to do the same.

Change-Id: Idadfa1f367c3ebea44460c5798225a85dd319371
2016-03-03 17:38:16 -08:00
Yabin Cui
a72e7dbd9c Merge "Enable LOCAL_POST_LINK_CMD for non-static executables."
am: 1f310530fc

* commit '1f310530fcd3c15b0d5d2b067d1ad320bc4faef2':
  Enable LOCAL_POST_LINK_CMD for non-static executables.
2016-03-03 19:02:56 +00:00
Yabin Cui
1f310530fc Merge "Enable LOCAL_POST_LINK_CMD for non-static executables." 2016-03-03 18:59:38 +00:00
Shinichiro Hamaji
4037c4225a Use KATI_DEPFILE for .P associated with object files
Also specify "-d keepdepfile" to ninja so .P files won't be
deleted by ninja.

-include for .s files are removed because GCC doesn't
generate .d files for .s files.

Bug: 26839129
Change-Id: If00e93c7a33449ec314a5cdba438475a32979f4e
2016-03-03 18:19:37 +09:00
Yabin Cui
273e9109c1 Enable LOCAL_POST_LINK_CMD for non-static executables.
It is needed to insert testdata section into simpleperf cts test.

Bug: 27387280
Change-Id: I58cea106d135f535626d8624a016bd2aaceeb8ea
2016-03-02 17:04:11 -08:00
Dan Albert
e5ecdc967d Get gtest includes from the exported headers.
Change-Id: I47db781a36318664fabff8a5e75031c6bee674e4
2016-03-02 13:05:46 -08:00
Ying Wang
6aa24e6301 Merge "Clean generated source dir if .proto/.rs is gonee."
am: 591fa1284a

* commit '591fa1284aa29ec8b2ff8917ce86f81c5b14ad0a':
  Clean generated source dir if .proto/.rs is gonee.
2016-03-02 19:21:23 +00:00
Ying Wang
96d79c5366 Merge "Support arch specific variants of LOCAL_STRIP_MODULE/LOCAL_PACK_MODULE_RELOCATIONS"
am: de9e5d40ef

* commit 'de9e5d40ef8d9433ad22bb41fa428c7cec5e1549':
  Support arch specific variants of LOCAL_STRIP_MODULE/LOCAL_PACK_MODULE_RELOCATIONS
2016-03-02 19:21:12 +00:00
Ying Wang
ce7ea68394 Clean generated source dir if .proto/.rs is gonee.
Similar to how we clean the generated source dir if .aidl becomes
obsolete.

Bug: 26688474
Change-Id: I66c5b6d6513259b5f4f4bac84f384f4bf953d82a
(cherry-pick from commit d5ffec9383)
2016-03-02 10:59:59 -08:00
Ying Wang
6efe88ba95 Support arch specific variants of LOCAL_STRIP_MODULE/LOCAL_PACK_MODULE_RELOCATIONS
So that we can disable only one in multilib modules.

Bug: 27442756
Change-Id: I4ca379fac997f9165c47cb93d34bf1f483f5a241
(cherry-pick from commit b6eb8ddbde)
2016-03-02 10:59:23 -08:00
Dan Willemsen
e39455faa2 Merge "Ensure prebuilt executables are executable"
am: c92dc59c86

* commit 'c92dc59c86f09526735625c605b8e7ded1070e90':
  Ensure prebuilt executables are executable
2016-03-02 18:25:58 +00:00
Dan Willemsen
c92dc59c86 Merge "Ensure prebuilt executables are executable" 2016-03-02 18:12:07 +00:00
Yohann Roussel
4fd0463191 Merge "Use Jack to check build"
am: 6a9d0f9718

* commit '6a9d0f9718f127475d702ae6831a2bec3be976b6':
  Use Jack to check build
2016-03-02 09:04:20 +00:00
Yohann Roussel
6a9d0f9718 Merge "Use Jack to check build" 2016-03-02 08:46:24 +00:00
Dan Willemsen
08420cbc8a Ensure prebuilt executables are executable
Use 'chmod +x' to make sure that they're executable, even if the source
file is not.

Change-Id: Id155f6b4ff188f5c909fd6237fd64183af264f79
2016-03-01 22:11:41 -08:00
Dan Willemsen
60899eddd7 Tell soong about MALLOC_SVELTE
Change-Id: I50ce6c0767db8963a7a633bdb349db1c96427cd8
2016-03-01 21:00:26 -08:00
Dan Willemsen
cdaf748e3a Merge changes I12810c1b,I62287a80,Ied96fdc3
am: a65b01fc09

* commit 'a65b01fc09b47c83e59dc4757c76eafba1e15cbc':
  Remove LOCAL_ACP_UNAVAILABLE
  Remove unused dependencies on $(ACP)
  Replace some uses of acp with cp
2016-03-01 23:19:33 +00:00
Dan Willemsen
a65b01fc09 Merge changes I12810c1b,I62287a80,Ied96fdc3
* changes:
  Remove LOCAL_ACP_UNAVAILABLE
  Remove unused dependencies on $(ACP)
  Replace some uses of acp with cp
2016-03-01 23:18:27 +00:00
Ari Hausman-Cohen
1d59db0794 Merge "Adding a brillo_tests task."
am: 3bbaa8a8ff

* commit '3bbaa8a8ffe18a2afc3d9d2ee36dfcf74775aba8':
  Adding a brillo_tests task.
2016-03-01 22:45:24 +00:00
Ari Hausman-Cohen
3bbaa8a8ff Merge "Adding a brillo_tests task." 2016-03-01 22:38:07 +00:00
Dan Willemsen
479311bc7c Remove LOCAL_ACP_UNAVAILABLE
Now that copy-file-to-target doesn't use acp, nothing in the acp build
path uses acp, so we don't need to special case it to prevent loops.

Change-Id: I12810c1b064d0c03135a80077a76bc4c9cc18b24
2016-03-01 13:16:53 -08:00
Dan Willemsen
7f016150a0 Remove unused dependencies on $(ACP)
Most of these are calling to copy-file-to-target or similar, which no
longer use $(ACP).

Change-Id: I62287a80c577c34df587b74e70055c2f56050ce7
2016-03-01 13:15:35 -08:00
Dan Willemsen
f1a98af5fc Replace some uses of acp with cp
ACP was originally created to overcome differences with cp between
Linux, Darwin, and Windows. We've since dropped Windows as a build host,
and don't use features like '-u' anymore.

For most of our current usecases, 'acp' is identical to 'cp' except that
it splits 'cp -p' into 'acp -p' for mode and ownership, and 'acp -t' for
timestamps. On Linux, this could be specified using
'--preserve=mode,ownership', but Darwin doesn't have this.

Since we're removing the destination file before copying, 'cp' already
preserves the mode (modulated by the umask). So the only extra thing
that gets preserved with 'acp -p' is ownership, which we should not care
about in the build system. (In many cases we shouldn't be preserving
mode either, so that readonly source trees can actually be marked
readonly, but that will be a future change)

Change-Id: Ied96fdc303ac5c774347c07363daec8b6dfb22e4
2016-03-01 13:08:50 -08:00
Dan Willemsen
4914c9b28e Merge "Remove unused config variables"
am: 1dde47d0b6

* commit '1dde47d0b6796c3f9c1ec2d41c6c2597f9f13242':
  Remove unused config variables
2016-03-01 18:50:46 +00:00
Dan Willemsen
1dde47d0b6 Merge "Remove unused config variables" 2016-03-01 18:49:37 +00:00
Dan Willemsen
e401e09a3c Merge "Remove destination before copying file"
am: 469665ded5

* commit '469665ded53d758a6cb5b5462e1219efe4135108':
  Remove destination before copying file
2016-03-01 18:21:17 +00:00
Dan Willemsen
469665ded5 Merge "Remove destination before copying file" 2016-03-01 18:20:06 +00:00
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
Duane Sand
cc1a0fdde1 Enable asan/ubsan for mips
Change-Id: I1f3c89d6ca08d109e7d2a6d32448ff248a98daac
2016-02-29 15:42:38 -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
Alex Klyubin
a80a8085e0 Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."
This reverts commit 74df828cb5. This commit is breaking a build, again...

Change-Id: I2df561d68302ba4c83e90a64a7bf203645033a3b
2016-01-27 17:45:42 +00:00
Alex Klyubin
72d152f478 Merge "Sign APKs using SHA-256 instead of SHA-1 when possible." 2016-01-27 16:55:16 +00:00
Shinichiro Hamaji
1326f65c2f Write clean_steps.mk with multiple commands
$(INTERNAL_CLEAN_STEPS) could be too big to be fit in a single
command line.

Bug: 26707439
Change-Id: Ieed6c772980d06c2418a9246b025bca7a6f568aa
2016-01-27 14:59:56 +09:00
Alex Deymo
92cfd6fc2b Place the META/ dir first in the target_files.zip.
To help early verification of a target_files.zip being uploaded to our
servers, we place the META/ directory first in the .zip file, so checks
against the product_id.txt and product_version.txt don't need to wait
for the whole file to upload.

Note that META/*filesystem_config.txt files are generated and added to
the .zip file at a later point, so they are not included at the
beginning.

Bug: 26806325
TEST=`make dist` and `unzip -l out/dist/edison-target_files-eng.$USER.zip` shows most META/ files first.

Change-Id: I1955645412688f5c7823063ed56606b251daccfd
2016-01-26 18:52:10 -08:00
Alex Klyubin
74df828cb5 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: I058393e0971d0d6559dbd69ea902754c6c7cab14
(cherry picked from commit de5bc04717)
2016-01-26 18:41:57 +00:00
Neil Fuller
385ac86745 Merge "Revert "Revert "Make OpenJDK 8 the default""" 2016-01-26 10:33:54 +00:00
Shinichiro Hamaji
19f99a742d Merge "Use dependency files generated by llvm-rs-cc" 2016-01-26 06:36:02 +00:00
Shinichiro Hamaji
2e45fd036a Use dependency files generated by llvm-rs-cc
This was a regression since kati has been introduced. This CL
introduces include-depfile function to make it easier to write
Makefiles which work with both make and kati.

As ninja can handle only a single dependency file per a build
rule, now we merge multiple .d files generated by llvm-rs-cc
into a .d file.

Change-Id: Iaf64a8f0523ab98115837e6e06abd50f06620363
2016-01-26 14:24:46 +09:00
Josh Gao
1ae548d81d Merge "Error out if MALLOC_IMPL is defined." 2016-01-25 18:23:35 +00:00
Alex Klyubin
7382bdf8c1 Merge "Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."" 2016-01-25 17:19:02 +00:00
Alex Klyubin
1429d5e14c Revert "Sign APKs using SHA-256 instead of SHA-1 when possible."
This reverts commit de5bc04717 because it's breaking some builds. Turns out some APKs have multiple sdkVersion attributes returned by aapt.

Change-Id: I013d6ef5eac473dd3900e0b9edf4c32cdc838bab
2016-01-25 17:17:09 +00:00
Neil Fuller
1f495b865e Revert "Revert "Make OpenJDK 8 the default""
Reapply the switch to JDK 8 on aosp/master.

This reverts commit 85bddfdedf.

Change-Id: If2e8733ba78b007d37914c0512cd6be1bd4c1e69
2016-01-25 17:12:41 +00:00
Neil Fuller
c0acea2571 Merge "Revert "Make OpenJDK 8 the default"" 2016-01-25 17:11:12 +00:00
Neil Fuller
85bddfdedf Revert "Make OpenJDK 8 the default"
Temporary revert to help out Brillo folks.
It will be resubmitted tomorrow.

This reverts commit 4495f6afb8.

Change-Id: Id378c7d3a6e72e9be50f9404b19d5763568987a5
2016-01-25 17:04:14 +00:00
Alex Klyubin
b763b29267 Merge "Sign APKs using SHA-256 instead of SHA-1 when possible." 2016-01-25 16:42:27 +00:00
Neil Fuller
4495f6afb8 Make OpenJDK 8 the default
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true

And run envsetup.sh/lunch again.

Bug: 25786468
Change-Id: I8e00591a24d13e3b8b6baaafe0fdff6536c58770
2016-01-25 10:19:25 +00:00
Stephen Hines
49b695375c Add an RS_CLANG variable as well for RenderScript.
Change-Id: I33a73c4c2b19aa17bc18a64c92a86565111de3d0
2016-01-22 15:11:58 -08:00
Josh Gao
f3e7204bef Error out if MALLOC_IMPL is defined.
Bug: http://b/26390299
Change-Id: Icd3ce6853c8207b1a9ce1f9d546a61d5b113f15a
2016-01-22 11:25:24 -08:00
Stephen Hines
96d2a8c5e4 Add clang rules for RS_LLVM_* tools.
This change adds new variables for RS_LLVM_* tools, which correspond
to the version of LLVM checked in currently to external/, instead of
mapping to the latest host prebuilts. This will help prevent version
differences for newer IR generated by the updated host prebuilts, which
then might not be readable with the on-device LLVM bits we build from
external/.

Change-Id: I6c7b0fa9082e9c8244cc508cb23960569a057740
2016-01-21 23:50:53 -08:00
Colin Cross
41ee5fc07a Merge "Set flag when using sdk tools in place" 2016-01-21 23:36:26 +00:00
Tao Bao
27a1201989 Merge "Makefile: Fix the location for payload signing key." 2016-01-21 22:37:46 +00:00
Tao Bao
23c3db9372 Makefile: Fix the location for payload signing key.
CL in [1] put it in a wrong path.

[1] commit 38812d684b

Bug: 25715402
Change-Id: I01a105888844011eee083d5f4d694223599fa067
2016-01-21 14:33:22 -08:00
Dan Willemsen
60c9200c1e Merge "Pass the arm/thumb cflags to assembly files" 2016-01-21 22:31:11 +00:00
Tao Bao
b49d05e72e Merge "Makefile: Add the payload public key into system image." 2016-01-21 22:21:31 +00:00
Alex Klyubin
de5bc04717 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: I048393e0971d0d6559dbd69ea902754c6c7cab14
2016-01-21 10:25:12 -08:00
Christopher Wiley
8edda3afdf Merge "Separate aidl dependencies from compiler dependencies" 2016-01-21 18:19:05 +00:00
Christopher Wiley
11feb8b075 Merge "Keep aidl generated C++ inside the generated folder" 2016-01-21 18:17:29 +00:00
Tao Bao
38812d684b Makefile: Add the payload public key into system image.
For non-Brillo devices using AB update, add the payload signing public
key to the system image
(system/etc/update_engine/update-payload-key.pub.pem).

We first need to sign the payload with some private key, and pack it
into an Android OTA package. Then the whole zip package will be signed
again with the device key. This is to comply with the two existing OTA
flows (Android and CrOS).

We use the same device key to do the two signings, but update_engine
expects the key in RSA public key format. This CL extracts the public
key from x509 certificate and adds it to the system image.

Bug: 25715402
Change-Id: I6f6c1148534250ddb6d9e554175c7a35bceda99e
2016-01-20 21:29:00 -08:00
Colin Cross
d3f3ab77fd Set flag when using sdk tools in place
New version of build/ execute the tools from prebuilts/sdk/tools in
place, old versions copy them to $(HOST_OUT_EXECUTABLES).  build/ and
prebuilts/sdk often use mixed versions, set a flag that
prebuilts/sdk/tools/Android.mk can use to determine when it is using an
old build/ directory.

Change-Id: Iad2f96c35203fd3b0976946d229bfa8ab4acb150
2016-01-20 16:08:49 -08:00
Christopher Wiley
087f327304 Separate aidl dependencies from compiler dependencies
Both aidl and clang/gcc were putting their dependencies in the same
place.  Move aidl's dependencies to a file ending with .aidl.P rather
than the compiler's .P.

While here, inform kati that we have these special dep files.

Bug:26409006
Test: Rebuild, note both files being generated

Change-Id: I29d2eea822235d60713c2059f3a314e475eb5aa3
2016-01-20 12:54:09 -08:00
Christopher Wiley
257796c62d Keep aidl generated C++ inside the generated folder
Transform ../ to dotdot/ for C++ generateds from .aidl source files.
This forces us to use one layer of indirection to calculate the build
rules for .aidl files, since we can no longer use a pattern rule.

This was tested by modifying system/tools/aidl's Android.mk to refer to
its .aidl files by going up two directories and then repeating the
directories again.  When I print the build rules with $(info) I see that
dotdot/ appears in appropriate places (C++ paths, but not .aidl paths).

Bug: 26407018
Test: Described above.

Change-Id: I397c9d10408c0c66d8b5a247a1f34eb4bf4f74ce
2016-01-20 09:17:20 -08:00
Chih-hung Hsieh
c36a9760e1 Merge "Set USE_CLANG_PLATFORM_BUILD to default true." 2016-01-19 23:40:56 +00:00
Tao Bao
6d8a8cc634 Makefile: Pack brillo_update_payload and shflags into otatools.
brillo_update_payload and shflags are the scripts to generate A/B OTA
package (payload). Include them into otatools.zip.

brillo_update_payload was already included in previous CL. Move it to
the folder for executables.

Bug: 25715402
Change-Id: Idf9c05767c24c55d058cc30e696f06d4eb5fd53b
2016-01-19 14:51:51 -08:00
Dan Willemsen
45d38c06b4 Pass the arm/thumb cflags to assembly files
This effectively changes the default instruction set of assembly files
from arm to thumb in order to match the default for C/C++.

Change-Id: I8684f144a1195b53b3e0fdd04cacf77f6a131c7e
2016-01-19 12:37:17 -08:00
Chih-Hung Hsieh
8dd69d97f6 Set USE_CLANG_PLATFORM_BUILD to default true.
BUG: 26102335
Change-Id: I3b9fa2dfbee361410caf163147945ab448bb8ddf
2016-01-19 11:43:44 -08:00
Dan Willemsen
9f41040b00 Merge "Add -Werror=date-time to target builds"
am: 5c3f812507

* commit '5c3f812507bd025da2fc3d5fa40e8a278535dff2':
  Add -Werror=date-time to target builds
2016-01-16 20:17:01 +00:00
Dan Willemsen
5c3f812507 Merge "Add -Werror=date-time to target builds" 2016-01-16 20:13:30 +00:00
Dan Willemsen
766eeb747e Merge "Allow building kati & makeparallel with soong"
am: 77cde9e244

* commit '77cde9e244de9b043793ef528818de0ffea862e1':
  Allow building kati & makeparallel with soong
2016-01-14 02:05:24 +00:00
Colin Cross
dbd43849fb Don't force color diagnostics outside of ninja
Building with USE_NINJA=false and piping build output to a file will
result in ANSI color codes in the build output.  Only force ANSI codes
on when building with ninja, which strips the ANSI codes when writing
build output to a non-TTY.

Change-Id: Ifd2fb53799fd99c23b7ad91cdb84d943bf707db0
2016-01-13 14:05:54 -08:00
Dan Willemsen
3f60c4b6c0 Allow building kati & makeparallel with soong
This uses far fewer hacks in order to build these host tools, but will
require more libraries(libc++,etc) from unbundled and stripped down
branches.

Once this becomes the only option, all builds will happen after soong
runs. Then the toolchain / global cflags information will be able to be
moved from make to soong (and exported back to make).

Change-Id: I270b1d92bcef28a96fbc3ec9910d9bd0c101ac0f
2016-01-13 13:08:29 -08:00
Stephen Hines
4f14e16324 Merge "Switch to Vista instead of Win2K."
am: c8299320da

* commit 'c8299320dac3a399430be37e0581bc263bef997e':
  Switch to Vista instead of Win2K.
2016-01-13 20:52:09 +00:00
Stephen Hines
c8299320da Merge "Switch to Vista instead of Win2K." 2016-01-13 20:47:13 +00:00
Colin Cross
1ed08efbb9 Merge "Ignore Android.mk files with USE_SOONG=true"
am: 19f6638026

* commit '19f6638026b8481e04003fcbd5a8ef017a66d9c8':
  Ignore Android.mk files with USE_SOONG=true
2016-01-13 20:43:22 +00:00
Colin Cross
19f6638026 Merge "Ignore Android.mk files with USE_SOONG=true" 2016-01-13 20:32:26 +00:00
Stephen Hines
625e7159ff Switch to Vista instead of Win2K.
Bug: http://b/26524325
Bug: http://b/25282907

The latest Clang/LLVM requires Vista APIs in order to execute, so we
need to bump the minimum required Windows version for our host tools.

Change-Id: Ic1a760bc240060f5de39ce3a68484886021ff3d9
2016-01-12 17:56:47 -08:00
Dan Willemsen
b2cfef28fb Merge "Remove -Wa,noexecstack from unsupported arm clang flags"
am: d29a84161e

* commit 'd29a84161edf1c82b988c8b181638b9b37540e6d':
  Remove -Wa,noexecstack from unsupported arm clang flags
2016-01-13 01:02:40 +00:00
Dan Willemsen
d29a84161e Merge "Remove -Wa,noexecstack from unsupported arm clang flags" 2016-01-13 00:56:59 +00:00
Dan Willemsen
d1baa0f001 Remove -Wa,noexecstack from unsupported arm clang flags
This was marked as unsupported only on arm[64], even though it works.
For soong, we want to keep a single list of unsupported clang flags
for all architectures.

Change-Id: I9c4ae0f255c549d2346ba7abae57e22c86ddcc61
2016-01-12 15:54:57 -08:00
Tao Bao
506cbfa8b4 Merge "Fix mounting /sdcard under recovery."
am: 948b9c30b4

* commit '948b9c30b4197a709846e604c8e571d90161b17f':
  Fix mounting /sdcard under recovery.
2016-01-12 22:32:11 +00:00
Tao Bao
3f56a33041 Fix mounting /sdcard under recovery.
The CL in [1] changed to create a symlink to /storage/self/primary for
/sdcard. It breaks the mount of /sdcard under recovery.

[1] commit 595003a3d06a13862052ef2f4f578371dae5ad65

Bug: 26509280
Change-Id: I98d02d54d707c2c8826c5ee119cf1a3ffa0c4bc9
2016-01-12 11:40:30 -08:00
Ying Wang
0f0b6962ed Merge "Generate .c for .y and .l"
am: 873eeec194

* commit '873eeec1944c46cd50779cd4fc8d4cd8ca0457ea':
  Generate .c for .y and .l
2016-01-12 18:57:03 +00:00
Ying Wang
50b3d28dcc Merge "Move "include configure_local_jack.mk""
am: 5799af6563

* commit '5799af6563c2da0a3730f1d4e007052c429ccaf8':
  Move "include configure_local_jack.mk"
2016-01-12 18:56:53 +00:00
Ying Wang
873eeec194 Merge "Generate .c for .y and .l" 2016-01-12 17:35:30 +00:00
Ying Wang
64088f2459 Generate .c for .y and .l
- For .l/.y source files, generate .c files; for .ll/.yy source files,
  generate c++ files.
- Simplified the rules by adding the generated sources to
  my_generated_sources.
- Simplified generated header file naming by always using .h extension
  with bison's "--defines=" option.
- Removed the unnecesarry conditional inclusion to the generated
  headers. Bison already automatically generates such things.

Bug: 26492989
Change-Id: I9ab6dc149c258f7642bc36c3fa32f90ff7ee51a4
2016-01-11 17:41:56 -08:00
Zach Jang
a9ac12d276 Updating security patch string to 2016-03-01 am: c24c6ccd4d am: 293887c43e am: 53e7d9bf7f am: c9da4cce57 am: 6c61548bb7 am: 6facd249d5 am: 1b29f2f9c9
am: b0b568b5c8

* commit 'b0b568b5c8731e40c53a6bfc3149a3720d1a2570':
  Updating security patch string to 2016-03-01
2016-01-12 01:40:37 +00:00
Zach Jang
b0b568b5c8 Updating security patch string to 2016-03-01 am: c24c6ccd4d am: 293887c43e am: 53e7d9bf7f am: c9da4cce57 am: 6c61548bb7 am: 6facd249d5
am: 1b29f2f9c9

* commit '1b29f2f9c97bc1b099712cd7c93c31e7f7a18ad1':
  Updating security patch string to 2016-03-01
2016-01-12 01:38:31 +00:00
Zach Jang
6facd249d5 Updating security patch string to 2016-03-01 am: c24c6ccd4d am: 293887c43e am: 53e7d9bf7f am: c9da4cce57
am: 6c61548bb7

* commit '6c61548bb7e426704760c9351e3211fb45d67dae':
  Updating security patch string to 2016-03-01
2016-01-12 01:33:23 +00:00
Zach Jang
6c61548bb7 Updating security patch string to 2016-03-01 am: c24c6ccd4d am: 293887c43e am: 53e7d9bf7f
am: c9da4cce57

* commit 'c9da4cce57d387f52b675d1024459af5e73c6dbc':
  Updating security patch string to 2016-03-01
2016-01-12 01:30:53 +00:00
Zach Jang
c9da4cce57 Updating security patch string to 2016-03-01 am: c24c6ccd4d am: 293887c43e
am: 53e7d9bf7f

* commit '53e7d9bf7f298c438157dccc5222b7484b083d9e':
  Updating security patch string to 2016-03-01
2016-01-12 01:28:37 +00:00
Zach Jang
53e7d9bf7f Updating security patch string to 2016-03-01 am: c24c6ccd4d
am: 293887c43e

* commit '293887c43ee5b797f8628f5983f64bf766002009':
  Updating security patch string to 2016-03-01
2016-01-12 01:26:41 +00:00
Zach Jang
293887c43e Updating security patch string to 2016-03-01
am: c24c6ccd4d

* commit 'c24c6ccd4d5de8be010b74b9021b8fdb926e1dad':
  Updating security patch string to 2016-03-01
2016-01-12 01:24:55 +00:00
Zach Jang
c24c6ccd4d Updating security patch string to 2016-03-01
b/26499556

Change-Id: I18a5ad9d8d08e2050053bcebc1a9a0c46db86733
2016-01-11 17:12:37 -08:00
Colin Cross
861ab99536 Ignore Android.mk files with USE_SOONG=true
When USE_SOONG=true, ignore any Android.mk file that has an Android.bp
file in the same directory.

Change-Id: Id79bd90c2aed5dafc2f8ad2c5b7eb0aa6e81dc18
2016-01-11 13:43:27 -08:00
Ying Wang
a8f28ff859 Move "include configure_local_jack.mk"
Move "include configure_local_jack.mk" out of the scope of
"ifdef LOCAL_RESOURCE_DIR".

Change-Id: I67bbb4e6b59414559219d24136ff91ba799fda25
2016-01-11 13:34:16 -08:00
Dan Willemsen
eff0611096 Add -Werror=date-time to target builds
The lack of a changing timestamp improves reproducibility of builds, and
helps create smaller OTAs.

Bug: 24204119
Change-Id: I68acfb53be962ffd5c488337517dadb950a13b6f
2016-01-08 16:29:50 -08:00
Shinichiro Hamaji
bb1207f99c Merge "Have symbol versions in .so.toc files"
am: c610c42b99

* commit 'c610c42b99c0f9570492731911199ae75d1ad9c0':
  Have symbol versions in .so.toc files
2016-01-07 05:17:27 +00:00
Shinichiro Hamaji
c610c42b99 Merge "Have symbol versions in .so.toc files" 2016-01-07 05:14:37 +00:00
Josh Gao
5774bafd18 Merge "Kill BOARD_MALLOC_ALIGNMENT."
am: 1ad7edd5e4

* commit '1ad7edd5e46793bee4450a7d6deadc39538dbf54':
  Kill BOARD_MALLOC_ALIGNMENT.
2016-01-06 22:54:05 +00:00
Josh Gao
b1171e4a31 Kill BOARD_MALLOC_ALIGNMENT.
Bug: http://b/26403338
Change-Id: I55d2c417d972f78caddc5fb28a065807feb86b0a
2016-01-06 14:15:46 -08:00
Josh Gao
3fe35f9775 Merge "Replace MALLOC_IMPL with MALLOC_SVELTE."
am: 9fb0221abe

* commit '9fb0221abedf9c8aadbe0d5efd7797ff9b293a46':
  Replace MALLOC_IMPL with MALLOC_SVELTE.
2016-01-06 20:30:24 +00:00
Shinichiro Hamaji
2b0caa3a67 Have symbol versions in .so.toc files
Use readelf --dyn-syms instead of nm, filtering out addresses
and sizes of symbols.

Bug: 26412928
Change-Id: I061ffb428076a79c7b255381ae4d4f8a8e7a4bd7
2016-01-06 15:13:25 +09:00
Josh Gao
a4f00d74fc Replace MALLOC_IMPL with MALLOC_SVELTE.
Bug: http://b/26390299
Change-Id: Ib1bef4aa272033412bea57a9bccf1d67793d2bda
2016-01-05 13:08:45 -08:00
Dan Willemsen
c4ba49dbec Merge "Prevent changes to COMMON_GLOBAL_C(PP)FLAGS"
am: d443abf1aa

* commit 'd443abf1aaa12c1b0fb82c940df60046c06aaed7':
  Prevent changes to COMMON_GLOBAL_C(PP)FLAGS
2016-01-05 05:52:06 +00:00
Dan Willemsen
d443abf1aa Merge "Prevent changes to COMMON_GLOBAL_C(PP)FLAGS" 2016-01-05 05:47:43 +00:00
Tao Bao
7da6338cf3 Merge "Build delta_generator for A/B update."
am: bf4213ebae

* commit 'bf4213ebaee1c505fa5070419aba4cd5ddccaae2':
  Build delta_generator for A/B update.
2016-01-04 19:51:30 +00:00