Commit graph

30376 commits

Author SHA1 Message Date
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
Clay Murphy
98f15a70e9 Merge "Creates a css nowrap class for non-breaking elements in source.android.com Test: build2stage 36" 2016-11-09 21:18:37 +00:00
Billy Lamberta
4d41e26a54 Creates a css nowrap class for non-breaking elements
in source.android.com
Test: build2stage 36

Change-Id: I467cc66d5e205b00ed188180140b1ae972e2ebad
2016-11-09 21:17:41 +00:00
Tao Bao
4a71d500c1 Merge "releasetools: Use java_path in sign_target_files_apks.py." 2016-11-08 23:31:51 +00:00
Tao Bao
e95540e060 releasetools: Use java_path in sign_target_files_apks.py.
Prior to this CL, it was calling the hard-coded "java" although it was
accepting a "--java_path" option.

Also switch OPTIONS.java_args from string to list. Otherwise it won't
work when providing multiple args.

Bug: 32737832
Test: Specify "--java_path=" and "--java_args" when invoking
      sign_target_files_apks.py with "-v". Check the commands being
      called.
Change-Id: Id7ef98e778646d532027434de7fba9b7a104dbd0
2016-11-08 12:48:43 -08:00
Tao Bao
49758959f2 Merge "releasetools: compare size between compressed and patch while build otapackage" 2016-11-05 00:09:35 +00:00
Tao Bao
b9bd78d110 Merge "releasetools: Make BBOTA incremental generation repeatable." 2016-11-04 21:26:13 +00:00
Colin Cross
4d8462417d Merge "findleaves.py: prevent recursion into symlink loops" 2016-11-04 18:09:36 +00:00
Colin Cross
7829ebfebd findleaves.py: prevent recursion into symlink loops
Keep a set of all visited inodes, and prevent recursing into a symlink
to an already visited inode.

Test: m -j
Test: compare `build/tools/findleaves.py --prune=.repo --prune=.git --mindepth=2 --dir=. Android.mk` before and after
Change-Id: Ied14c40d3066ef9f8e8a2b1535f56f7bbbbd0ab6
2016-11-03 14:29:40 -07:00
Treehugger Robot
d778640b0f Merge "Export variable for device sanitize arch to Soong" 2016-11-03 07:12:54 +00:00
Dan Willemsen
77ecb3347b Merge "Update combined build.ninja to depend on Soong's build.ninja" 2016-11-03 02:39:19 +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
Chih-hung Hsieh
948ebf5510 Merge "Do not use multiprocessing.Pool when --processes=1." 2016-10-28 20:34:49 +00:00
Treehugger Robot
47bfd3422f Merge "Move perfprofd installation to PRODUCT_PACKAGES_DEBUG" 2016-10-28 20:04:51 +00:00
Chih-Hung Hsieh
63de300094 Do not use multiprocessing.Pool when --processes=1.
Purpose of this change is not to save some execution time,
but to avoid forking another process. In other applications
that use a wrapper to call this python script, it is difficult
to get overwritten file I/O functions work in a subprocess.
So the wrapper will call warn.py with --processes=1.

Test: run "warn.py --processes=1 build.log"
Change-Id: I5998d5c70d81a456c86eb4002f444a4a60135477
2016-10-28 10:53:34 -07:00
Colin Cross
1e28014c78 Move perfprofd installation to PRODUCT_PACKAGES_DEBUG
LOCAL_MODULE_TAGS is deprecated, use PRODUCT_PACKAGES_DEBUG instead.

Test: none
Change-Id: I670147f4fe38b02ccafe01b96d8078502404113c
2016-10-27 15:41:57 -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
9e73fb6332 Merge "RenderScript-specific build updates for LLVM rebase" 2016-10-26 17:35:52 +00:00
Tao Bao
3348228423 releasetools: Make BBOTA incremental generation repeatable.
set() doesn't keep elements according to the order of insertion. So
Transfers managed with set() in intermediate steps may not appear in the
same order across runs. This leads to slightly different output packages
when generating the same incremental OTA.

This CL fixes the issue by replacing set() with OrderedDict() in
blockimgdiff.GenerateDigraph() and blockimgdiff.FindVertexSequence().

It also adds a testcase that ensures blockimgdiff.GenerateDigraph()
preserves the insertion order for Transfer.goes_after set.

Bug: 32220816
Test: ota_from_target_files.py gives identical package when running
multiple times.

Change-Id: I56d551e5ca926993ab46896e33c80e0ce42e506a
2016-10-26 09:40:50 -07: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
Tao Bao
02d2d68aec Merge "releasetools: Support verity signer args." 2016-10-24 18:50:14 +00: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
Treehugger Robot
1ee0fa0d35 Merge "Support Android.bp in mgrep" 2016-10-20 23:37:41 +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
dcd73b5043 Merge "Use default -std values exported from soong" 2016-10-20 21:40:55 +00:00
Wei Wang
79056db4e0 Support Android.bp in mgrep
This patch enabled Android.bp in mgrep result

Bug: 32313127
Test: mgrep
Change-Id: Ie3171a10ab54322bfc3844d1f629c783286ec212
2016-10-20 14:31:05 -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
Treehugger Robot
4a0f550cc7 Merge "goldfish_setup: grant ifconfig priv_sock_ioctls" 2016-10-20 17:37:43 +00:00
Richard Haines
8a09cc2297 goldfish_setup: grant ifconfig priv_sock_ioctls
The goldfish_setup shell script needs the ability to set the interface
address via ifconfig. This requires SIOCSIFADDR plus other ioctl
permissions, therefore allow the set of priv_sock_ioctls permissions.

Addresses the following denial that stops internet access via browser:
avc: denied { ioctl } for pid=712 comm="ifconfig" path="socket:[1825]"
dev="sockfs" ino=1825 ioctlcmd=8916 scontext=u:r:goldfish_setup:s0
tcontext=u:r:goldfish_setup:s0 tclass=udp_socket permissive=0

Test: With update can access internet via browser.

Change-Id: I77a52c0b72bb0ebe9451f45c346a399c1f61672d
Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
2016-10-20 16:46:22 +01:00
Ryan Campbell
8a4b4e8432 Merge "Define coverage paths using comma-separated list." 2016-10-20 01:01:25 +00:00
Dan Willemsen
6dfd788fda Merge "For emulator builds preopt system apps even if doing eng build" 2016-10-19 17:56:49 +00: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