Commit graph

26274 commits

Author SHA1 Message Date
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
1dde47d0b6 Merge "Remove unused config variables" 2016-03-01 18:49:37 +00:00
Dan Willemsen
469665ded5 Merge "Remove destination before copying file" 2016-03-01 18:20:06 +00: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
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
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
3bfc095f53 Merge "Remove USE_NINJA=false" 2016-02-29 22:16:14 +00:00
Nick Kralevich
1888ea5fef Merge "delete recovery policy on changing build types" 2016-02-29 16:44:37 +00:00
Nicolas Geoffray
239783a7ff Merge "Check LEGACY_USE_JAVA7 before using 1.8." 2016-02-29 12:27:58 +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
a9b464770b Merge "Link everything in libpthread.a to ckati" 2016-02-29 11:04:36 +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
Dan Willemsen
5e2e53e421 Merge "Make multiple rules to generate a file an error" 2016-02-27 05:12:28 +00:00
Tao Bao
1e0367410d Merge "releasetools: Add --oem_no_mount option." 2016-02-27 00:08:39 +00:00
Tao Bao
8608cde944 releasetools: Add --oem_no_mount option.
We may have devices with OEM-specific properties but without an OEM
partition (e.g. the properties might be set by init based on hardware
SKUs). For such devices, we supply --oem_no_mount to skip mounting the
OEM partition in the updater-script. The option is only meaningful when
-o (--oem_settings) is specified.

Bug: 27359929
Change-Id: Ic08396e478a82be4188e980e704b33b4f704a8d7
2016-02-26 16:07:16 -08: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
Tao Bao
1284954db0 Merge "releasetools: Support generating downgrade incremental OTAs." 2016-02-26 00:39:09 +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
0e0e95e592 Merge "Don't ignore LOCAL_INIT_RC if LOCAL_INIT_RC_32/64 is used." 2016-02-25 18:28:57 +00:00
Chih-hung Hsieh
1b460584d2 Merge "Use new clang scan-build script." 2016-02-25 17:16:54 +00:00
Chih-Hung Hsieh
42d5c292d9 Use new clang scan-build script.
The actual clang compiler called for static analysis is decided
by build/core/binary.mk, not the one given to --use-analyzer.

BUG: 13287788
Change-Id: I58105c20b56ce17ddf329a275c750d14284d1e25
2016-02-24 19:18:45 -08: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
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
78014dbaf6 Merge "Update to use the latest clang-2629532." 2016-02-24 21:11:13 +00:00
Tao Bao
5d1825664a releasetools: Support generating downgrade incremental OTAs.
Add --downgrade flag to ota_from_target_files.py script. It allows
generating an incremental OTA that updates from a newer build to an
older one (based on timestamp comparison). "post-timestamp" line in the
metadata file will be replaced by "ota-downgrade=yes". A data wipe will
always be enforced, so "ota-wipe=yes" will also be included in the
metadata file.

Bug: 26883782
Change-Id: Iaa05f662d948b7ab632a9fbb7051cc3f8bf68c21
2016-02-24 11:31:17 -08: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
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
de4078449f Merge "Make sure my_src_jar is set up properly for host prebuilt jar" 2016-02-23 18:06:01 +00:00
Calin Juravle
487479f301 Merge "Add profman to the build scripts" 2016-02-23 14:07:40 +00:00
Calin Juravle
c9e3d16fdb Add profman to the build scripts
Bug: 26719109
Bug: 26563023

(cherry picked from commit aab43390a0)

Change-Id: Idc49872eebb283436fcdd02fe095e8c8826aff44
2016-02-23 12:02:05 +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
622179a175 Merge "clang now supports -fdebug-prefix-map=." 2016-02-20 00:27:25 +00:00
Elliott Hughes
eb295fccb4 clang now supports -fdebug-prefix-map=.
Change-Id: Id0569831f09845871d8e6990c310516bea5a2510
2016-02-19 13:34:57 -08:00
Alex Klyubin
d131a5a813 Merge "Switch to production constant for v2 signing scheme ID." 2016-02-17 16:41:14 +00:00
Yohann Roussel
3a30ab182f Merge "Add support for testing obfuscated app with Jack" 2016-02-17 16:05:18 +00: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
Alex Deymo
1bd78f399f Merge "Include Brillo's cannonical .clang-format file." 2016-02-16 22:32:06 +00:00
Alex Deymo
665110e38c Include Brillo's cannonical .clang-format file.
Many Brillo repositories need to share a common .clang-format file to
ensure the same formatting rules. This patch moves the .clang-format
file already in system/core/metricsd to a common location to be shared
by other Brillo repositories.

Bug: 27121653
TEST=symlink from system/update_engine, ran clang-format.

Change-Id: Ie04a5a9cf54b9cc24f180fe3896501db4d883a64
2016-02-16 14:29:45 -08:00
Sami Tolvanen
3e0fdfba85 Merge "Clear logd intermediates" 2016-02-16 21:52:13 +00:00