Commit graph

30238 commits

Author SHA1 Message Date
Treehugger Robot
312c310f7c Merge "Only run warn.py's main function if it is the main program." 2016-09-29 03:58:07 +00:00
Stephen Hines
7ec2a39c3f Merge "Switch to using clang-3289846." 2016-09-29 02:56:50 +00:00
Meike Baumgärtner
ac9d5df349 Only run warn.py's main function if it is the main program.
Test: run warn.py --byproject build.log
Change-Id: I155cce8c952d6d8a02c8e1809bf61a46c847c26e
2016-09-28 17:59:08 -07:00
Treehugger Robot
6784a3fcdd Merge "Fix pylint warning and refactor project_list." 2016-09-28 17:47:41 +00:00
Tao Bao
6e12b72966 Merge "Analyze unchanged blocks in odex files." 2016-09-28 17:08:10 +00:00
Stephen Hines
183b142ac9 Switch to using clang-3289846.
Bug: http://b/30252254
Test: Built/boot platform using latest prebuilts.
Change-Id: I7c9357a99afec323fd766e93b5d5e941e9e06244
2016-09-28 08:51:55 -07:00
Chih-Hung Hsieh
9f766239f0 Fix pylint warning and refactor project_list.
Bug: 31377083
Test: run warn.py --byproject build.log
Change-Id: Id442cf6608bf5c14784063c05f5ff0b731f17486
2016-09-27 21:13:52 -07:00
Chih-hung Hsieh
aa5f2ccde2 Merge "Fix Google pylint warnings." 2016-09-28 04:10:26 +00:00
Treehugger Robot
c114bd9dbf Merge "Remove WITH_SYNTAX_CHECK" 2016-09-28 01:44:24 +00:00
Chih-Hung Hsieh
b426c54e8a Fix Google pylint warnings.
* Rename 'severity' to 'Severity'.
* Fix bad line indentations and space.

Test: run warn.py --byproject build.log
Change-Id: I33d701cca408b5ca4715be8d44c890942b7d132a
2016-09-27 18:15:40 -07:00
Treehugger Robot
9796175d0f Merge "Add buttons to group warning by project or severity." 2016-09-27 21:10:40 +00:00
Evgenii Stepanov
2358c55d70 Merge "Enable LOCAL_SANITIZE:=cfi and add LOCAL_SANITIZE_DIAG." 2016-09-27 20:51:41 +00:00
Treehugger Robot
f69e48b30b Merge "Remove spaces from DEFAULT_TIDY_HEADER_DIRS" 2016-09-27 01:10:30 +00:00
Dan Willemsen
e68100e8bb Remove WITH_SYNTAX_CHECK
It's no longer used. The majority of the platform is on clang anyways.

Test: m -j
Change-Id: I4fb4375eaad2469e169d34c47ae3fe2a0540aeec
2016-09-26 17:37:19 -07:00
Treehugger Robot
69bd0bf22a Merge "build: add hwservicemanager to the core packages" 2016-09-26 23:54:54 +00:00
Dan Willemsen
69811f89d6 Remove spaces from DEFAULT_TIDY_HEADER_DIRS
I'm preparing to move this to Soong, and it's simpler to compare if the
spaces are removed here (to match the other lists in this file).

Test: WITH_TIDY=true; compare build.ninja before and after change
Change-Id: Ib27a19a36ebb1132300a8c1eeace1202685dfc4c
2016-09-26 16:02:15 -07:00
Chih-Hung Hsieh
2a38c37d57 Add buttons to group warning by project or severity.
* Add more project patterns.
* Add more top level comments for global variables and functions.
* Resequence severity numbers to match the dump order.
* Emit warning messages and tables to static HTML JavaScript arrays.
* Replace old static HTML table dumper functions with
  new dynamic HTML JavaScript to generate sections of warnings.
* Warning messages are grouped into sections by severity or projects.
* Better descriptions for SKIP warning patterns.
* Replace output function with print.

Bug: 31377083
Test: run warn.py --byproject build.log
Change-Id: I7b44ef6223d5b2f1aa31655a5a47d854f9a1dedc
2016-09-26 16:02:12 -07:00
Iliyan Malchev
bd710ed45a build: add hwservicemanager to the core packages
b/31458381
b/31240290

Test: passing build and runtime tests

Change-Id: I294c70d93d23ada94ff1175f2d3babd5b836eeee
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-26 14:21:10 -07:00
Treehugger Robot
bcd229277a Merge "Fix Google pylint warnings." 2016-09-26 21:18:08 +00:00
Chih-Hung Hsieh
6c0fdbb84d Fix Google pylint warnings.
* Rename variables and functions to follow Google coding style.
* Fix line indentations to follow Google coding style.
* Add module and function docstrings.
* Change shebang line to avoid pylint warning.
* Suppress some pylint warnings to avoid too many changes at once.
* Fix typos.

Test: run warn.py --byproject build.log
Change-Id: I569961981b562e35cb5609a96cd5ebb40a80829c
2016-09-26 12:24:54 -07:00
Tao Bao
08c8583aea Analyze unchanged blocks in odex files.
In BBOTA, we generate patches based on _all_ the blocks of a pair of
input files (src and tgt). For security incremental OTAs, one common
pattern is that only a few blocks are changed in odex files (e.g.
headers). We don't really need to stash/patch the unchanged blocks.

This CL analyzes the unchanged blocks in odex files and computes the
diff for the changed blocks only. It reduces the OTA install time by
about 25% to 40% in our experiments, by paying an increase of 5% to 30%
OTA generation time cost.

Bug: 31570716
Test: Generate an incremental and apply on device.

Change-Id: If842c1afeff6894a3d27eb60b7e8f65a179b7977
2016-09-23 12:15:23 -07:00
Treehugger Robot
b0553ca65b Merge "Recognize new warning messages." 2016-09-23 04:33:11 +00:00
Treehugger Robot
8870658397 Merge "link_type check: Support modules installed into /data" 2016-09-23 04:30:02 +00:00
Chih-Hung Hsieh
0a19207f7b Recognize new warning messages.
* -Wunnamed-type-template-args and -W#pragma-messages

Test: run warn.py with build.log.
Change-Id: I36277e001081604f92a4d9c92f9a0b5d3f0ee5e5
2016-09-22 17:44:38 -07:00
Treehugger Robot
19f24492db Merge "Pass userdebug/eng variant to Soong" 2016-09-23 00:16:52 +00:00
Treehugger Robot
eac773047f Merge "Simplify warn.py and output of warning count table and tablerow." 2016-09-23 00:06:26 +00:00
Dan Willemsen
f2649570c5 Pass userdebug/eng variant to Soong
Test: Run build with eng/userdebug/user and check the soong.variables
Change-Id: I7cd71a94e92526b6cc61303b13b7bc593cbbfc3a
2016-09-22 15:22:48 -07:00
Chih-Hung Hsieh
99459fc0d0 Simplify warn.py and output of warning count table and tablerow.
* Use a loop to initialize empty 'members' and 'option' of warnpatterns.
* Create severity.{color,columnheader,header} from an attributes list.
* Compute totalbyproject and totalbyseverity from a constructor.
* Skip all-zero rows and columns in the warning count table.
* Remove redundant spaces and newlines in tablerow output.

Test: run through build.log files
Change-Id: I4d3fa4ecd92e1afab91d85b7535d03f8696e83d8
2016-09-22 15:15:43 -07:00
Dan Willemsen
3594cee467 link_type check: Support modules installed into /data
Test: compare build.ninja before/after, look at warnings.html
Change-Id: I1b78748dd80b73d2601b2adf0aaac8a6b2b350d5
2016-09-22 13:05:02 -07:00
Benoit Lamarche
52eafee87a Merge changes from topic 'jack-d-b3-as-stable'
* changes:
  Fix bad JACK_PLUGIN variable
  Add support for Jack plugin
2016-09-22 09:34:27 +00:00
Dan Willemsen
f7d1a6d75f Merge "Package up proguard jack_dictionary" 2016-09-21 19:39:47 +00:00
Yohann Roussel
16243bdbec Fix bad JACK_PLUGIN variable
Changed to LOCAL_JACK_PLUGIN.

(cherry picked from commit 17924b136cb5bfc60d138e8c7e5c18a90b5965c3)

Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I1be4aaa502103fc308d35a5672dc4fe5900c4ebe
2016-09-21 10:54:42 +02:00
Yohann Roussel
53b7fbbe78 Add support for Jack plugin
And ensure compatibility with coverage plugin.

(cherry picked from commit 862bb84d37e3e6ca61080de58f206e512e09d4e0)

Bug: 28876950
Test: Manually tested by some manual activations of the coverage plugin.
Change-Id: I804558a501825357bf0812de626d2957eedbdc13
2016-09-21 10:53:45 +02:00
Treehugger Robot
077d9d5fe7 Merge "Replace usages of my_register_name with my_all_targets" 2016-09-21 00:38:59 +00:00
Colin Cross
3388670e78 Replace usages of my_register_name with my_all_targets
A few module types add extra dependencies on $(my_register_name), move
them to $(my_all_targets) so that they are built for mm and mma too.

Bug: 31526036
Test: mmm framework
Change-Id: I2e594ce771451a99691739b963f4ce517e9dd595
2016-09-20 16:03:50 -07:00
Dan Willemsen
b6c061e9ff Package up proguard jack_dictionary
Bug: 31182185
Test: m dist in an unbundled branch
Change-Id: I7ee1ba076cfa03f294f8231f6bdd8fa8df5557af
2016-09-20 14:21:53 -07:00
Paul Duffin
cb6f7c2d86 Merge "Add targets for building individual modules using javac" 2016-09-20 11:51:40 +00:00
Dan Willemsen
665cda08f0 Merge "Fix link_type checking" 2016-09-19 21:54:09 +00:00
Treehugger Robot
3b0cb6e842 Merge "Add a script that verifies OTA package signature." 2016-09-19 17:28:01 +00:00
Paul Duffin
32bd0adf9c Add targets for building individual modules using javac
This is needed in order to be able to run error prone (which is
a plugin replacement for javac) on a subset of the java code.

Bug: 31507496
Test: Build javac-check-core-tests and check the resulting JAR
Change-Id: I5a556920572fcdad7b39d67e3f00fe0e0f1f8f46
2016-09-19 13:38:51 +01:00
Dan Willemsen
2fcacb5a22 Merge "Only update previous product config when changed" 2016-09-17 02:29:06 +00:00
Tao Bao
9c63fb59bd Add a script that verifies OTA package signature.
Currently it supports verifying packages signed with RSA algorithms
(v1-v4 as in bootable/recovery/verifier.cpp). No support for ECDSA (v5)
signed packages yet.

$ ./build/tools/releasetools/check_ota_package_signature.py \
    bootable/recovery/tests/testdata/testkey_v1.x509.pem \
    bootable/recovery/tests/testdata/otasigned_v1.zip

Package: bootable/recovery/tests/testdata/otasigned_v1.zip
Certificate: bootable/recovery/tests/testdata/testkey_v1.x509.pem
Comment length: 1738
Signed data length: 2269
Use SHA-256: False
Digest: 115e688ec3b77743070b743453e2fc6ce8754484

VERIFIED

Bug: 31523193
Test: Used the tool to verify existing packages (like above).

Change-Id: I71d3569e858c729cb64825c5c7688ededc397aa8
2016-09-16 15:08:40 -07:00
Treehugger Robot
1d4b79dde2 Merge "Remove objclean" 2016-09-16 21:46:21 +00:00
Dan Willemsen
2cfbdf460d Only update previous product config when changed
I'm working on removing the --ignore_dirty=$(OUT_DIR)/% argument from
Kati. If we're always writing to a file that we're also reading, then
with that flag removed, we'll always reparse all the makefiles.

So instead, use the method from the generated java file cleanup where we
read from a "previous" file, write to a "current" file, then use a
cmp || mv to overwrite the "previous" file if necessary. When the flag
is removed, this will cause Kati to need to run twice any time this
changes, but it's better than forever.

Bug: 30947985
Test: Switch between aosp_arm-eng and full-eng
Change-Id: Id2d1445809b60ce26700bb2aca765df3b5c2b360
2016-09-16 13:17:08 -07:00
Dan Willemsen
da7d25f2d1 Remove objclean
We don't need to manually remove objects when switching SANITIZE_TARGET
-- that will be handled by Ninja noticing that the command lines are
different.

Bug: 30947985
Test: None
Change-Id: I83c15981cf6ea258bb7fa85490b0b1ede1058aa6
2016-09-16 12:53:20 -07:00
Treehugger Robot
7b351cadfc Merge changes from topics 'ndk-compiler-rt_extras', 'ndk-libc++-libdl'
* changes:
  Use libcompiler-rt_extras with NDK builds.
  Always link libdl with libc++ for the NDK.
2016-09-16 06:40:32 +00:00
Treehugger Robot
c6507670f2 Merge "Fix typo in coverage target out path." 2016-09-16 02:06:18 +00:00
Ryan Campbell
737bc02ee8 Fix typo in coverage target out path.
Change-Id: I4a448708ab74e08b2c515039ee5d71c32861214e
2016-09-15 17:32:13 -07:00
Dan Willemsen
121e284b46 Fix link_type checking
This was printing "error:", but not actually triggering an error.
Instead of trying to write a single line bash script to handle this,
move the actual check into python. This allows us to print all of the
errors for a single module before triggering the failure.

Also updates the warning format and the warn.py script to properly parse
these warning. Many of the java:sdk -> java:platform warnings are false
positives due to the lack of LOCAL_SDK_VERSION markings on prebuilts.

Individual tags can be marked as warnings now, which lets us check for
system libraries linking against vendor libraries (which won't work on
AOSP). I'm not sure this is a completely valid check, which one reason
that it's just a warning.

Test: m all_link_types (with some missing libs commented out)
Change-Id: I333e418c9a4511b7c7e826891ae481da08fbf6f9
2016-09-15 14:40:39 -07:00
Treehugger Robot
4a6862e59b Merge "Remove SRC_SYSTEM_HEADERS" 2016-09-15 18:27:45 +00:00