Commit Graph

9213 Commits

Author SHA1 Message Date
Narayan Kamath 900e9e6392 Merge "Add java.lang.invoke to the package whitelist." 2016-07-22 09:33:16 +00:00
Colin Cross 921be36569 Merge "Split -isystem headers into separate variables" 2016-07-21 17:51:13 +00:00
Narayan Kamath 497c35c1a7 Add java.lang.invoke to the package whitelist.
Tracks libcore change that adds the first classes from this package
to core-oj.jar. Note that packages need to be whitelisted even if
the classes in question aren't public API.

Test: make checkbuild docs

Change-Id: I917dc63899124ca30bbeb2902787faea6754bb43
2016-07-21 15:27:09 +01:00
Colin Cross 23ba612aad Split -isystem headers into separate variables
Split the variables that contain header directories into ones that
should be prefixed with -isystem and ones that should be prefixed with
-I in preparation for moving some headers from -isystem to -I.

Add $(wildcard) around SRC_HEADERS to match the soong behavior, and move
users of SRC_HEADERS from config.mk to binary.mk so that the exported
soong value is present.

Test: no changes to build.ninja compile rules
Change-Id: Iadecbbf4351a01e53cb57e721d31f4f836bb82d9
2016-07-20 23:09:29 -07:00
Treehugger Robot 6131119708 Merge "Recognize new clang and clang-tidy warnings." 2016-07-20 22:57:29 +00:00
Chih-Hung Hsieh c21ddbdcce Recognize new clang and clang-tidy warnings.
* Count new clang-tidy warnings:
    google-runtime-references
    google-runtime-operator
* Count new clang warnings:
    -Wconst-conversion similar to -Wliteral-conversion
    -Wundefined-var-template
* Modified static analyzer warning message about
    "Null passed to a callee that requires a non-null ..."
* Disable google-runtime-references by default and
  disable misc-macro-parentheses in vendor projects;
  too many old C/C++ code have this warning.

Change-Id: Ib35e0af85875aada17c92b0237b76cd5ae3bfcc8
Test: build with clang-tidy.
2016-07-20 14:45:01 -07:00
Treehugger Robot 95fa32b577 Merge "Factor out common include directories into helper" 2016-07-20 21:11:22 +00:00
Fang Deng 14df2ef4d0 Merge "Remove GOMA_HERMETIC form goma.mk" 2016-07-19 23:32:37 +00:00
Colin Cross e25fd79337 Factor out common include directories into helper
Refactor includes in transform-*-to-o to simplify future changes to the
default include paths.

Test: whitespace-only changes to the compile rules in build.ninja
Change-Id: I766af1f22a4838d933691b6df37530db3ba4e21d
2016-07-19 15:09:50 -07:00
Stephen Hines b1beb6f274 Merge "Switch to prebuilt clang-3016494" 2016-07-19 22:02:31 +00:00
Fang Deng c0829a5899 Remove GOMA_HERMETIC form goma.mk
This CL removes the GOMA_HERMETIC setting from goma.mk so that
the default setting will be used. By default, GOMA will fallback
to local compiler if the exactly matched compiler is not available.

Change-Id: I22c83594f6bd30bc8ed1334ab7bb256ef218567b
2016-07-19 20:58:22 +00:00
Pirama Arumuga Nainar 1679c3649b Disable warnings triggered in Clang r271374
http://b/28149048
http://b/29823425

Disable -Wnull-dereference.  The second bug above tracks that this
warning gets re-enabled.

Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.

Change-Id: Ie41a495dd9bb247d3609f4848d7669d1faaeeb79
2016-07-19 20:32:28 +00:00
Pirama Arumuga Nainar d1c2ff4f06 Switch to prebuilt clang-3016494
Test: Tested build, boot and common usage for Arm, Arm64, x86, x86_64,
Mips images in AOSP and internal branch.

Bug: http://b/29823425
Change-Id: I97299c8b41ff9d3ac7019a349aa569609a099233
2016-07-19 20:32:21 +00:00
Dan Willemsen 575a023039 Merge "Rename libevent-host to libevent" 2016-07-18 19:18:32 +00:00
Colin Cross d08699e464 Only add linker_asan as dependency to shared executables
linker_asan is only needed by shared exectuables, prevent adding it as a
dependency of anything else.  Avoids a dependency loop from
linker_asan -> linker -> linker_asan.

Change-Id: Id7744ad8a5901468518fac80741c75e764adb559
2016-07-17 15:30:46 -07:00
Treehugger Robot 1e92cfb9a0 Merge "Add support for LOCAL_MODULE_SYMLINKS" 2016-07-15 21:34:33 +00:00
Colin Cross 744d33b381 Add support for LOCAL_MODULE_SYMLINKS
Specifying LOCAL_MODULE_SYMLINKS will create symlinks to the installed
module in the same directory.

Change-Id: Idecb2b75f0c9999eb000eed9a79a989244ccf6c2
2016-07-15 12:22:39 -07:00
Badhri Jagan Sridharan 70a9714625 Merge "Add build variant to kernel command line" 2016-07-15 17:00:13 +00:00
Dan Willemsen ef31fc6477 Rename libevent-host to libevent
There's no need to use a different name for target and host modules, and
in Soong, it's better to use the same for both.

Change-Id: Ib2d8d0cc8a1e0f7f95d7c2795a360f02d946fa1a
2016-07-13 23:47:24 -07:00
Dan Willemsen 4598fbc9dd Allow prebuilts to specify mini-debug-info
So that Soong can specify the default that's used by Make.

Change-Id: I0c1062ad8f21df8b9a483f99dce679a1434e4859
2016-07-13 17:39:56 -07:00
Dan Willemsen 913892fada Pass ENABLE_CPUSETS and ENABLE_SCHEDBOOST to Soong
Change-Id: I75c0d60854f2ea3d2e4e4d6dcbc6845e3b0336ad
2016-07-12 15:00:46 -07:00
Dan Willemsen ac1fe5c8b2 Turn ndk link check warning into error
All instances of this have been removed from the downstream trees. The
APK->JNI_SHARED_LIBRARY and Java->Java checks remain as warnings.

Change-Id: I3eaee284500deee0f26a4f9cdd96497e99ec533e
2016-07-12 13:10:31 -07:00
Colin Cross 8bc18d35ec Merge "Remove Android.bp logic from makefiles" 2016-07-12 16:15:55 +00:00
Colin Cross 65543c7bc2 Remove Android.bp logic from makefiles
When Soong was optional, the make build system needed extra complexity
to ignore Android.mk files that had an associated Android.bp file.  Now
that Soong is required and the Android.mk files that were obsoleted by
an associated Android.bp file have been removed, remove all of the logic
that found associated Android.bp files.  Android.mk files and Android.bp
files are now handled independently.

Change-Id: Ia6643d151b920689219ca8abd59ede44d230ba35
2016-07-11 16:57:33 -07:00
Dan Willemsen 62dfb591b1 Extend SDK link check to java libraries
Java code using the SDK should not link to java code built with the
platform APIs or the system SDK. Java code using the system SDK should
not link to the platform APIs either, but it can link to java code using
another SDK.

Change-Id: Iaae0a7e01993cfa1e023649fbd8a7974b5eca709
2016-07-09 04:42:15 +00:00
Treehugger Robot aa3525dcf1 Merge "Support LOCAL_STRIP_MODULE := keep_symbols for prebuilts" 2016-07-07 19:14:54 +00:00
Colin Cross 5d934c7924 Support LOCAL_STRIP_MODULE := keep_symbols for prebuilts
Change-Id: I92a838b07fe4116d5a4b8521fe1ce8d44e6e84e2
2016-07-07 11:16:49 -07:00
Dan Willemsen 59a405c831 Merge "Never add asan libraries to NDK code" 2016-07-07 17:07:43 +00:00
Evgenii Stepanov 7dcb8b80c5 Apply SANITIZE_TARGET=safe-stack to 64 bit targets only.
Bug: 27729263
Change-Id: I214a9f40b94f6e6716aca05be774f014e62f73e8
2016-07-01 20:07:38 +00:00
Evgenii Stepanov 71faa1990b Apply SANITIZE_TARGET and LOCAL_SANITIZE when both are present.
The idea is that targets with LOCAL_SANITIZE = signed-integer-overflow
and SANITIZE_TARGET=safe-stack should get both sanitizers.
This should work just fine for SANITIZE_TARGET=address, too.

Bug: 27729263
Change-Id: Ifee350da4877008fb061bc7f6c700e7fade405bc
2016-07-01 20:06:34 +00:00
Treehugger Robot 9d73af0934 Merge changes I17a96b97,Ib4412657,I73e6d479
* changes:
  Build: Add module-level product configuration of sanitization
  Build: Add option to restrict sanitization by owner
  Build: Add option to restrict sanitization by architecture
2016-07-01 04:26:26 +00:00
Treehugger Robot 2302a76966 Merge "Build: Fix vendor sanitizer library for secondary arch" 2016-07-01 04:24:46 +00:00
Andreas Gampe cf6268f471 Build: Fix vendor sanitizer library for secondary arch
Fix the directory for secondary-architecture libraries under
sanitization. These incorrectly wrote into vendor/lib instead
of data/vendor/lib.

Bug: 29498013
Change-Id: Iee08422a1f7ad42cbe71a322347e98cb74e3ef7f
2016-06-30 20:20:38 -07:00
Evgenii Stepanov 912b51f8ab Sanitizer build tweaks.
-Wl,-no-undefined is currently disabled for any SANITIZE_TARGET. Limit that to
the sanitizers with a runtime library (i.e. address, thread).

Re-enable the relocation packer for ASan. This has been fixed upstream a long
time ago.

Bug: 27729263
Change-Id: I566df6104de816223dc1c519d41a87629ce9c47c
2016-07-01 00:41:33 +00:00
Evgenii Stepanov 55f73e6c43 Only add libdl dependency for ASan/TSan on target.
Only sanitizers that intercept stuff need that. For example,
SafeStack does not, and I think UBSan too.

Bug: 27729263
Change-Id: I413cd46cc6c6914a363a3c53da7954beacd8f0d8
2016-06-30 23:49:03 +00:00
Andreas Gampe 6b30d770f0 Build: Add module-level product configuration of sanitization
To allow special sanitizer settings for modules shared between
products, add product-specific module settings.

This was copied from the product-specific dexopt settings.

Bug: 29498013
Change-Id: I17a96b975bb6ac7f4ffb3d5b08e2f00b21bd97a1
(cherry picked from commit bb5454b6db)
2016-06-30 16:21:36 -07:00
Andreas Gampe 3d3b0c950d Build: Add option to restrict sanitization by owner
Add Make variable SANITIZE_NEVER_BY_OWNER to selectively
sanitize modules. By default, both are being sanitized. The
value of the variable is interpreted as a space or colon
separated list of owner names.

This can be used to create builds that lower the sanitization
burden by not sanitizing parts of the platform.

Bug: 29498013
Change-Id: Ib4412657fd38ff28a5c0863eddc2acde63c88ebb
(cherry picked from commit ea38d8e95d)
2016-06-30 16:20:03 -07:00
Andreas Gampe cd25740cba Build: Add option to restrict sanitization by architecture
Add Make variable SANITIZE_ARCH to selectively sanitize binaries.
This uses the "bitness," i.e., 32 or 64, to potentially filter
the sanitization. By default, both are being sanitized.

This can be used to create builds that lower the sanitization
burden by not sanitizing "half" of the platform.

Bug: 29498013
Change-Id: I73e6d479f08a970ba912f4f63967d32f3487125f
(cherry picked from commit 0290a416c8)
2016-06-30 16:19:53 -07:00
Evgenii Stepanov 428236614a Add LOCAL_NOSANITIZE.
This can be used to selectively disable individual sanitizers on a
target. For example, some parts of libc should be built with
SafeStack (when requested with SANITIZE_TARGET), but never with
AddressSanitizer. Current build rules specify LOCAL_SANITIZE := never
to disable AddressSanitizer; the idea is to change that to
LOCAL_NOSANITIZE := address thread.

Bug: 27729263
Change-Id: I2b770f2ce3faf6ad6798792327e96adb86fe4a4f
2016-06-30 22:49:17 +00:00
Dan Willemsen 88225fdfbe Detect `uname -m` == i686 as a 32-bit host
Change-Id: I0350629ce6ea7a5f0224489bafc98bc190e70932
Test: UNAME from https://groups.google.com/d/msg/android-building/nGQna2xuW5s/eEcXSo9ZBgAJ
2016-06-29 12:30:56 -07:00
Yi Kong d2f4cbbf88 Merge "Add jdk.net to whitelist" 2016-06-29 11:00:47 +00:00
Dan Willemsen f761c0f574 Never add asan libraries to NDK code
We're beginning to enforce (still warning) that NDK code only links to
other NDK code. So we should never need to link them to the address
sanitizer libraries.

This breaks down a bit when platform code starts depending on NDK-built
code, where the NDK-built code should be mostly the same as if it was
built with the platform, but has an implicit LOCAL_SANITIZE := never.
Even so, this change shouldn't make that worse, as we'll still compile
fine, and anything platform code that uses asan should pull in the
shared library.

Change-Id: I81b30b9edd971468c3cb1467f809f184807b505e
2016-06-28 16:47:43 -07:00
Badhri Jagan Sridharan 997c9af7b1 Add build variant to kernel command line
Verity is not enabled in eng builds. Pass the build variant so
that kernel does not try to enable verity in eng builds

BUG:29276559
Change-Id: I7f412196ac59aa63e91c21d825ad15bae9f51691
2016-06-28 23:36:45 +00:00
Badhri Jagan Sridharan 131e1977f6 Extract public key ID from cert
Extracts keyid inline using openssl commands.
The keyid is passed as one of the kernel command line parameters
for the dm-android-verity module to mount root fs(system)
with verity enabled.

(cherry-picked from 3af315aed5
https://googleplex-android-review.git.corp.google.com/#/c/1061691/)

BUG: 28384658
Change-Id: I8efbe1b0e415ef1d396f9b51cfa4b3fa01b22484
2016-06-28 23:35:41 +00:00
Dan Willemsen 9efeb1ea4f Turn unused source files from warning to error
All instances have disappeared from the build server, so switch this to
error before more turn up.

Change-Id: Iac07526a6e77ebf33733033249f2a108aae3fa7d
2016-06-28 10:22:08 -07:00
Hung-ying Tyan 3c054d8e1f Add VENDOR_PRODUCT_RESTRICT_VENDOR_FILES
Allow exceptions specified by module (VENDOR_EXCEPTION_MODULES) and
path (VENDOR_EXCEPTION_PATHS, not including leading vendor/).

BUG=26968426

Change-Id: I068e43f3eae14f8793c33ae916d46979ab1681d1
2016-06-28 10:10:53 +08:00
Christopher Wiley dc9e2675e6 Fix typo in setting PRIVATE_MODULE for AIDL source
Bug: 29619260
Change-Id: I59f883c1a92075800844cc2a77b307782a9ab800
2016-06-24 13:13:52 -07:00
Yi Kong 066a9c3e53 Add jdk.net to whitelist
Tracks libcore commit a434f3be3c22c6b3e7ddd426766808e76a5780fd

Bug: 29067535
Change-Id: I764b602aa0f2a991dc26b5fd42a1143bb58d67ba
2016-06-24 18:57:55 +01:00
David Sehr 49fbdd1f28 Filter logging from dexdump/dex2oat to errors only
Change-Id: Idb3f1c3d216e2db87ce3b03cbacc6fc3ceff37e0
2016-06-24 09:27:00 -07:00
Christopher Wiley d9205ba17e Fix path escaping for aidl generated java
Bug: 29619260
Change-Id: I806044573661c61e691adf36a47092188db87ab6
Test: Generated java with ../ in paths appears in the right place.
2016-06-23 16:49:32 -07:00