Build: Add support for specifying build variant in brunch/breakfast

This little modification allows specifying build variant in brunch/breakfast commands. For example we can use "brunch i9300 user" to build user variant instead of default userdebug.

When no extra argument is given, userdebug is default.

Change-Id: I2d438209f8a14949c64baa66485c811da384d20b

Conflicts:

	envsetup.sh
build: Include an extra device.mk

Change-Id: I4373f78f57c81e46affc2f6a6bc854bf4c3d00db
build: Set ccache base to build top

This enables ccache sharing between different build tree paths.

Change-Id: I99636bdd2779a6ccf0649f027e35cf67df44b6ae
Don't set CCACHE_BASEDIR if its already set

 * enable use of shared ccache

Change-Id: Ic708a5d5169291d674b167aa2c87bf2c8adaafae
ota: Generate recovery-from-boot.p file

This may be wanted to update the recovery with system updates

Change-Id: Iacd41be7a8018cbc08b2606485d446756910f506
Change CM recovery install script filename [1/2]

This is part 1/2 to maintain backwards compatibility with CWM's
verify_root_and_recovery() function. CWM checks if install-recovery.sh
exists and has an executable flag set, then offers to disable the script
for the user. CM now controls this with the persist.sys.recovery_update
property which is configurable via settings, so we don't need to
double-check this.

This changes the name of the recovery install script to
install-cm-recovery.sh.

Change-Id: Ie08d428cfd092a1de10973ba5ffc326ccdb1a369
keys: avoid duplicating recovery keys

Setting PRODUCT_EXTRA_RECOVERY_KEYS duplicates the default key and
makes it so we can't set an extra key earlier in the build

Change-Id: I239d9994d9ad40b1779877ea2e89b55bd02e4c00
(cherry picked from commit ac8f2eb0472a4c4cf542e4a0a9b8f2c848174ccc)
ota: Allow devices to skip generation of recovery-from-boot.p

* Not all devices have a real recovery partition, so those devices
  should skip this generation step.

Change-Id: I4abc3f92b879e6997e4874543ec9772c3179b1d0
[test] pass TARGET_THUMB_STRICT and -O3 to clang

clang is used to compile mostly graphics related code in 4.4.X.
Upstream is moving to replace GCC with a newer clang/llvm, so we
should start getting familiar with it.. and perhaps switch to a
newer drop-in prebuilt with polly support soon

-VanirAOSP

Change-Id: Ic8eb6be6ba3a9cd472a4ec9c34c515c1f25d167e
Merge tag 'android-4.4.3_r1' into HEAD

Android 4.4.3 release 1

Change-Id: Ie4ad0f5e2785df0f5083e1bc93951ce389b293e5

Conflicts:
	core/Makefile
	core/build_id.mk
Merge tag 'android-4.4.3_r1.1' into HEAD

Android 4.4.3 release 1.1

Change-Id: I814a785dd9e199c1d1168fea761a20ddc897904a
Generate extra userdata partition if needed

* To support variants of devices which may come in 16/32/64GB variants.

Change-Id: I74c32d8316f0450a1445fe95a95e5cabb7a9dd1b
Update flags with memory optimizations

Credit to AOSPAL

Change-Id: Iad7a19fc7d25c2bb2b8bd82efdf368bc0e1de02a
Update flags with configurable strict aliasing

Change-Id: I3145c766c597016cfe7f1ce903cf7b3f5fb75fa8
Update flags with configurable suppress-unused-warning

Change-Id: If3771db6d99a5d623d4424f3972d720d5ca948c8
Dump SUPPRES_UNUSED_WARNING, STRICT_ALIASING and OPT_MEMORY

Change-Id: I67bcc98f6e60b84e0f81fb3fea51d818bbb190d5

Conflicts:
	core/dumpvar.mk
Change build zip name (2/2)

Change-Id: I618aa11978b667c686fd61b4eced834fbde4cb74
colorize non-fatal javac stderr yellow (and actually display it... at all)

woops!

Signed-off-by: nuclearmistake <nuclearmistake@gmail.com>
Change-Id: I984f428022a68a825aa041866e8d459bd6611f71
Fixed building incrementals when "no separate recovery" is specified.

Change-Id: I1d7add44554ebc4b68dc09debdd0c0fb229061a9
add option to generate two-step recovery files

When run with the -2 option, ota_from_target_files will generate a
package (full or incremental) that does some extra reboots in order to
install the new recovery first, so that the rest of the installation
is done with the new recovery.  This can be useful if (say) the
package installation needs some features from the newer kernel.

For incremental packages, the verification phase is still done with
the old recovery.

This is only supported on devices where the misc partition is EMMC
(not MTD).

Two-step packages are slower to install and possibly confusing to
users (they will see their device reboot four times instead of twice),
so only use this option if necessary.

cherry-picked from commit 9b23f2cd786b46991b7c0198e69264b17875288d

Conflicts:
	core/Makefile
	tools/releasetools/ota_from_target_files

Change-Id: I4d7b7f3fe45483d9b76bef8ee973eb4e2db4dcdd