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
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
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
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
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
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
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
This reverts commit ec8fae6f2e.
Revert this until a few oddball branches can be fixed.
Bug: 32332829
Change-Id: Ic95fa50e36cb32a4d29bf765b1f3d8384140fb0b
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
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
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
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
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
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>
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
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