Commit graph

10773 commits

Author SHA1 Message Date
Tao Bao
31543713fc Merge "Makefile: Pack verity_verifier into otatools.zip." 2016-11-28 18:04:04 +00:00
Tao Bao
7f02f3413b Makefile: Pack verity_verifier into otatools.zip.
verity_verifier is needed when verifying verity metadata.

Bug: 32173582
Test: `m otatools-package`
Change-Id: I63fdeb75cdca10ea38c1df978d64701acdd4c1db
2016-11-22 15:36:57 -08:00
Treehugger Robot
c7d2fe614e Merge "Support LOCAL_SDK_VERSION := current for NDK." 2016-11-18 19:04:40 +00:00
Dan Willemsen
fb84281342 Use new -ninja flag to aidl-cpp
This make aidl-cpp write out a dep file that ninja parses correctly.

Test: Manually inspect ninja depfile
Change-Id: I4890a91eb29a6388e17b1ffac23a3dc0ffe6c212
2016-11-13 09:44:25 -08:00
Dan Willemsen
da85fecaf1 Merge "Remove transform-d-to-p" 2016-11-11 21:38:53 +00:00
Dan Willemsen
461d844a40 Remove transform-d-to-p
Ninja doesn't need the phony make targets, in fact, the parser doesn't
handle them correctly and ends up duplicating the dependencies. This
shrinks a `m native` deps file from 54M -> 35M on AOSP.

Test: Compare out/build-aosp_angler.ninja before/after
Test: wrote a tool to dump the .ninja_deps, added dedup feature, files
      identical after dedup.
Change-Id: Iec7a9a0739e8678c1f4db79c68e423a39b9aad4b
2016-11-10 21:55:01 -08:00
Dan Willemsen
1ff5fa11c4 Fix vendor/google/build/ninja_config.mk
This needs to be included between PARSE_TIME_MAKE_GOALS and KATI_GOALS

Test: m -j <target-from-internal>
Change-Id: I7284f05336b921d40f04ff5811a47bd0d17a066f
2016-11-10 19:41:27 -08:00
Dan Willemsen
04f53ed923 Split (ninja|soong).mk into config and rule portions
So that an external tool can read the configuration using
dump-many-vars, and write out the soong.variables file while only
loading config.mk.

Also remove dumpvar-% from PARSE_TIME_MAKE_GOALS, since it's only used
with CALLED_FROM_SETUP / config.mk. This provides an easy way to test
this change as well.

Test: get_build_var NINJA
Test: get_build_var ANDROID_GOALS
Test: get_build_var NINJA_GOALS
Test: get_build_var KATI_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-ANDROID_GOALS" get_build_var ANDROID_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-NINJA_GOALS" get_build_var NINJA_GOALS
Test: MAKECMDGOALS="droid sdk dumpvar-KATI_GOALS" get_build_var KATI_GOALS
Test: MAKECMDGOALS="out/build-a.ninja dumpvar-ANDROID_GOALS" get_build_var ANDROID_GOALS
Test: get_build_var SOONG_MAKEVARS_MK
Test: get_build_var SOONG_VARIABLES
Test: CALLED_FROM_SETUP=true BUILD_SYSTEM=build/core make -f build/core/config.mk out/soong/soong.variables showcommands
Test: Compare soong.variables from above, and before/after with `m`
Test: Compare out before/after with `m doesnotexist`
Test: `m dist doesnotexist`
Change-Id: I1bc291aa165297c930fe600067edad6ce4979210
2016-11-09 17:53:33 -08:00
Dan Willemsen
cfabc42af9 Move some configuration from main.mk to config.mk
When dumping make configuration (dump-many-var, dump-var-*), we only
load config.mk, not main.mk. One of the first things that main.mk does
is to include config.mk, so these moves are safe.

Turning off the implicit rules and other make configuration / sanity
checks should happen in all cases, so move them to config.mk

Move dont_bother_rules to config.mk so that it can be used by the ninja
configuration (which is moving in a later change). Move dont_bother into
the kati section, since it's not used elsewhere.

Test: m clean
Test: get_build_var dont_bother_goals
Change-Id: Ib3ec8aa8eebcaf743d2cdcc31f89827c4e8470a1
2016-11-09 17:29:23 -08:00
Dan Albert
988107d35c Support LOCAL_SDK_VERSION := current for NDK.
Test: Added a module using this and checked the link command line.
Bug: None
Change-Id: I3a55e4638340d8835c09ebc6a1440bece962d36e
2016-11-08 15:37:43 -08:00
Treehugger Robot
d778640b0f Merge "Export variable for device sanitize arch to Soong" 2016-11-03 07:12:54 +00:00
Dan Willemsen
d4b0504f85 Update combined build.ninja to depend on Soong's build.ninja
For Soong's build.ninja regeneration to work

Bug: 32574042
Test: m -j, add globbed file, m -j
Change-Id: Ie267ea33e8de88275e99330b2d0f147d1e58fa7b
2016-11-02 16:24:52 -07:00
Colin Cross
2361842291 Export variable for device sanitize arch to Soong
Also renames the variable from SANITIZE_ARCH to SANITIZE_TARGET_ARCH,
and makes it only apply to the device.

Bug: 29498013
Test: No change to build.ninja files with m -j SANITIZE_TARGET=address
Change-Id: Ib5f6ab448f5d96d2426c983308136670f9a55b7b
2016-11-02 15:20:25 -07:00
Dan Willemsen
b1e0c2c478 Merge "Remove configuration exported from Soong" 2016-11-01 17:07:54 +00:00
Treehugger Robot
ca5748fbe1 Merge "Pass global tidy configuration to Soong" 2016-11-01 01:19:00 +00:00
Dan Willemsen
7918e5121a Merge "Improve dotdot workaround when src begins with '/'" 2016-10-31 23:39:36 +00:00
Dan Willemsen
425130e958 Remove configuration exported from Soong
Bug: 32244182
Test: build-aosp_angler.ninja is identical before/after (with same env)
Change-Id: Iec2784d1ec5301afe4e2de491dee806551ae3764
2016-10-31 15:48:00 -07:00
Dan Willemsen
96290686bf Pass global tidy configuration to Soong
Bug: 32244182
Test: WITH_TIDY=true mmma -j build/kati
Test: WITH_TIDY=true WITH_TIDY_CHECKS=-*,performance* mmma -j build/kati
Change-Id: Idca86bd114f353449bf80f73d255d7095a99682a
2016-10-31 15:47:49 -07:00
Colin Cross
515f43bb6e Merge "Revert "Revert "Check prebuilt sources during checkbuild""" 2016-10-30 22:05:17 +00:00
Dan Willemsen
c57894c204 Improve dotdot workaround when src begins with '/'
There are some source files in our tree that use some text processing to
find source files, and end up with source file names that look like:

  /../../dir/file.c

This isn't fixed by our dotdot workarounds because the filename doesn't
start with '../', so strip the initial '/' from any source files, since
they are all relative to $(LOCAL_PATH) anyways.

Bug: 32514380
Test: Build internal source with this problem
Test: Compare build-aosp_angler.ninja before/after
Change-Id: If869419c3d3ba35d55f6e19d9332515695e47d24
2016-10-28 16:30:48 -07:00
Colin Cross
01e1b8ff4b Revert "Revert "Check prebuilt sources during checkbuild""
This reverts commit 409ea88c47.

Bug: 32332829
Change-Id: Ifc8a511762cb44b455cc821f5ac712c294c321c6
2016-10-27 22:10:55 +00:00
Colin Cross
526ddfb172 Merge "Revert "Check prebuilt sources during checkbuild"" 2016-10-26 23:26:43 +00:00
Colin Cross
409ea88c47 Revert "Check prebuilt sources during checkbuild"
This reverts commit ec8fae6f2e.

Revert this until a few oddball branches can be fixed.

Bug: 32332829
Change-Id: Ic95fa50e36cb32a4d29bf765b1f3d8384140fb0b
2016-10-26 23:25:57 +00:00
Colin Cross
0f26c64ef5 Merge "Check prebuilt sources during checkbuild" 2016-10-26 19:35:32 +00:00
Pirama Arumuga Nainar
08df240f94 RenderScript-specific build updates for LLVM rebase
Bug: http://b/31320715

Use LLVM's RenderScript triples: upstream LLVM now has 32-bit and
64-bit RenderScript triples.  Update RS_TRIPLE build variables to use
the new triples.

Switch prebuilt clang used for building RenderScript runtime library to
the latest prebuilts.

Test: Run RenderScript tests (slang, bcc host tests, RsTest, CTS)

Change-Id: I308f6a2183350cfc380228a1eed07ec118d93a46
2016-10-25 09:35:26 -07:00
Treehugger Robot
fce41130cc Merge "Cleanup NATIVE_COVERAGE, PRIVATE_ARFLAGS" 2016-10-22 03:02:52 +00:00
Colin Cross
ec8fae6f2e Check prebuilt sources during checkbuild
Add prebuilt files as dependencies during checkbuild.  This will flag
prebuilt modules that have files that don't exist as errors, and also
fix building soong modules with make native, etc.

Bug: 32332829
Test: m -j checkbuild
Test: m -j host
Change-Id: Ia4e22cb640978c181de039202baf02f4fb5a94d5
2016-10-22 00:00:40 +00:00
Dan Willemsen
9f95665022 Cleanup NATIVE_COVERAGE, PRIVATE_ARFLAGS
Disable the NATIVE_COVERAGE code when not in use. Provide the proper
PRIVATE_ variables so that the $DISPLAY environment variable isn't
encoded into the ninja file.

Remove PRIVATE_ARFLAGS, which is never set.

Test: compare build-aosp_flounder.ninja
Test: NATIVE_COVERAGE=true build-aosp_flounder.ninja, inspect
Change-Id: I2a52de440fd991cdc5761ff8bd58a474892d2dfc
2016-10-21 16:40:19 -07:00
Treehugger Robot
fe3e1818e5 Merge "Don't pass -Wl,--no-undefined to host targets" 2016-10-21 23:00:35 +00:00
Chih-hung Hsieh
461a15d0d9 Merge "Remove valgrind from the exception list." 2016-10-21 05:05:30 +00:00
Dan Willemsen
4e5df99720 Merge "Remove variables exported by Soong" 2016-10-21 01:08:51 +00:00
Colin Cross
a82fa12c54 Don't pass -Wl,--no-undefined to host targets
Host builds were compiling without -Wl,--no-undefined because of an ASAN
issue.  Pass -Wl,--no-undefined for host builds unless sanitzers are
enabled.  Also fix LOCAL_ALLOW_UNDEFINED_SYMBOLS on darwin, where
disallowing undefined symbols is the default.

Test: m -j host
Test: m -j SANITIZE_HOST=address host
Bug: 32305815
Change-Id: I0344c321610c55eb8b2092b01e50e4a93a0e85df
2016-10-20 16:25:18 -07:00
Colin Cross
e56e356c46 Use default -std values exported from soong
Test: builds
Change-Id: Ic7b7d226131a2a0ea1f099f8a0fc895448384081
2016-10-20 14:09:24 -07:00
Dan Willemsen
db3bfcea66 Remove variables exported by Soong
These are all variables that we export from Soong, and are only used
after Soong's make_vars.mk is read.

Test: Compare build-aosp_flounder.ninja before/after -- only whitespace
Change-Id: Ibb6c6d7bc00ff5840a72c2bba5d97ac4b4724df3
2016-10-18 17:26:07 -07:00
Ryan Campbell
20f301f4bb Define coverage paths using comma-separated list.
Change COVERAGE_PATHS to access a comma-separated list of paths
instead of a space-separated list to make for easier escaping in
configuration files.

Test: tested using local bullhead build with coverage on lights and nfc
Change-Id: Iec014c8b4fbefcbcc5d865e6acba92bf6364ee3a
2016-10-18 10:25:15 -07:00
Treehugger Robot
3372ce615a Merge "Fix bug preventing multi-module native coverage." 2016-10-18 00:43:10 +00:00
Treehugger Robot
e5d1926c61 Merge "Add a dist goal for the NDK." 2016-10-17 22:59:17 +00:00
Ryan Campbell
4a3be3db47 Fix bug preventing multi-module native coverage.
Fix a whitespace bug causing coverage to be enabled on all modules
whenever more than one module is specified. This is caused by
comparing whitespace to the empty string, which are not equal. Fix
by stripping the output to check for path matches.

Test: tested using local build with coverage enabled on NFC, lights
Change-Id: I61a775cfd135f94ea1e1ee9fdbed3c64c5bb1a2e
2016-10-17 15:43:21 -07:00
Dan Albert
4d323338fe Add a dist goal for the NDK.
Test: make sdk dist
Bug: None
Change-Id: I07dfc73e3cea5afebcf5ed10cf860eb3f33cbff6
2016-10-14 16:45:30 -07:00
Sasha Levitskiy
4a34533e11 build: tools: Add json collection of installed files with hashes.
Adds installed-files.json in addition to installed-files.txt
Further sorts the file list to be ordered within the same size bucket.

Test: manual, cross-checked checksums with sha256sum utility
      checked build outputs.

Bug: 19988819
Merged-in: Ifb632eb4df65ec48645c8f93e36bae44ccc52ba8
Change-Id: Ifb632eb4df65ec48645c8f93e36bae44ccc52ba8
Signed-off-by: Sasha Levitskiy <sanek@google.com>
2016-10-14 16:29:16 -07:00
David Srbecky
5ccc874ba1 Merge "Generate SHA-1 build ID for host-generated *.oat files (2/2)." 2016-10-13 12:52:31 +00:00
Chih-hung Hsieh
355e96774b Merge "Add -Werror to compile warning free projects." 2016-10-13 00:42:01 +00:00
Andreas Gampe
da6ddc4086 Build: add preloaded-classes and compiled-classes dependency
Make the ART boot image compilation rule depend on the files
influencing the layout and contents of the image. Required for
incremental builds.

Bug: 32107291
Test: m
Test: echo "android.util.MutableChar" >> frameworks/base/compiled-classes-phone && m
Test: rm frameworks/base/compiled-classes-phone && m
Change-Id: I7b7438672460d8d9d2c8b08b8e7c3cbde8d07a1a
2016-10-12 09:35:39 -07:00
Chih-Hung Hsieh
bab0488828 Add -Werror to compile warning free projects.
* Add -Werror if LOCAL_PATH is in the WARNING_DISALLOWED project list,
  or not in the WARNING_ALLOWED project list.

Test: Build for major targets.
Change-Id: I12235ee1ca1c1837530693699e705e1955275565
2016-10-11 15:38:39 -07:00
Chih-Hung Hsieh
2ce51fc365 Remove valgrind from the exception list.
Now valgrind is built with clang/llvm for
the host and all supported targets.

Bug: 28454823
Test: build
Change-Id: Icb4bb7626a79aa309cec2b396cbd8f155895c901
2016-10-11 15:36:04 -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