Commit graph

30292 commits

Author SHA1 Message Date
Jeff Sharkey
4337794acd Merge "PRODUCT_PACKAGES: add to tune2fs." 2016-10-12 01:16:33 +00:00
Treehugger Robot
b37e81d3cd Merge "Fix a nullness warning." 2016-10-11 19:29:37 +00:00
Treehugger Robot
f943e138d7 Merge "Fix an uninitialized value warning." 2016-10-11 02:43:47 +00:00
Yunlian Jiang
221c1c027a Fix an uninitialized value warning.
Warning from the static analyzer:

build/tools/zipalign/ZipFile.cpp:503:5: warning: Function call argument
is an uninitialized value
pEntry->setDataInfo(uncompressedLen, endPosn - startPosn, crc,

Specifically, it's referencing `crc`, which would be uninitialized if we
hit either of these two error cases, since we'd return `NO_ERROR`.

Note that the warning is still there, but that's only because the static
analyzer can't see the asserts. If we #undef NDEBUG in the file, then
the warning disappears.

Bug: none
Test: With NDEBUG undefined, the warning is gone.
Change-Id: Iaed66127746c38add2c842ab027f2e1982d0e2fd
2016-10-10 17:31:06 -07:00
Treehugger Robot
01bd1d34db Merge "Make AVB work when BOARD_USES_RECOVERY_AS_BOOT is set to true." 2016-10-07 19:44:37 +00:00
Guang Zhu
24dd78a2d7 Merge "remove use of CTS_TESTCASES_OUT" 2016-10-07 01:15:17 +00:00
Treehugger Robot
daba887656 Merge "Use ASAN prebuilts if SANITIZE_HOST includes address" 2016-10-07 01:08:07 +00:00
Guang Zhu
29fe14721e remove use of CTS_TESTCASES_OUT
Bug: 31788743
Test: $ make cts dist
      # check contents of generated package and API coverage
      # report
      $ make checkbuild

Merged-In: Ieec069bafbcc6df5a5b3b06befb4a3a5678a06fd
Change-Id: Ieec069bafbcc6df5a5b3b06befb4a3a5678a06fd
(cherry picked from commit f8f0880b3b8fb6a80ed766068d5f1714625b8960)
2016-10-06 16:57:39 -07:00
Treehugger Robot
157ad04cfc Merge "Replace product variable stashing with .KATI_READONLY" 2016-10-06 23:41:30 +00:00
Ryan Campbell
56b5030eac Merge "Support multiple arch for coverage packaging." 2016-10-06 23:25:09 +00:00
David Zeuthen
b2fea5878c Make AVB work when BOARD_USES_RECOVERY_AS_BOOT is set to true.
Often BOARD_USES_RECOVERY_AS_BOOT is used together with
BOARD_BUILD_SYSTEM_ROOT_IMAGE, but with this combination we're currently
not adding a hash footer to boot.img. Fix this.

Bug: 31119415
Test: Built with BOARD_USES_RECOVERY_AS_BOOT set to true and inspected images.
Merged-In: If033e5c93f5b71fd17405af7d970dc3f0540a1d2
Change-Id: I2f10bbffb0ba2467d53e3e62d5379c3ab7236063
2016-10-06 15:15:00 -04:00
Dan Willemsen
c1f17ffc7d Replace product variable stashing with .KATI_READONLY
Instead of using rot13 / rot26, use the Kati extension to mark these
variables as readonly.

Move $(strip) for a few variables to before they're marked readonly. Use
a different variable for modifications to BOARD_KERNEL_CMDLINE in
build/core/Makefile.

Test: build/tools/kati_all_products.mk on AOSP and internal master
Test: build-aosp_bullhead.ninja the same before / after
Change-Id: If98b24af763831a9c5c2de38037a69ab1bf9e023
2016-10-06 10:50:26 -07:00
Dan Willemsen
3b4d17ffe7 Use ASAN prebuilts if SANITIZE_HOST includes address
Test: SANITIZE_HOST=address m -j showcommands
Change-Id: Ifdca98d5fa32867005ace99e1eb5188e22923ac6
2016-10-05 23:26:24 -07:00
Chih-hung Hsieh
89244619ad Merge "Add a new ANALYZER severity group." 2016-10-05 23:31:43 +00:00
Treehugger Robot
480678e220 Merge "Add tool to run kati for all products" 2016-10-05 22:56:03 +00:00
Dan Willemsen
4c364620ac Add tool to run kati for all products
Test: get_build_var all_named_products
Test: build/tools/kati_all_products.sh
Change-Id: I3496cb4c59a1edb11c9149b95ecabd3a828b8972
2016-10-05 14:04:21 -07:00
Chih-Hung Hsieh
1eabb0ecb2 Add a new ANALYZER severity group.
* Separate clang-tidy's clang-analyzer-* warnings from
  other clang-tidy warnings.

Bug: 31559947
Test: build with WITH_TIDY=1 and DEFAULT_GLOBAL_TIDY_CHECKS=*,-readability-*,-google-readability-*
Change-Id: If03c421c9319741ef6588bc0d803b6da0cc4433a
2016-10-05 11:53:20 -07:00
Yunlian Jiang
4f1a91cbac Fix a nullness warning.
This silences a warning null pointer passed as an argument to a
'nonnull' parameter

BUG=None
Test: The warning is gone.

Change-Id: I10a17d4674bfb373d7fe8666863abd5f10a4d11f
2016-10-05 10:52:35 -07:00
Treehugger Robot
2849d4f9d9 Merge "Remove redundant LIBART_IMG_{HOST,TARGET}_BASE_ADDRESS" 2016-10-05 16:51:15 +00:00
Dan Willemsen
6f21a29a2c Remove redundant LIBART_IMG_{HOST,TARGET}_BASE_ADDRESS
These are exported by Soong. Caught by an upcoming change to mark
Soong-exported variables as readonly.

Test: Manual checking that the values are still the same.
Change-Id: I18e2bca588c57809c16a9f0c386aad432bfbee2c
2016-10-04 22:28:49 -07:00
Colin Cross
7bc7704921 Merge "Fix empty mac .toc generation" 2016-10-05 02:35:02 +00:00
Colin Cross
6338f23a36 Merge "Don't prune $(OUT_DIR) from findleaves.py" 2016-10-05 01:38:04 +00:00
Colin Cross
cff9a64a48 Fix empty mac .toc generation
If a shared library has no exported symbols grep will return exit code
1 meaning no matches, but this should not be considered an error
during toc generation.

Test: external/clang/build.py
Change-Id: If589da38ad8b844fe1aff4738481cebea75cca42
2016-10-04 17:01:29 -07:00
Colin Cross
ae58e2bfa5 Don't prune $(OUT_DIR) from findleaves.py
Pruning $(OUT_DIR) can be overaggressive if $(OUT_DIR) matches the name
of any directory in the source tree that contains Android.mk files.
Pruning $(OUT_DIR) is no longer necessary, as one of the first things
the build system does is put an empty Android.mk file in there to avoid
recursing into it.

Bug: 31941856
Test: m -j OUT_DIR=angler
Change-Id: I7c5e95816f35bd5906845716d56cca76de7fa1ad
2016-10-04 16:35:21 -07:00
David Zeuthen
70209ad9f0 Merge "Make room for AVB hashtree and metadata." 2016-10-04 22:32:27 +00:00
Chih-hung Hsieh
4b4b2da13d Merge "Accept environment variables DEFAULT_*_TIDY_CHECKS" 2016-10-04 22:25:26 +00:00
David Zeuthen
4014a9daa7 Make room for AVB hashtree and metadata.
While the system.img images currently built with AVB support verify
correctly, mounting the filesystem content fails. This is because
'avbtool add_hashtree_footer' used to claim some of the unused /
DONT_CARE space for stashing the verity tables and this resulting in the
mapped device ending up being smaller causing the mount failure.

Fix this by leaving enough room for AVB hashtree and metadata before
building the image. This is achieved by moving the AVB hashtree support
into build_image.py and using a just added '--calc_max_image_size'
option to 'avbtool add_hashtree_footer' to figure out how much space to
leave out.

This depends on https://android-review.googlesource.com/#/c/281821/

Bug: 31264226
Test: Mounting dm-verity set up from system.img now works.

Merged-In: I4c5de1004c1059f8c582e76b3b8517d427aa1a87

Change-Id: I945a5f1f6782791736cd319f216cfa6b448fb04d
2016-10-04 17:32:16 -04:00
Colin Cross
5d8c73e373 Merge "Enable toc optimization for host builds" 2016-10-04 20:57:53 +00:00
Chih-Hung Hsieh
8fdda6e495 Accept environment variables DEFAULT_*_TIDY_CHECKS
* Define DEFAULT_GLOBAL_TIDY_CHECKS/DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS
  only if it is not already defined.

Bug: http://b/27779618
Test: build with WITH_TIDY=1 and define those variables.
Change-Id: I201c9da3769d6ef658a75d4a1bf42ec6816d4069
2016-10-04 10:18:02 -07:00
Przemyslaw Szczepaniak
a8c8dadd09 Merge "Fix for non-empty a[name] tags in openJdk based javadocs." 2016-10-04 11:35:58 +00:00
Przemyslaw Szczepaniak
4bce2866fb Fix for non-empty a[name] tags in openJdk based javadocs.
openJdk based android javadoc contains <a name=... tags
that are non-empty. Currently they are being hidden,
causing badly formatted pages for some java.* classes
(missing text and random whitespace blocks).

This change makes the existing a[name] hiding rule
apply only to empty tags.

Test: make docs
Bug: 31700998
Change-Id: Ifa75bbabe308d7aed0cce6165c1113e5a382a121
(cherry picked from commit a7edd92c45)
2016-10-04 10:31:54 +00:00
Ryan Campbell
c209ef8ce1 Support multiple arch for coverage packaging.
Modify copy rule to support multiple architectures. Use a method
similar to symbols.

Test: make lights.bullhead NATIVE_COVERAGE=true COVERAGE_PATHS=test/vts/hals/light/
Bug: 31911253
Change-Id: Ib3c53b4b305cbfcfd186010c5500b8d678190ddf
2016-10-03 18:23:40 -07:00
Colin Cross
d2ff157159 Enable toc optimization for host builds
The toc optimization had been disabled for host builds to ensure that
the timestamp of the final binary changed whenever its implementation
changed, in order to support rerunning host tools that were modified
during incremental builds.  However, only the final install rule must be
re-run to update the timestamp, and not the link rule.

Update the shared library install dependencies to use normal
dependencies instead of order-only dependencies for host modules, and
then enable the the toc optimization for host modules.  If the
implementation of a library changes it will be reinstalled, and
libraries or binaries that depend on it will also be reinstalled.

Bug: 26015464
Test: m -j; touch art/disassembler/disassembler_x86.cc; m -j, verify
      out/host/linux-x86/bin/oatdump is updated
Change-Id: I0a14decc1994eb55ad269d841943aef66e320c63
2016-10-03 17:53:44 -07:00
Colin Cross
e0f42b41f6 Merge "Propagate signals through makeparallel" 2016-10-04 00:23:54 +00:00
Colin Cross
cf8afef2eb Merge "exec makeparallel" 2016-10-04 00:23:47 +00:00
Colin Cross
6548b54dfd Merge "Revert "Remove -d keepdepfile from ninja command line"" 2016-10-04 00:23:37 +00:00
Colin Cross
49c45aecc4 Propagate signals through makeparallel
Set up a signal handler in makeparallel that will forward SIGHUP,
SIGINT, SIGQUIT, and SIGTERM to the child process.

Bug: 31907490
Test: m -j & killall make; pgrep -a ninja
Test: make makeparallel_test
Change-Id: I306e5335ed1b2c7056804d5da377a2f283877f30
2016-10-03 15:33:11 -07:00
Colin Cross
a5471a6723 exec makeparallel
bash doesn't kill children when it receives SIGTERM.  Since makeparallel
is the last command run by the shell, run it with exec to replace the
shell with makeparallel so make can send the signal directly to
makeparallel.

Bug: 31907490
Test: m -j & killall make; pgrep -a makeparallel
Change-Id: If8aeb51ec224234da5f05eae3382ce77f48a57e2
2016-10-03 15:33:06 -07:00
Colin Cross
647d383788 Revert "Remove -d keepdepfile from ninja command line"
This reverts commit 4aca571552.

Test: builds
Change-Id: Iddb3517a4596e84404db1738fa95eb15f435a42d
2016-10-03 15:28:58 -07:00
Dan Willemsen
f009531772 Merge "Optimize rebuilds by reducing $(shell) usage" 2016-10-03 21:20:36 +00:00
Dan Willemsen
b011810c25 Optimize rebuilds by reducing $(shell) usage
$(shell) isn't particularly fast in Kati, and they have to be executed
both when reading the makefiles and determining whether the ninja file
needs to be regenerated.

Right now, the regen time is mostly hidden because we run them in
parallel. We've also configured it to ignore any commands that contain
"echo", "date", or the output directory. That happens to remove most
commands that contain side effects, so running them in parallel is fine.

But the side effects contain some important things, like the clean up
necessary when switching products. So I'm removing those filters, and
then we'll need to run the shell commands in sequence, since there will
be side-effects. That makes regen take longer though, so use pure-Make
implementations instead of $(shell) where possible.

This set of changes reduces aosp/master aosp_arm64-eng build $(shell)
usage and time by 2/3:

*kati*: func shell time: 3.135095 / 709
*kati*: func shell time: 1.067331 / 236

Bug: 30947985
Test: Manual test lines for math functions
Test: Compare build-aosp_arm64.ninja before/after
Change-Id: I4fc9d6318957992921972994f277c17918e7e1eb
2016-09-30 21:14:13 -07:00
Dan Willemsen
847d965b9e Merge "Remove LOCAL_CTS_GTEST_LIST_EXECUTABLE" 2016-10-01 01:43:37 +00:00
Treehugger Robot
ad49deb5e6 Merge "releasetools: Clean up sign_target_files_apks.py." 2016-10-01 00:11:33 +00:00
Treehugger Robot
3d38042a00 Merge "Use DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS for vendor/google_devices" 2016-09-30 23:25:17 +00:00
Tao Bao
9aa4b9b1b6 releasetools: Clean up sign_target_files_apks.py.
Remove the obsolete workaround for API 24. Also make it pylint clean.

Test: 1. Sign a target_files.zip and get identical results.
      2. `pylint --rcfile=pylintrc sign_target_files_apks.py` gives 10.00/10.

Change-Id: I21736f959c5182486fd8ccebea9bbc594edef9fb
2016-09-30 15:29:09 -07:00
Chih-Hung Hsieh
10efc73c06 Use DEFAULT_EXTERNAL_VENDOR_TIDY_CHECKS for vendor/google_devices
Many source files under vendor/google_devices
are old third party code with too many clang-tidy
misc-macro-parentheses warnings.

Test: build with WITH_TIDY=1
Change-Id: I79248af3ece9c7a4436b8cf5e6c25f224fd8201b
2016-09-30 14:50:43 -07:00
Tao Bao
0a5b59e78b Merge "releasetools: Fix the reference to OPTIONS.info_dict." 2016-09-30 17:39:22 +00:00
Dan Willemsen
3aa39a4903 Remove LOCAL_CTS_GTEST_LIST_EXECUTABLE
The one user has now been removed, so this is no longer necessary.

Test: None
Change-Id: I8fb9e7b90f664af616368685d81f8b10d0687306
2016-09-29 22:37:04 -07:00
Tao Bao
b31b94e159 releasetools: Fix the reference to OPTIONS.info_dict.
sign_target_files_apks.py calls common.GetBootableImage() but without
calling 'OPTIONS = common.OPTIONS' first. In common.GetBootableImage(),
we should use the local info_dict parameter instead of OPTIONS.info_dict.

Test: sign_target_files_apks.py generates signed-TF.zip successfully.

Change-Id: Ia3d32b88691c26e5fb98feea709e3e3c3eb70fdb
2016-09-29 22:04:50 -07:00
Treehugger Robot
1c0b5eaf83 Merge "Add LOCAL_EXPORT_C_INCLUDE_DEPS" 2016-09-30 01:38:04 +00:00