OSDN Git Service

android-x86/build.git
8 years agoMerge "Record module type statistics"
Dan Willemsen [Fri, 29 Jul 2016 20:47:14 +0000 (20:47 +0000)]
Merge "Record module type statistics"

8 years agoRecord module type statistics
Dan Willemsen [Mon, 25 Jul 2016 23:03:53 +0000 (16:03 -0700)]
Record module type statistics

Creates a build_system_stats.txt build artifact that contains statistics
on how many BUILD_* modules are defined in a build. Also writes out
information about the Soong module types sent from the Soong build.

Merged-In: Iaf0c7062f542dc6942b5349854f3d49267cac4a5
Change-Id: Iaf0c7062f542dc6942b5349854f3d49267cac4a5

8 years agoMerge changes from topic 'soong-sysroots'
Dan Albert [Thu, 28 Jul 2016 15:58:51 +0000 (15:58 +0000)]
Merge changes from topic 'soong-sysroots'

* changes:
  Add a phony target for the NDK sysroots.
  Use the just built NDK headers and libs.
  Add LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES.

8 years agoAdd a phony target for the NDK sysroots.
Dan Albert [Thu, 28 Jul 2016 04:57:49 +0000 (21:57 -0700)]
Add a phony target for the NDK sysroots.

`make ndk` will build all the NDK sysroots.

Test: make ndk
Bug: http://b/27533932
Change-Id: Ic2f5bf61f8911f7b8d08a473f2fe0576f3e06224

8 years agoUse the just built NDK headers and libs.
Dan Albert [Thu, 21 Jul 2016 17:04:12 +0000 (10:04 -0700)]
Use the just built NDK headers and libs.

The list of libraries is currently empty. Will add migrated libraries
in a follow up patch.

Test: Still builds.
Bug: http://b/27533932
Change-Id: Ibd9750620ca2ae86fe888a8a993bd26493bc1c8a

8 years agoAdd LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES.
Dan Albert [Wed, 20 Jul 2016 18:02:18 +0000 (11:02 -0700)]
Add LOCAL_COPY_TO_INTERMEDIATE_LIBRARIES.

This allows a module to avoid being installed to the common library
directory.

Test: Prevents copying of NDK libraries with the NDK sysroot patches.
Bug: http://b/27533932
Change-Id: I24f11d5a70595bcd524ac5bd85034c226d2de211

8 years agoMerge "Handle multiple APKs from the same package in check_target_files_signatures...
Tao Bao [Thu, 28 Jul 2016 04:28:38 +0000 (04:28 +0000)]
Merge "Handle multiple APKs from the same package in check_target_files_signatures.py."

8 years agoHandle multiple APKs from the same package in check_target_files_signatures.py.
Tao Bao [Thu, 28 Jul 2016 02:45:43 +0000 (19:45 -0700)]
Handle multiple APKs from the same package in check_target_files_signatures.py.

We were using the package name as the key to index APKs. APKs from the
same package got messed up and gave wrong signature summary. Switch to
using the package filename as the key, which is identical in a given build.

Also fix the trailing space when printing the signature summary.

Bug: 30418268
Test: Run with a target_files.zip that has multiple APKs from the same package.

Change-Id: I6317e8c05e987c5690915e05c294153d10e2f0ab

8 years agoMerge "Link to shared libraries with the full paths."
Treehugger Robot [Wed, 27 Jul 2016 21:06:32 +0000 (21:06 +0000)]
Merge "Link to shared libraries with the full paths."

8 years agoLink to shared libraries with the full paths.
Dan Albert [Tue, 26 Jul 2016 18:54:47 +0000 (11:54 -0700)]
Link to shared libraries with the full paths.

This ensures that we're not accidentally linking the wrong version of
a library with the same name thanks to -L.

Test: Still builds.
Change-Id: I22e9e28412844ff4f8bda42ebbc300ea6574e474

8 years agoMerge "Pass binder ABI to Soong"
Treehugger Robot [Wed, 27 Jul 2016 00:14:59 +0000 (00:14 +0000)]
Merge "Pass binder ABI to Soong"

8 years agoMerge "Add option to dump HTML warnings per project."
Treehugger Robot [Tue, 26 Jul 2016 23:04:29 +0000 (23:04 +0000)]
Merge "Add option to dump HTML warnings per project."

8 years agoPass binder ABI to Soong
Dan Willemsen [Tue, 26 Jul 2016 03:23:58 +0000 (20:23 -0700)]
Pass binder ABI to Soong

Change-Id: I7a7f197a114c39ab3a4233d430d9c677f581b1f9

8 years agoMerge "Add performance* to default global tidy checks."
Treehugger Robot [Tue, 26 Jul 2016 22:44:36 +0000 (22:44 +0000)]
Merge "Add performance* to default global tidy checks."

8 years agoAdd option to dump HTML warnings per project.
Chih-Hung Hsieh [Fri, 22 Jul 2016 21:09:31 +0000 (14:09 -0700)]
Add option to dump HTML warnings per project.

* Use --byproject flag to dump warnings in HTML file by projects.
* Add external/google and vendor/google projects, vs other
  external/non-google and vendor/non-google projects.
* Refactor code in dumpcategory to dump warnings by projects
  when --byproject is specified.
* Recognize new compiler -Wvarargs warning pattern.
* No change to default HTML output format.

Change-Id: I2406ad392ab18683357ff0ee0cf6c41f87cf399c
Test: run through current build.log files.

8 years agoAdd performance* to default global tidy checks.
Chih-Hung Hsieh [Tue, 26 Jul 2016 21:27:03 +0000 (14:27 -0700)]
Add performance* to default global tidy checks.

* This enables 5 performance related checks:
    performance-faster-string-find
    performance-for-range-copy
    performance-implicit-cast-in-loop
    performance-unnecessary-copy-initialization
    performance-unnecessary-value-param
* Recognize these new warnings in warn.py.

Bug: http://b/27779618
Change-Id: I7af3fdc262dd44db90d3b62eb37c5eac5a2eaa01
Test: build with WITH_TIDY=1 and run warn.py with build.log

8 years agoMerge "Remove unused libraries from otatools."
Treehugger Robot [Tue, 26 Jul 2016 00:36:57 +0000 (00:36 +0000)]
Merge "Remove unused libraries from otatools."

8 years agoRemove unused libraries from otatools.
Alex Deymo [Mon, 25 Jul 2016 23:08:39 +0000 (16:08 -0700)]
Remove unused libraries from otatools.

libbrillo-http was actually never used but it was being liked into
delta_generator anyway.

Bug: None
TEST=`lddtree delta_generator` doesn't show librillo-http.

Change-Id: I69ac66c87847d925b5798cf261c79466a3ff432a

8 years agoMerge "Revert "Rename libevent-host to libevent""
Treehugger Robot [Sat, 23 Jul 2016 00:40:35 +0000 (00:40 +0000)]
Merge "Revert "Rename libevent-host to libevent""

8 years agoRevert "Rename libevent-host to libevent"
Dan Willemsen [Fri, 22 Jul 2016 23:16:30 +0000 (23:16 +0000)]
Revert "Rename libevent-host to libevent"

This reverts commit ef31fc6477e1424f507095d1478f21445d569a21.
It's now using unique_host_soname to use a different installed name,
but keeping the libevent module name.

Change-Id: I1cb6e8e670636089993054236b089da059629da1

8 years agoMerge "Add java.lang.invoke to the package whitelist."
Narayan Kamath [Fri, 22 Jul 2016 09:33:16 +0000 (09:33 +0000)]
Merge "Add java.lang.invoke to the package whitelist."

8 years agoMerge "Count warnings per project and dump out CSV format."
Chih-hung Hsieh [Fri, 22 Jul 2016 00:54:50 +0000 (00:54 +0000)]
Merge "Count warnings per project and dump out CSV format."

8 years agoCount warnings per project and dump out CSV format.
Chih-Hung Hsieh [Thu, 21 Jul 2016 21:22:53 +0000 (14:22 -0700)]
Count warnings per project and dump out CSV format.

* No change to html output, except removing unused "PageTop" anchor.
* Add --gencsv flag to output a CSV file instead of html file.
  CSV files are combined to a table for dashboard charts.
* Count warnings from selected source project directories.
* CSV output lines are:
   num_of_warnings,project_name,warning_description
* project_name is empty for sum of warnings from all projects.
* warning_description could be:
  (1) "<severity>: <warning type description>"
      for one warning type, or
  (2) "<severity> warnings"
      for all warning types of the severity.

Change-Id: I1cf976ed0cf142091226b22665b7f28d383608fd
Test: run through current build.log files.

8 years agoMerge "Split -isystem headers into separate variables"
Colin Cross [Thu, 21 Jul 2016 17:51:13 +0000 (17:51 +0000)]
Merge "Split -isystem headers into separate variables"

8 years agoAdd java.lang.invoke to the package whitelist.
Narayan Kamath [Thu, 21 Jul 2016 11:06:57 +0000 (12:06 +0100)]
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

8 years agoSplit -isystem headers into separate variables
Colin Cross [Wed, 20 Jul 2016 19:22:57 +0000 (12:22 -0700)]
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

8 years agoMerge "Recognize new clang and clang-tidy warnings."
Treehugger Robot [Wed, 20 Jul 2016 22:57:29 +0000 (22:57 +0000)]
Merge "Recognize new clang and clang-tidy warnings."

8 years agoRecognize new clang and clang-tidy warnings.
Chih-Hung Hsieh [Wed, 20 Jul 2016 17:08:51 +0000 (10:08 -0700)]
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.

8 years agoMerge "Factor out common include directories into helper"
Treehugger Robot [Wed, 20 Jul 2016 21:11:22 +0000 (21:11 +0000)]
Merge "Factor out common include directories into helper"

8 years agoMerge "Remove GOMA_HERMETIC form goma.mk"
Fang Deng [Tue, 19 Jul 2016 23:32:37 +0000 (23:32 +0000)]
Merge "Remove GOMA_HERMETIC form goma.mk"

8 years agoFactor out common include directories into helper
Colin Cross [Tue, 19 Jul 2016 20:19:21 +0000 (13:19 -0700)]
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

8 years agoMerge "Switch to prebuilt clang-3016494"
Stephen Hines [Tue, 19 Jul 2016 22:02:31 +0000 (22:02 +0000)]
Merge "Switch to prebuilt clang-3016494"

8 years agoMerge "Disable warnings triggered in Clang r271374"
Stephen Hines [Tue, 19 Jul 2016 22:02:31 +0000 (22:02 +0000)]
Merge "Disable warnings triggered in Clang r271374"

8 years agoRemove GOMA_HERMETIC form goma.mk
Fang Deng [Tue, 19 Jul 2016 01:33:04 +0000 (01:33 +0000)]
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

8 years agoDisable warnings triggered in Clang r271374
Pirama Arumuga Nainar [Tue, 28 Jun 2016 17:54:33 +0000 (10:54 -0700)]
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

8 years agoSwitch to prebuilt clang-3016494
Pirama Arumuga Nainar [Tue, 28 Jun 2016 17:58:39 +0000 (10:58 -0700)]
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

8 years agoMerge "Avoid matching the same warning line twice."
Treehugger Robot [Mon, 18 Jul 2016 23:18:47 +0000 (23:18 +0000)]
Merge "Avoid matching the same warning line twice."

8 years agoAvoid matching the same warning line twice.
Chih-Hung Hsieh [Mon, 18 Jul 2016 22:27:02 +0000 (15:27 -0700)]
Avoid matching the same warning line twice.

Used to skip only immediately followed identical warning lines.
Now classifywarning is called only once for each unique warning line.

Change-Id: Ie3b77ded70b41dafad91c042dbe15ad2be119e62
Test: run through build.log file

8 years agoMerge "Rename libevent-host to libevent"
Dan Willemsen [Mon, 18 Jul 2016 19:18:32 +0000 (19:18 +0000)]
Merge "Rename libevent-host to libevent"

8 years agoMerge "Only add linker_asan as dependency to shared executables"
Colin Cross [Sun, 17 Jul 2016 23:38:39 +0000 (23:38 +0000)]
Merge "Only add linker_asan as dependency to shared executables"

8 years agoOnly add linker_asan as dependency to shared executables
Colin Cross [Sun, 17 Jul 2016 22:28:07 +0000 (15:28 -0700)]
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

8 years agoMerge "Add support for LOCAL_MODULE_SYMLINKS"
Treehugger Robot [Fri, 15 Jul 2016 21:34:33 +0000 (21:34 +0000)]
Merge "Add support for LOCAL_MODULE_SYMLINKS"

8 years agoAdd support for LOCAL_MODULE_SYMLINKS
Colin Cross [Thu, 14 Jul 2016 23:02:57 +0000 (16:02 -0700)]
Add support for LOCAL_MODULE_SYMLINKS

Specifying LOCAL_MODULE_SYMLINKS will create symlinks to the installed
module in the same directory.

Change-Id: Idecb2b75f0c9999eb000eed9a79a989244ccf6c2

8 years agoMerge "Add build variant to kernel command line"
Badhri Jagan Sridharan [Fri, 15 Jul 2016 17:00:13 +0000 (17:00 +0000)]
Merge "Add build variant to kernel command line"

8 years agoRename libevent-host to libevent
Dan Willemsen [Thu, 14 Jul 2016 06:47:24 +0000 (23:47 -0700)]
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

8 years agoMerge "Allow prebuilts to specify mini-debug-info"
Dan Willemsen [Thu, 14 Jul 2016 04:04:42 +0000 (04:04 +0000)]
Merge "Allow prebuilts to specify mini-debug-info"

8 years agoAllow prebuilts to specify mini-debug-info
Dan Willemsen [Wed, 13 Jul 2016 23:08:36 +0000 (16:08 -0700)]
Allow prebuilts to specify mini-debug-info

So that Soong can specify the default that's used by Make.

Change-Id: I0c1062ad8f21df8b9a483f99dce679a1434e4859

8 years agoMerge "Fix root_filesystem_config.txt generation"
Tao Bao [Wed, 13 Jul 2016 23:04:10 +0000 (23:04 +0000)]
Merge "Fix root_filesystem_config.txt generation"

8 years agoMerge "Pass ENABLE_CPUSETS and ENABLE_SCHEDBOOST to Soong"
Treehugger Robot [Wed, 13 Jul 2016 00:39:05 +0000 (00:39 +0000)]
Merge "Pass ENABLE_CPUSETS and ENABLE_SCHEDBOOST to Soong"

8 years agoPass ENABLE_CPUSETS and ENABLE_SCHEDBOOST to Soong
Dan Willemsen [Tue, 12 Jul 2016 22:00:46 +0000 (15:00 -0700)]
Pass ENABLE_CPUSETS and ENABLE_SCHEDBOOST to Soong

Change-Id: I75c0d60854f2ea3d2e4e4d6dcbc6845e3b0336ad

8 years agoMerge "Turn ndk link check warning into error"
Treehugger Robot [Tue, 12 Jul 2016 21:09:32 +0000 (21:09 +0000)]
Merge "Turn ndk link check warning into error"

8 years agoTurn ndk link check warning into error
Dan Willemsen [Tue, 12 Jul 2016 20:10:31 +0000 (13:10 -0700)]
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

8 years agoMerge "Remove Android.bp logic from makefiles"
Colin Cross [Tue, 12 Jul 2016 16:15:53 +0000 (16:15 +0000)]
Merge "Remove Android.bp logic from makefiles"

8 years agoRemove Android.bp logic from makefiles
Colin Cross [Mon, 11 Jul 2016 23:57:33 +0000 (16:57 -0700)]
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

8 years agoMerge "Extend SDK link check to java libraries"
Dan Willemsen [Mon, 11 Jul 2016 20:20:40 +0000 (20:20 +0000)]
Merge "Extend SDK link check to java libraries"

8 years agoMerge changes from topic 'imgdiff-squashfs'
Treehugger Robot [Mon, 11 Jul 2016 15:55:51 +0000 (15:55 +0000)]
Merge changes from topic 'imgdiff-squashfs'

* changes:
  releasetools: Fix the detection of using squashfs.
  releasetools: Disable using imgdiff for squashfs.

8 years agoreleasetools: Fix the detection of using squashfs.
Tao Bao [Thu, 7 Jul 2016 16:09:58 +0000 (09:09 -0700)]
releasetools: Fix the detection of using squashfs.

We should disable using imgdiff if *any* of the source and target
partitions uses squashfs.

Bug: 30004734
Test: Create an incremental with two builds with one of them uses squashfs.
Change-Id: I826cd13d7b852c548e4b45e61f5ae00f6407cac3
(cherry picked from commit f8acad1480a3b4479c7ddfa89df8be946d83d3ed)

8 years agoreleasetools: Disable using imgdiff for squashfs.
Tao Bao [Sat, 11 Jun 2016 19:19:23 +0000 (12:19 -0700)]
releasetools: Disable using imgdiff for squashfs.

We use imgdiff to handle files in zip format (e.g. jar/zip/apk) for
higher compression ratio.

For system/vendor in squashfs, a) all files are compressed in LZ4
format; b) we use 4096-byte block size in their sparse images, but the
files in squashfs may not be laid out as 4K-aligned. So the blocks for
a given file as listed in block map may not form a valid zip file, which
may fail the patch generation with imgdiff.

Disable using imgdiff for squashfs images, and use bsdiff instead.

Bug: 22322817
Change-Id: Ie76aa4cece5c9d38cb1d1a34c505a4a8f37512d3
(cherry picked from commit 293fd135c7bc0c21b41f1782d21c26de64e8854a)

8 years agoExtend SDK link check to java libraries
Dan Willemsen [Sat, 9 Jul 2016 04:33:05 +0000 (21:33 -0700)]
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

8 years agoMerge "releasetools: Fix the payload public key replacement."
Treehugger Robot [Fri, 8 Jul 2016 20:58:49 +0000 (20:58 +0000)]
Merge "releasetools: Fix the payload public key replacement."

8 years agoreleasetools: Fix the payload public key replacement.
Tao Bao [Wed, 6 Jul 2016 22:28:59 +0000 (15:28 -0700)]
releasetools: Fix the payload public key replacement.

update_engine expects the extracted public key instead of the
certificate.

Bug: 28701652
Change-Id: I292d39da9e039f96d01a4214226aeb46f8cb881d
(cherry picked from commit afaf295cb85eb4091bc8a82950acab618b4139ca)

8 years agoFix root_filesystem_config.txt generation
Gaelle Nassiet [Fri, 24 Jun 2016 09:18:53 +0000 (11:18 +0200)]
Fix root_filesystem_config.txt generation

The first line returned by awk is empty. In consequence, when
fs_config computes its mode it will consider this line as a file (no
trailing slash) and affect the default android_files mode which is
0644. The mode for the root directory should be the default
android_dirs mode 0755.
Add a special case in fs_config to consider empty line as a directory.

Change-Id: I9f33f6fcf4be05c31914db898e65c92b0a611518
Signed-off-by: Gaelle Nassiet <gaellex.nassiet@intel.com>
8 years agoMerge "Move apksigner library to tools/apksig."
Treehugger Robot [Thu, 7 Jul 2016 20:33:04 +0000 (20:33 +0000)]
Merge "Move apksigner library to tools/apksig."

8 years agoMerge "Support LOCAL_STRIP_MODULE := keep_symbols for prebuilts"
Treehugger Robot [Thu, 7 Jul 2016 19:14:54 +0000 (19:14 +0000)]
Merge "Support LOCAL_STRIP_MODULE := keep_symbols for prebuilts"

8 years agoSupport LOCAL_STRIP_MODULE := keep_symbols for prebuilts
Colin Cross [Thu, 7 Jul 2016 18:16:49 +0000 (11:16 -0700)]
Support LOCAL_STRIP_MODULE := keep_symbols for prebuilts

Change-Id: I92a838b07fe4116d5a4b8521fe1ce8d44e6e84e2

8 years agoMerge "Recognize new C/C++ compiler and static analyzer warnings."
Treehugger Robot [Thu, 7 Jul 2016 18:07:21 +0000 (18:07 +0000)]
Merge "Recognize new C/C++ compiler and static analyzer warnings."

8 years agoMove apksigner library to tools/apksig.
Alex Klyubin [Thu, 7 Jul 2016 16:32:28 +0000 (09:32 -0700)]
Move apksigner library to tools/apksig.

This moves build/tools/apksigner/core to its own project tools/apksig.
The move also renames the moved Java packages from
com.android.apksigner.core.* to com.android.apksig.* to reflect the
new name of the library.

Bug: 27461702
Change-Id: Iab812ae2b8f0a741014f842460c78e35bc249d43

8 years agoMerge "Never add asan libraries to NDK code"
Dan Willemsen [Thu, 7 Jul 2016 17:07:42 +0000 (17:07 +0000)]
Merge "Never add asan libraries to NDK code"

8 years agoMerge "APK signer primitive."
Treehugger Robot [Wed, 6 Jul 2016 22:59:32 +0000 (22:59 +0000)]
Merge "APK signer primitive."

8 years agoRecognize new C/C++ compiler and static analyzer warnings.
Chih-Hung Hsieh [Fri, 1 Jul 2016 22:48:06 +0000 (15:48 -0700)]
Recognize new C/C++ compiler and static analyzer warnings.

Change-Id: I5f47c45498c640702922704aa5305a85e9493fcc
Test: run with Android build.log.

8 years agoMerge "Apply SANITIZE_TARGET=safe-stack to 64 bit targets only."
Evgenii Stepanov [Fri, 1 Jul 2016 20:09:45 +0000 (20:09 +0000)]
Merge "Apply SANITIZE_TARGET=safe-stack to 64 bit targets only."

8 years agoApply SANITIZE_TARGET=safe-stack to 64 bit targets only.
Evgenii Stepanov [Sat, 7 May 2016 01:15:57 +0000 (18:15 -0700)]
Apply SANITIZE_TARGET=safe-stack to 64 bit targets only.

Bug: 27729263
Change-Id: I214a9f40b94f6e6716aca05be774f014e62f73e8

8 years agoMerge "Apply SANITIZE_TARGET and LOCAL_SANITIZE when both are present."
Evgenii Stepanov [Fri, 1 Jul 2016 20:07:04 +0000 (20:07 +0000)]
Merge "Apply SANITIZE_TARGET and LOCAL_SANITIZE when both are present."

8 years agoApply SANITIZE_TARGET and LOCAL_SANITIZE when both are present.
Evgenii Stepanov [Fri, 20 May 2016 00:45:21 +0000 (17:45 -0700)]
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

8 years agoMerge changes I17a96b97,Ib4412657,I73e6d479
Treehugger Robot [Fri, 1 Jul 2016 04:26:26 +0000 (04:26 +0000)]
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

8 years agoMerge "Build: Fix vendor sanitizer library for secondary arch"
Treehugger Robot [Fri, 1 Jul 2016 04:24:46 +0000 (04:24 +0000)]
Merge "Build: Fix vendor sanitizer library for secondary arch"

8 years agoBuild: Fix vendor sanitizer library for secondary arch
Andreas Gampe [Fri, 1 Jul 2016 03:20:38 +0000 (20:20 -0700)]
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

8 years agoMerge "Sanitizer build tweaks."
Evgenii Stepanov [Fri, 1 Jul 2016 00:42:12 +0000 (00:42 +0000)]
Merge "Sanitizer build tweaks."

8 years agoSanitizer build tweaks.
Evgenii Stepanov [Fri, 20 May 2016 00:49:51 +0000 (17:49 -0700)]
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

8 years agoMerge "Only add libdl dependency for ASan/TSan on target."
Evgenii Stepanov [Thu, 30 Jun 2016 23:49:26 +0000 (23:49 +0000)]
Merge "Only add libdl dependency for ASan/TSan on target."

8 years agoOnly add libdl dependency for ASan/TSan on target.
Evgenii Stepanov [Thu, 12 May 2016 20:07:36 +0000 (13:07 -0700)]
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

8 years agoBuild: Add module-level product configuration of sanitization
Andreas Gampe [Mon, 27 Jun 2016 22:15:31 +0000 (15:15 -0700)]
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 bb5454b6db5770f0b0275424148b2d7d3c52a56d)

8 years agoBuild: Add option to restrict sanitization by owner
Andreas Gampe [Tue, 21 Jun 2016 00:46:29 +0000 (17:46 -0700)]
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 ea38d8e95d7daea49cc2a528d69e06a0005b31a6)

8 years agoBuild: Add option to restrict sanitization by architecture
Andreas Gampe [Tue, 21 Jun 2016 00:36:49 +0000 (17:36 -0700)]
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 0290a416c844f9a8ec953f63f199b00d36283228)

8 years agoMerge "Add LOCAL_NOSANITIZE."
Evgenii Stepanov [Thu, 30 Jun 2016 22:49:52 +0000 (22:49 +0000)]
Merge "Add LOCAL_NOSANITIZE."

8 years agoAdd LOCAL_NOSANITIZE.
Evgenii Stepanov [Thu, 12 May 2016 20:07:17 +0000 (13:07 -0700)]
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

8 years agoMerge "Detect `uname -m` == i686 as a 32-bit host"
Treehugger Robot [Wed, 29 Jun 2016 20:37:13 +0000 (20:37 +0000)]
Merge "Detect `uname -m` == i686 as a 32-bit host"

8 years agoDetect `uname -m` == i686 as a 32-bit host
Dan Willemsen [Wed, 29 Jun 2016 19:26:53 +0000 (12:26 -0700)]
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

8 years agoMerge "Skip copying existing vendor images"
Tianjie Xu [Wed, 29 Jun 2016 18:37:38 +0000 (18:37 +0000)]
Merge "Skip copying existing vendor images"

8 years agoSkip copying existing vendor images
Tianjie Xu [Tue, 28 Jun 2016 21:34:03 +0000 (14:34 -0700)]
Skip copying existing vendor images

add_img_to_target_files.py has an option of "-a" to add missing
images only. Under this option, the script should skip copying
the radio images for A/B devices when given image exists already
under "IMAGES/".

Test: Run the command on an A/B device, the existing radio images under "IMAGES/" don't get overwritten; and missing images are added correctly.
Bug: 29608905
Change-Id: Ie034b85a5d777d53e367f99470cea4d19cb1aaaf

8 years agoMerge "Add jdk.net to whitelist"
Yi Kong [Wed, 29 Jun 2016 11:00:47 +0000 (11:00 +0000)]
Merge "Add jdk.net to whitelist"

8 years agoNever add asan libraries to NDK code
Dan Willemsen [Tue, 28 Jun 2016 23:47:43 +0000 (16:47 -0700)]
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

8 years agoAdd build variant to kernel command line
Badhri Jagan Sridharan [Sat, 18 Jun 2016 01:42:39 +0000 (18:42 -0700)]
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

8 years agoMerge "Extract public key ID from cert"
Badhri Jagan Sridharan [Tue, 28 Jun 2016 23:36:22 +0000 (23:36 +0000)]
Merge "Extract public key ID from cert"

8 years agoExtract public key ID from cert
Badhri Jagan Sridharan [Sat, 30 Apr 2016 01:20:13 +0000 (18:20 -0700)]
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 3af315aed5d657942b28ccae342324b9ee90116d
https://googleplex-android-review.git.corp.google.com/#/c/1061691/)

BUG: 28384658
Change-Id: I8efbe1b0e415ef1d396f9b51cfa4b3fa01b22484

8 years agoMerge "Turn unused source files from warning to error"
Treehugger Robot [Tue, 28 Jun 2016 19:41:39 +0000 (19:41 +0000)]
Merge "Turn unused source files from warning to error"

8 years agoTurn unused source files from warning to error
Dan Willemsen [Tue, 28 Jun 2016 17:22:08 +0000 (10:22 -0700)]
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

8 years agoMerge "Add VENDOR_PRODUCT_RESTRICT_VENDOR_FILES"
Treehugger Robot [Tue, 28 Jun 2016 06:17:32 +0000 (06:17 +0000)]
Merge "Add VENDOR_PRODUCT_RESTRICT_VENDOR_FILES"

8 years agoAdd VENDOR_PRODUCT_RESTRICT_VENDOR_FILES
Hung-ying Tyan [Fri, 20 May 2016 11:08:30 +0000 (19:08 +0800)]
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

8 years agoMerge "releasetools: Change the default key path for bvbtool"
Treehugger Robot [Tue, 28 Jun 2016 01:52:36 +0000 (01:52 +0000)]
Merge "releasetools: Change the default key path for bvbtool"