Call findmakefile in mma to walk up the tree to find the nearest
makefile. Fixes mma in subdirectories of directories that have
Android.mk or Android.bp files.
Change-Id: I6fa509171699071fc34a2a75dd7e191d4ddca31a
Canonicalize the mmm path relative to the top level before creating the
MODULES-IN-dir target. Fixes cd frameworks/base; mmm -j .
Test: cd frameworks/base; mmm -j
Change-Id: If7bc321e8a87b76121f876bf4bc296b0f9b80578
This was printing all of the Soong modules in addition to the modules
defined in the ONE_SHOT_MAKEFILE. So replicate what we did with
MODULES-IN-* with GET-INSTALL-PATH-IN-* and update all the users.
Bug: 30191725
Change-Id: Ib1e4bf00f64d7a3e8cd91f44eaf1ff82fdfbf162
am: 323396993c
* commit '323396993c6651b4b98974df9e9d53118f27a840':
Fix mm and mmm in Android.bp directories
Change-Id: I95d6bde7a0ea72b47779f1a5b0577ff423524b6f
mm and mmm were not parsing out/soong/Android.mk, so they were ignoring
all modules defined in an Android.bp file. Always include
out/soong/Android.mk when ONE_SHOT_MAKEFILE is set, and convert the mm
and mmm functions to build MODULES-IN-$DIR instead of all_modules so
that only the subset of modules defined in out/soong/Android.mk for the
requested directory are built.
Bug: 28986194
Change-Id: I6e1ff8cacfc668a4154a0d5937450db840bb7a6b
Two eval commands did not enclose their arguments in double quotes, and
this broke compatibility on zsh - preventing lunch from running to
completion. This CL adds the double quotes and fixes the issue.
Change-Id: I5ed884b455e2e61182f6c29fb807ed92372af039
Have croot take an argument of a directory to end up in,
so we can jump around the tree even faster.
Change-Id: Ieb6a8d47fee0412006a11192b29ed44604961312
* Call clang-tidy before every C/C++ compilation if
(1) clang-tidy is found at $(PATH_TO_CLANG_TIDY)
(2) $(my_clang) is true
(3) LOCAL_TIDY is 1 or true, or
LOCAL_TIDY is undefined and WITH_TIDY is 1 or true.
* clang-tidy is called with -checks=$(my_tidy_checks),
which has default '-*,google*,-google-readability*'
and can be overwritten by WITH_TIDY_CHECKS.
* LOCAL_TIDY_CHECKS is appended to $(my_tidy_checks)
* Extra flags are passed to clang-tidy through
WITH_TIDY_FLAGS or LOCAL_TIDY_FLAGS.
* To quickly find and fix clang-tidy warnings, set $(WITH_TIDY_ONLY)
to 1 or true to skip compilation of C/C++ files.
* Add a PHONY tidy_only target,
which includes all $(cpp_objects) and $(c_objects).
* The 'mm' and 'mmm' functions are changed to call make with
the 'tidy_only' target when WITH_TIDY_ONLY is true or 1.
In that case, only clang-tidy is called for C and C++ files.
Bug: http://b/27779618
Change-Id: I8adcfff217d68af49849b79aacee7d7654cafb1b
Neither is standard, but ulimit is toybox and therefore a bit more
regular and at least has help text.
Change-Id: Id7ba9adc9ca256b821d8060506010abef30dee28
1. Combined ~10 calls to the make build system to only one.
We added a phony target "dump-many-vars" to the build system to dump
"<var>=<value>" pairs. We then store the pairs as shell variables.
With this cache get_build_var/get_abs_build_var can just return
the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.
In internal source tree lunch time was reduced from ~15s to ~1.5s.
Bug: 27429759
(cherry picked from commit 08800fd905)
Change-Id: I862a0ec3c1aae97c552054dacec133e857042edf
1. Combined ~10 calls to the make build system to only one.
We added a phony target "dump-many-vars" to the build system to dump
"<var>=<value>" pairs. We then store the pairs as shell variables.
With this cache get_build_var/get_abs_build_var can just return
the shell variables instead of querying the build system.
2. Prune .git when we search for AndroidProduct.mks.
In internal source tree lunch time was reduced from ~15s to ~1.5s.
Bug: 27429759
Change-Id: I24e88598f6fab598ef26518885fd5e86e71a772d
The actual clang compiler called for static analysis is decided
by build/core/binary.mk, not the one given to --use-analyzer.
BUG: 13287788
Change-Id: I58105c20b56ce17ddf329a275c750d14284d1e25
Temporary revert to help out Brillo folks.
It will be resubmitted tomorrow.
This reverts commit 4495f6afb8.
Change-Id: Id378c7d3a6e72e9be50f9404b19d5763568987a5
To return to OpenJDK 7:
export LEGACY_USE_JAVA7=true
And run envsetup.sh/lunch again.
Bug: 25786468
Change-Id: I8e00591a24d13e3b8b6baaafe0fdff6536c58770
This is more efficient as find itself can handle correctly passing
arguments down to the command, and this is in POSIX. The current
versions of OS X also support this form.
BUG=None
TEST=mgrep still works
Change-Id: Ie570867609113868daaf068658c4f7e6f4ae42fa
When a directory isn't present with mmm, don't show "No Android.mk present", rather show that the directory isn't present
Change-Id: I7259a60012c6f30c470daa60d5a5097d01ffc4c7
Signed-off-by: Abhinav1997 <abhinav.jhanwar.august2@gmail.com>
This will run ${ANDROID_PRODUCT_OUT}/provision-device which in turn can
run fastboot (and other vendor-specific bits, if needed) to repartition
the device and reflash all partitions with known versions. Options
passed to the 'provision' command will be passed on to said script which
is expected to pass them on to fastboot.
Since this is a rather destructive operation involving data loss etc.,
user confirmation is required. This confirmation can be bypassed using
the option --no-confirmation.
Change-Id: Iec5667f2f5070b95d2eb70ad1b2984909ae4184c
This avoids Ninja's path canonicalization on those goal names.
Without this, Ninja complains about duplicate rules for
MODULES-IN/a/b/.. and MODULES-IN/a.
Bug: 24309760
Change-Id: Id3aa9da5d3887a2cd1426cbb5fdf35659c65805e
Previously we use command line variable BUILD_MODULES_IN_PATHS which
causes kati to regenerate build.ninja if any variable value changes.
TODO: Remove the old rules of BUILD_MODULES_IN_PATHS in
build/core/main.mk and ninja.mk once users have re-sourced envsetup.sh.
Probably in a few weeks.
Caveat: With this change, if a user sources the new envsetup.sh, mma/mmma
won't work in old branches from the same shell.
Bug: 24309760
Change-Id: I212e82aeebaaa2bd4114e2066f1995da8886b5e2
Nothing else was being imported from system/core yet, and a path under
development makes more sense for this.
Bug: http://b/22881740
Change-Id: Ib0beb02137805b3e382535514a2bc067b7fd1d33
We used to rely on envsetup.sh to set up PATH before doing kernel build.
Now we have new kernel build process.
Also the variable doesn't work any more as we don't have corresponding arm-eabi
toolchain for the latest arm-linux-androideabi toolchain.
Change-Id: I99443fdc58e94f57f4f1f7e88da6dd127f3b2fac
There's an adb Python interface now, and system/core needs to be in
the PYTHONPATH for `import adb` to find it.
Change-Id: I712767a2ba96cb017ce5857dc367e4cacf2ec51f
For historical reason, the aosp_* products were named full_*.
We keep the full, full_x86 and full_mips in case some tools still
reference these legacy names; But no reason the have the full_* product
names for the new 64-bit archs.
Change-Id: I240ed0c6ded0ded2d80603bd0c5ff24750999afc
Blocking these sequences on Darwin has false positives (Terminal.app)
and false negatives (Eclipse CDT on Linux). Instead let's ask the
terminal what it supports.
Change-Id: I907942925a8b30abc1ea920f077b5fc3af815ba4
Signed-off-by: Greg Hackmann <ghackmann@google.com>
gdbclient looks for 'x86_64-linux-androideabi-gdb' whereas the prebuilts
have gdb as 'x86_64-linux-android-gdb'
$ cd $ANDROID_BUILD_TOP
$ find prebuilts -iname *x86*gdb
prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.9/bin/x86_64-linux-android-gdb
prebuilts/gcc/linux-x86/x86/x86_64-linux-android-4.8/bin/x86_64-linux-android-gdb
prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.9/bin/x86_64-linux-android-gdb
prebuilts/gcc/darwin-x86/x86/x86_64-linux-android-4.8/bin/x86_64-linux-android-gdb
Change-Id: Ib940ecd6f345ea501da79834168b91cc0f6e5a96
We had discussed the idea of making all host tools default to using
ASAN. Even if we don't make it the default, this makes it easy for the
user to switch all host binaries over.
Change-Id: I64a5c741b1b4e9aefed3a6be8dcd4f386e06b29c
1. Some devices do not set ro.product.device in which
case take it from ro.hardware
2. Add path to tapas symbols to sysroot and solib-search-path
for tapas users only
Change-Id: I4eed2d3c3aefd95070beebdbfba4464a524c3066
Proper selinux labeling support for files on rootfs was
never completely implemented. Instead of putting coredump
files on rootfs, put them on tmpfs instead.
See: http://www.mail-archive.com/seandroid-list@tycho.nsa.gov/msg01815.html
Bug: 18227650
Change-Id: I2eeabee4fe1a14bfbf990a4a518d538d6b4b6e87
Differences between this implementation and the old one:
1. Resolves symbols/gdb based on device information (lunch
target is irrelevant)
2. Works with downloaded from build-server symbols
3. Does not require user to specify exe file - detects it automatically
Bug: 18208329
(cherry picked from commit 9b8e4b3772)
Change-Id: I13ae2debb6e2d827b9aa55e93864b5d60c2bd32e
Differences between this implementation and the old one:
1. Resolves symbols/gdb based on device information (lunch
target is irrelevant)
2. Works with downloaded from build-server symbols
3. Does not require user to specify exe file - detects it automatically
Change-Id: I4e7ce0a51868634593a9f104fe3f2fa67b54ca9f
The shell functions in this patch enable crashing processes with the core limit
set correctly to dump core in directory /cores. They do so by remounting the
root partition, which is RAM-backed, and by creating the 0777-chmodded /cores
under it. They also set the core file pattern in /proc/sys/kernel/core_pattern
to be /cores/core.%p, such that a core dump will have the crashing process' PID
appended to it. You enable core-dump generation once per boot, as follows:
coredump-setup
If a process does not have its core-size rlimit set (as most do not), you can
either set it manually by typing "adb shell prlimit <pid> 4 -1 -1", or by
typing coredump-enable <name>, e.g.
coredump-enable $(pid mediaserver)
Alternatively, you can cause a running process to dump core by sending it a
SIGSEGV via the shell function core <name>, e.g.:
core $(pid mediaserver)
Change-Id: Ib174e7ee95515fb9866fa6bf0d5b5bf23f3ec61b
Signed-off-by: Iliyan Malchev <malchev@google.com>