Commit Graph

25985 Commits

Author SHA1 Message Date
Neil Fuller d49e55561a Merge "Set -Xdoclint:none" 2015-12-17 10:18:28 +00:00
Dan Willemsen e63d3328df Merge "Define __BRILLO__ only for target modules" 2015-12-16 23:30:40 +00:00
Dan Willemsen 3931873418 Merge "Move __BRILLO__ to the core build system" 2015-12-16 23:14:09 +00:00
Dan Willemsen de6494b9ae Define __BRILLO__ only for target modules
__ANDROID__ is only defined for target modules, do the same for
__BRILLO__.

Change-Id: Ie1417e1a5b21c051acf05b2bd3bdb3ddd31be878
2015-12-16 15:04:51 -08:00
Dan Willemsen 16e7e0f556 Move __BRILLO__ to the core build system
In preparation for locking down COMMON_GLOBAL_CFLAGS.

Bug: 26165350
Change-Id: Ifdfb7808c1e1b624ffb0f99ab443ec2c5503a81c
2015-12-16 14:28:21 -08:00
Todd Poynor ffce16c7e6 Merge "Make squashfs sparse image generation optional" 2015-12-16 22:12:53 +00:00
Ying Wang e9430e2361 Merge "make USER limited to 6 characters when generating BUILD_NUMBER" 2015-12-16 21:42:07 +00:00
Narayan Kamath 8abec039ff Set -Xdoclint:none
Mac builds use a javadoc tool that fails on more warnings than linux
builds.  Add -Xdoclint:none to all java 8 standard doclet javadoc
commands.

Don't add it to javadoc commands that use the com.google.doclava.Doclava
doclet, it doesn't understand -Xdoclint:none.

(cherry-picked from commit 8bf7b5d51a)

Change-Id: Ic5b8431ec2facb7989473b06ebe07246f6d2317f
2015-12-16 19:26:02 +00:00
Gina Dimino 36412fa8f9 Merge "Docs: Replace custom search engine Bug: 25778395" 2015-12-16 18:49:42 +00:00
Gina Dimino 8cc3a9e117 Docs: Replace custom search engine
Bug: 25778395

Change-Id: I432698f63088a3e4ec285e46c7de2295c4cefad3
2015-12-16 10:00:33 -08:00
Than McIntosh 9d76c75782 Merge "Re-enable gold linker for aarch64." 2015-12-16 12:02:04 +00:00
weiqiao c9219c2c73 make USER limited to 6 characters when generating BUILD_NUMBER
BUILD_NUMBER is use to generate ro.build.description and
ro.build.display.id, if USER is long, these properties will
exceed 91 characters easily.

Change-Id: I7f99ef351f80210172a873104edd980b36c3f8f1
Signed-off-by: weiqiao <qiaowei224@gmail.com>
2015-12-16 13:28:21 +08:00
Todd Poynor b2a555e6fc Make squashfs sparse image generation optional
Allow non-sparse squashfs image generation, a la ext filesystems.

Bug: 26218766
Change-Id: Ifd596af16411e0cf69a2e7e05d725fd9442dc79c
2015-12-15 20:11:12 -08:00
Colin Cross 61b771e79f Merge "Tell soong that it is embedded in a make build" 2015-12-16 01:47:14 +00:00
Dan Willemsen 5f38f9be22 Tell soong that it is embedded in a make build
So that it can munge its ninja targets to not conflict with make.

Change-Id: I0c2273c0ca2fdfced1fa1590f2ea3eac8cddb905
2015-12-16 01:47:02 +00:00
Colin Cross 3bfc560cc5 Merge "Combine soong builds into make builds" 2015-12-16 01:46:52 +00:00
Colin Cross e416a5f716 Merge "Remove unneccessary TARGET_BUILD_APPS conditional" 2015-12-16 00:56:08 +00:00
Colin Cross 3ebb2f7326 Combine soong builds into make builds
Bootstrap soong if necessary, and wrap the kati and soong ninja files
into a single ninja file.

Change-Id: I0000c7eaa1adda763189681c57ec27a97a12ee1f
2015-12-15 16:05:57 -08:00
Colin Cross 493205eee4 Remove unneccessary TARGET_BUILD_APPS conditional
The prebuilt tools no longer conflict with the tools built from source,
remove the conditional.

Change-Id: Id334e25d9cfa2d5934450dd223bc9e30cd890062
2015-12-15 15:49:53 -08:00
Ying Wang cff032ca54 Merge "Remove the prebuilt tools cleanstep logic." 2015-12-15 21:45:44 +00:00
Ying Wang a79e1324a0 Remove the prebuilt tools cleanstep logic.
We switched to running prebuilt host tools in place in
prebuilts/sdk/tools in TARGET_BUILD_APPS build. This logic is no longer
needed.

Change-Id: Ibf88b3c0a09fb3a1a04b25403457c48851ecc6f4
2015-12-15 12:39:02 -08:00
Ying Wang 7b92312ea1 Merge "Disable .toc optimization for host modules." 2015-12-15 18:56:39 +00:00
Ying Wang c01f2dcb10 Disable .toc optimization for host modules.
Host binaries may be run during the build process and the internal
implementation of the shared libraries makes a difference for the build
result. This change makes sure host tools get re-linked and re-run when
any of its dependency libraries gets updated.
DEX2OAT is such a host tool. We also changed DEX2OAT as full dependency
of dex-preoptimization, so we rebuild the odex files if DEX2OAT itself,
or any dependency libraries changed.

Bug: 24597504
Change-Id: Idf0d9be82ccebd826d9c5b405a39cff437e0af29
2015-12-15 10:00:19 -08:00
Than McIntosh 2c3b926ab3 Re-enable gold linker for aarch64.
Turn back on ld.gold and W-l,--icf=safe for
aarch64, now that the prebuilt ld.gold has been updated
with support for reloc 311/312 (fixed upstream, see
https://sourceware.org/bugzilla/show_bug.cgi?id=19042)

Bug: 25642296
Bug: 26153840

Change-Id: Idceb357a48d9da4eec38ab8f2103245d500622ae
2015-12-15 09:27:19 -05:00
Shinichiro Hamaji 542aa57f1d Merge "Reduce unnecessary rebuilds of .dex files with restat=1" 2015-12-15 06:27:31 +00:00
Elliott Hughes 6725b4b004 Merge "Turn on stack protector for mips64." 2015-12-14 22:48:38 +00:00
Elliott Hughes 09ba4c870d Turn on stack protector for mips64.
Go straight to -fstack-protector-strong, since it works to boot the emulator.

Change-Id: I2b65a0ab4426856ae05f66c1e294951e45bd72b6
2015-12-14 14:46:38 -08:00
Elliott Hughes 391caae952 Merge "Turn on stack protector for mips." 2015-12-14 22:46:23 +00:00
Elliott Hughes b9b89e9385 Turn on stack protector for mips.
Go straight to -fstack-protector-strong, since it works to boot the emulator.

Change-Id: Ie44abd869355d2163dec7d9e2635b26b45255df6
2015-12-14 14:15:12 -08:00
Elliott Hughes 02191c97ef Merge "Enable -fstack-protector-strong for x86-64." 2015-12-14 21:45:40 +00:00
Elliott Hughes 19e85a25ee Merge "Be smarter about stack-protector on the host." 2015-12-14 21:41:58 +00:00
Elliott Hughes 505e4ec646 Be smarter about stack-protector on the host.
Some projects are still built with our host GCC 4.8, which doesn't
support -fstack-protector-strong. The combo .mk files are used by
GCC and clang, so it's not safe to turn on -fstack-protector-strong
there. Instead, do it in the clang-specific .mk for now.

We can clean this up when elfutils (the last code built for the host
with GCC that I'm aware of) is built by clang. We'll be able to
remove the host GCC prebuilts too!

Change-Id: I314b9eab071c132a8e2cb8cc779a75ae8abb12e2
2015-12-14 13:20:59 -08:00
Elliott Hughes 7abad39b78 Merge "Enable -fstack-protector-strong for x86." 2015-12-14 21:05:21 +00:00
Elliott Hughes a4b3d20d28 Merge "Enable -fstack-protector-strong for the host." 2015-12-14 20:31:10 +00:00
Elliott Hughes 5324c3c19f Enable -fstack-protector-strong for x86-64.
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).

The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.

https://lwn.net/Articles/584225/

Change-Id: I3ce7a73c5cf36eba5c74df37367f3d3475b0a4ed
2015-12-14 11:16:20 -08:00
Elliott Hughes 8ebc4d6aab Enable -fstack-protector-strong for x86.
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).

The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.

https://lwn.net/Articles/584225/

Change-Id: I55a9fdbf5777ccdeed9f2e9a23c73bb94ad7b646
2015-12-14 11:15:15 -08:00
Elliott Hughes ae316d2d59 Enable -fstack-protector-strong for the host.
This results in nearly all functions with the possibility of stack
corruption getting stack canaries, because it applies to any function
taking a reference to the frame or with a local array rather than just
the functions with arrays larger than 8 bytes. It was developed for use
in Chrome (and Chrome OS) and has also been adopted by various other
distributions (Arch, Fedora, Ubuntu, etc).

The code size increase ranges from ~1.5% to ~2.5%, compared to ~0.3% to
~0.7% with the more conservative switch. The increase in the performance
loss is usually minimal. The overall size increase once everything other
than C and C++ code is taken into account is minimal, and it greatly
improves the mitigation of stack buffer overflow vulnerabilities.

https://lwn.net/Articles/584225/

Change-Id: I97a2187cebac64e3b9f22b691d4676b6da083ebd
2015-12-14 11:14:21 -08:00
Shinichiro Hamaji f972a4a980 Reduce unnecessary rebuilds of .dex files with restat=1
The .dex.toc files are created by dexdump, which outputs all
information in a .dex file which may affect compilation of
other modules.

For prebuilt java libraries and static java libraries, we'll
output empty .toc files and don't set restat=1. .dex.toc files
are necessary even for static java libraries because they can
be referenced by LOCAL_JAVA_LIBRARIES (instead of
LOCAL_STATIC_JAVA_LIBRARIES).

We don't use this optimization for apps build. We cannot build
dexdump for apps build due to lack of libc++.

Performance:

$ m && touch \
  frameworks/base/core/java/com/google/android/util/Procedure.java \
  && time m
Before: 3m48s
After: 1m46s

Bug: 24597504
Change-Id: Id1665923b414dee705dc60af4c021390a19ea26f
2015-12-14 19:07:34 +09:00
Stephen Hines eca3206abb Merge "Revert "Change USE_CLANG_PLATFORM_BUILD default to true."" 2015-12-13 23:06:03 +00:00
Stephen Hines 7a0c88ec3e Revert "Change USE_CLANG_PLATFORM_BUILD default to true."
This reverts commit 3c8036da53.

Change-Id: I930bbebce8396d7c0abd847530640a696d3418e7
2015-12-13 22:58:22 +00:00
Nick Kralevich 154657f0e3 Merge "sepolicy: Fix 'avc denied' issues for the emulators" 2015-12-12 01:07:07 +00:00
Dan Albert 6674573897 Merge "Use lib64 for mips64 as well." 2015-12-12 00:09:16 +00:00
Dan Albert 445bc2fc2d Use lib64 for mips64 as well.
This was previously working because for some reason prebuilts/ndk had
a tangled mess of hand assembled symlinks that pointed lib -> lib64
for the multilib architectures.

Change-Id: I294d67f58f2008b1a53790cf676f5223df449cbc
2015-12-11 15:04:59 -08:00
Dan Willemsen e223965f0c Merge "Enforce linker version-scripts are valid" 2015-12-11 20:58:03 +00:00
Alex Klyubin 7884a63731 Merge "Make signapk use Conscrypt." 2015-12-11 18:29:36 +00:00
Chih-hung Hsieh eb486309d8 Merge "Change USE_CLANG_PLATFORM_BUILD default to true." 2015-12-11 16:54:13 +00:00
Alex Klyubin 9667b18f23 Make signapk use Conscrypt.
This makes the signapk tool use Conscrypt (where possible) instead of
the platform-default JCA providers and the Bouncy Castle JCA provider.
This speeds up (by 10-30%) APK and OTA update signing because
Conscrypt's crypto primitives are backed by BoringSSL.

Previously, the signapk tool consisted only of the signapk.jar.
Because Conscrypt is backed by native code, signapk now consists of
signapk.jar and crypto_openjdk_jni shared library. This requires that
users of the tool be updated to provide a suitable -Djava.library.path
argument to the Java runtime. This change updates all known users of
the tool inside the Android source tree to do so.

Bug: 26097626
Change-Id: I8411b37d7f771ed99269751a3007dff103083552
2015-12-11 08:36:42 -08:00
Miroslav Tisma 36a76ec098 sepolicy: Fix 'avc denied' issues for the emulators
This commit fixes the avc denied issues in the emulators:
- goldfish_setup is granted for network access
- netd dontaudit for sys_module
- qemu_prop is granted domain for get_prop

Critical issue was that SELinux denied reading the lcd_density property
by SurfaceFlinger via qemu_prop and this commit fixes it.

Change-Id: I633d96f4d2ee6659f18482a53e21f816abde2a5f
Signed-off-by: Miroslav Tisma <miroslav.tisma@imgtec.com>
2015-12-11 16:21:00 +01:00
Chih-Hung Hsieh 3c8036da53 Change USE_CLANG_PLATFORM_BUILD default to true.
When USE_CLANG_PLATFORM_BUILD is not set, default will be clang/llvm.
USE_CLANG_PLATFORM_BUILD=false can be used to select gcc as default.

BUG: 23163853
BUG: 26102335

Change-Id: I00604c2aef4849e8c3505b2c4002eb1c46cd1fd1
2015-12-10 14:41:55 -08:00
Alex Deymo 6950168f1d Merge "Rename libext2 host libraries to standard suffix." 2015-12-10 22:18:34 +00:00