Commit graph

30205 commits

Author SHA1 Message Date
Dan Willemsen
f7d1a6d75f Merge "Package up proguard jack_dictionary" 2016-09-21 19:39:47 +00: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
Colin Cross
4ed13c38a5 Remove SRC_SYSTEM_HEADERS
It is inherited from Soong now.

Bug: 31492149
Change-Id: Ia9bfd9662dba16032dac68b55b4f0743c0688139
2016-09-15 09:29:15 -07:00
Treehugger Robot
766c348748 Merge "goma.mk: do not start goma compiler_proxy if NOSTART_GOMA is set." 2016-09-15 03:41:24 +00:00
Dan Albert
c28e4bcb1c Use libcompiler-rt_extras with NDK builds.
We want to build things in CTS (things built against the NDK) with
integer overflow checks. Some projects in the tree also make explicit
calls to the overflow checked builtins, and those projects need to be
built with the NDK (external/dng_sdk is the specific example that
brought this up).

Test: make checkbuild tests
Bug: None
Change-Id: Iab27dd0d931f723140de242049fa72f3b1ce0fb8
2016-09-14 16:08:48 -07:00
Dan Albert
2936a1e84b Always link libdl with libc++ for the NDK.
libc++ requires libdl whether it's statically linked or not.

Test: make checkbuild tests
Bug: None
Change-Id: I8abdcfaef779b358196716ab1193cebe278317ac
2016-09-14 16:08:04 -07:00
Chih-hung Hsieh
029ced528b Merge "Emit a table of warnings by project and severity." 2016-09-14 16:39:27 +00:00
Dan Willemsen
0b3f97b0d6 Merge "Fix shared library install dependencies outside of /system" 2016-09-13 22:39:21 +00:00
Dan Willemsen
5bdd08b2d9 Fix shared library install dependencies outside of /system
For properly picking the shared library install dependencies, HOST_OUT
and HOST_CROSS_OUT are necessary so that we don't add a dependency
between Linux and Windows. But for target modules, we must use
TARGET_OUT_ROOT instead of TARGET_OUT, or modules in /data and /vendor
won't have proper install dependencies.

Bug: 31462199
Test: m bionic-unit-tests; manual diff of generated ninja file
Change-Id: I828fa2664613296cc6c431813f5657abffdd2b8f
2016-09-13 13:47:06 -07:00
Ryan Campbell
1e1ecd5d07 Merge "Implement path-based enabling of code coverage." 2016-09-13 19:48:34 +00:00
Treehugger Robot
8bb71cef9f Merge "Fix building static linux binaries" 2016-09-13 19:19:46 +00:00
Dan Willemsen
c9aa6fca41 Fix building static linux binaries
BUILD_HOST_static has been broken because I was stripping
-Wl,--start-group/-Wl,--end-group into a separate set of ldflags instead
of keeping them wrapped around some of the ldlibs. So don't pass some of
the build system flags through the ldlibs checker.

Bug: 30898128
Change-Id: I332b42679695cdc5da3cb0036290b6a3544699c0
2016-09-13 17:48:07 +00:00
Ryan Campbell
81c9d29dad Implement path-based enabling of code coverage.
Native coverage is enabled by setting NATIVE_COVERAGE to true
and specifying a list of paths in the COVERAGE_PATHS
environment variable. Files are exported to a zip file in the
target out directory.

Change-Id: I66a2ddd88e849bec1cc0cdae1b51fe18a007e2c3
2016-09-13 10:27:25 -07:00
Chih-Hung Hsieh
e41c99b721 Emit a table of warnings by project and severity.
* Use 't1' CSS class for main warning tables,
  and default table style for new warning count table.
* Count total skipped warnings.
* Append count of warnings in each severity header.
* Fix some skipped warning patterns and count/dump skipped warnings.
* Add dumpskippedanchors function to fix expand_collapse
  error when --byproject flag is used and severity.SKIP
  is not emitted.
* Minor coding style changes:
  * Loop through severity.kinds.
  * Remove unused import.
  * Add spaces around assignment operators.
  * Adjust indentation.

Bug: 31377083
Test: run warn.py with build.log
Change-Id: I68949edc4601b10ea2f7ac84e48e6c3da4ab1e4f
2016-09-13 10:18:01 -07:00
Treehugger Robot
946e58bdff Merge "Remove incremental workaround for aapt overlays" 2016-09-13 04:29:37 +00:00
Yoshisato Yanagisawa
a2ca270502 goma.mk: do not start goma compiler_proxy if NOSTART_GOMA is set.
During the development of goma client, we sometimes need to use goma
compiler_proxy, which has already been running.

Test: NOSTART_GOMA=1 USE_GOMA=1 m.

Change-Id: Ifa969c40871325fd43ee6443ddbe3b18fde62c5a
2016-09-13 13:13:52 +09:00
Dan Willemsen
8e6e6fdba9 Remove incremental workaround for aapt overlays
This workaround to clean package intermediates is no longer necessary,
as ninja reruns commands whose command line changes.

Test: switch between product overlays that use add-resource, verify
      R.java is regenerated.
Change-Id: Icb1f76360e39882e4401180414a031956777b020
2016-09-12 20:30:12 -07:00
Treehugger Robot
fbfff3129e Merge "Remove speex from the pathmap" 2016-09-13 00:07:28 +00:00
Dan Willemsen
208d3c2461 Remove speex from the pathmap
libspeexresampler uses LOCAL_EXPORT_C_INCLUDE_DIRS to export this path
to all of its users already.

Test: m libaudiopreprocessing libaudioutils
Change-Id: I682303142840d6f0f02c990de8e713620840bbda
2016-09-12 16:16:50 -07:00
Treehugger Robot
56c2a18a50 Merge "Update NDK gtest lib names." 2016-09-12 20:48:42 +00:00
Treehugger Robot
f9d5fb97cb Merge "Fix libgcov.a dependency" 2016-09-12 19:06:54 +00:00
Dan Willemsen
7db70a3b0a Fix libgcov.a dependency
Now that Soong is generating libgcov.a, we need a dependency here.

Change-Id: Ie8d97339fd584eed178cc57b9333d38754ab1135
2016-09-12 18:09:20 +00:00
David Brazdil
3a04e1b82f Merge "Update build rules for VDEX" 2016-09-12 14:57:19 +00:00
Colin Cross
39c1c9ae12 Merge "Remove global linker search paths" 2016-09-09 20:27:21 +00:00
Colin Cross
067d781530 Remove global linker search paths
Remove the global linker search path, as it can cause spurious build
failures.  If a library with the same name as a system library is in the
process of being written to the directory in the global search path, and
the linker may try to read the partially-written built one instead of the
system one.  We already use full paths to libraries for target builds,
do the same for host builds.  Also remove the normalize library
functions, they are no longer necessary.

Test: m -j checkbuild
Bug: 31393456
Change-Id: If9fc631e111f568c700fd73e103445c30d7e9d11
2016-09-09 11:01:15 -07:00
David Brazdil
70470166c7 Update build rules for VDEX
ART now produces a new output file called VDEX, produced alongside the
existing OAT file. This patch updates the relevant build rules.

Bug: 30937355
Change-Id: Ib6be9f8f36c8f061dbbebd72cb55a5d4b6dc27eb
2016-09-09 09:41:10 +01:00
Dan Albert
f5d024d31a Update NDK gtest lib names.
The NDK gtest libs are always suffixed to simplify the make macro
that generates the test modules.

Bug: http://b/16574165
Change-Id: I1c9647e90aff2f1e9da4a88cad30199b1e423757
2016-09-08 23:10:20 -07:00
Treehugger Robot
6b363e24bd Merge "Prevent Kati from seeing MAKEFLAGS" 2016-09-09 01:25:21 +00:00
Dan Willemsen
5ad9ccaf2a Prevent Kati from seeing MAKEFLAGS
We never want Kati to see MAKEFLAGS, as forcefully overriding variables
is terrible. The variables in MAKEFLAGS are still available in the
environment, so if part of the build wants input from the user, it
should be explicitly checking for an environment variable or using ?=

This commit shouldn't actually change any behavior -- the version of
Kati checked into our tree doesn't actually read MAKEFLAGS (the latest
version does, which is why this change is necessary). We're also already
clearing MAKEFLAGS during makeparallel, so the USE_GOMA case already
doesn't pass through MAKEFLAGS.

Test: Manual $(warnings $(origin MYTEST) $(MYTEST)) with old and new Kati
Change-Id: I5e4ffa66b3539a539cc7a26da24645b11445c469
2016-09-08 17:14:43 -07:00
Dan Willemsen
b2498a22c2 Merge "Blacklist the GOMACC_PATH environment variable" 2016-09-08 20:47:19 +00:00
Chih-hung Hsieh
9d66e2c2ef Merge "Define DEFAULT_TIDY_HEADER_DIRS." 2016-09-08 20:24:07 +00:00
Dan Willemsen
c4f595e88f Blacklist the GOMACC_PATH environment variable
The clang compiler wrapper will be looking for this environment
variable, but it should only ever be set by the `gomacc` in CC_WRAPPER.
Make sure that it isn't otherwise set in the environment.

Change-Id: I4b26c7183bc47f71dffa7dfcc2e5b08e840a11b1
2016-09-08 12:45:15 -07:00
Treehugger Robot
6e85eeaf53 Merge ""SignApk" in Created-By header" 2016-09-08 17:10:37 +00:00
Treehugger Robot
d81559e6ac Merge "Build symlinks for -host and -target phony modules" 2016-09-07 22:00:24 +00:00