Very few vendorsetup.sh files are needed anymore, since add_lunch_combo
has been deprecated. So add a way so that only approved vendorsetup.sh
files can be loaded into the shell, and others will be skipped.
This further limits the amount of code that can run outside the build
sandbox, and makes this list more visible to tree maintainers before
they're used instead of after.
Test: no allowed-vendorsetup_sh-files
Test: empty allowed-vendorsetup_sh-files
Test: one file in allowed-vendorsetup_sh-files
Test: two files in allowed-vendorsetup_sh-files
Test: non-present file in allowed-vendorsetup_sh-files
Change-Id: Ia23d1c9d11a7295d5be5abd10cf56edbdec80483
Remove atest/acloud/aidegen functions and append prebuilt path
in PATH. Use local built by default; if there is no local built,
use the prebuilt one instead.
Bug:
Test: $ source build/envsetup.sh; lunch
$ echo $PATH|sed 's/:/\n/g' | egrep "out|asuite"
# will see out/host prioritises prebuilts/asuite.
Change-Id: I1e5869bcb81cf7058cf8971f480a47d2c8f8b6f0
If ANDROID_QUIET_BUILD environment variable is set, do not print
build timing and colorized summary result.
Test: treehugger
Change-Id: I7ae3f8eb407df470837560706f06e5785911828c
Remove atest/acloud/aidegen functions and append prebuilt path
in PATH. Use local built by default; if there is no local built,
use the prebuilt one instead.
Bug:
Test: $ source build/envsetup.sh; lunch
$ echo $PATH|sed 's/:/\n/g' | egrep "out|asuite"
# will see out/host prioritises prebuilts/asuite.
Change-Id: I16c3e85c195b878d3c629149afbd96636ed1f0e1
When target directories are specified, mmm now scans their parent
direcotries to when searching for build config files. Also make it look
more like mm as minor refactoring.
Bug: 62899341
Test: Manual builds.
Change-Id: Ic9c081090e1baeb0849508e9086f2976b108c0ee
After running "lunch" multiple times, the global variable
PYTHONPATH grows larger and larger with repetively content.
This patch is to prevent PYTHONPATH from prepending redundant path.
Bug: b/121110600
Test: $ source build/envsetup.sh && lunch
$ echo $PYTHONPATH | sed 's/:/\n/g'
$ lunch; lunch
$ echo $PYTHONPATH | sed 's/:/\n/g' # not growing.
Change-Id: Ifc36d071fb63bb1494bb0a94fdff477a41708c74
A function name with dashes is apparently not universally recognized
by shell versions/variants(?). Using underscore in place of dashes
solves this problem.
Test: ./development/vndk/tools/header-checker/utils/create_reference_dumps.py -l libGLESv1_CM
Change-Id: Id7d701600760140dae9e4762a11f4abd64947d10
Usage:
...aosp/$ gomod libbase
...aosp/system/core/base$
Using in alias:
alias g=gomod
complete -F _complete-android-module-names g
...aosp/$ g libbase
...aosp/system/core/base$
Nothing in Android keeps an up to date index of all Android modules
and their locations between builds. However, there is a target
'module-info.json' which is used to contain some of that information.
This module can be updated using the command 'refreshmod' added
here, but it will also be updated during a normal Android build.
This also adds auto-complete for m.
Bug: N/A
Test: manual
Change-Id: I06b0b87c308b9fe2798dbc29225906cc30fe59fe
toybox xxd treats -ps as -p -s with a missing argument to -s, rather
than as a bizarre synonym for -p.
Test: manual
Change-Id: Ia576861588a4ddeac9885bce8d718929b74f31b1
There are plenty of .hpp files in the AOSP sources.
$ find . -name \*.hpp | wc -l
2430
They were already grepped in cgrep(), but were missing in
sgrep and treegrep.
Test: manual - run the script
Change-Id: I1fb3f576f6cdcc2b492e2beadf11ced98cb3938e
Atest will run in the sequence of built -> prebuilt -> source code.
Bug: b/118801769
Test: source build/envsetup.sh; lunch
and atest will run in the appearing sequence above.
Change-Id: I0494aeab99c390c31bb02641c6c1c11afd5642a2
I call "compinit -i" in my .zshrc, to allow loading autocompletion from
"unsafe" locations. envsetup.sh breaks that. Change behavior to only
call compinit if bash-style completion is not already enabled.
This is a minimal fix; an alternative would be to rely on the user
to call 'bashcompinit' in their .zshrc instead, and just skip all
autocomplete functionality if they don't.
Test: manual - source ./envsetup.sh in {bash, zsh, zsh -f} and test
completion for lunch
Change-Id: Ibb10eb68a96d69c19b9db9b21e0546fe8ae299b2
(zsh)$ source build/envsetup.sh; lunch 23
will result in selecting #22 because array in zsh starts from 1
instead of 0. This CL is to fix this issue.
Bug: b/117202855
Test: below commands should have the same output:
(zsh)$ source build/envsetup.sh; lunch 23
(zsh)$ source build/envsetup.sh; lunch aosp_walleye-userdebug
Change-Id: I0570585417878bc7c73eda0e1a416232fe147fb4
Now Atest can autocomplete module names, dir and filenames with
tab completion, and zsh users can benefit from it.
Bug: 110629292
Test: In both bash and zsh environments:
source build/envsetup.sh && lunch aosp_arm-eng
atest <tab><tab> # has candidates
adb <tab><tab> # has candidates
ENVSETUP_NO_COMPLETION=atest:adb . build/envsetup.sh && lunch aosp_arm-eng
atest <tab><tab> # no candidates
adb <tab><tab> # no candidates
Change-Id: Ib1c9e02feeb8aaf75c0b97821ae26e13ba8df350
Make it so that these can be used in other scripts by moving them from
functions defined in envsetup.sh to standalone scripts.
Test: stacks zygote64
Change-Id: Id8e5ce5b4da80e57f4226eb34edaf82b87393834
Fix stacks for the change in ANR trace location by using `debuggerd -j`
instead of manually fetching the traces file.
Also, dump zygote/zygote64 as native processes, since they don't
respond to SIGQUIT.
Test: stacks zygote
Test: stacks adbd
Test: stacks com.android.settings
Change-Id: I015458bdc2dd45624940204d42614365aacf8304
Many Android.bp files are now no longer needed (since they
are all scanned and subdirs are deprecated), so there are many
places in a tree where they aren't hit.
This still suffers from one bug, given this directory structure:
A/B/Android.bp
A/B/C/D/Android.bp
A/B/C/
A/B/C/E/Android.bp
if you call 'mma' from 'A/B/C', then it will make
MODULES-IN-A-B.
However, for now, this change makes it so given the following
directory structure:
A/B/C/D/Android.bp
A/B/C/
A/B/C/E/Android.bp
if you call 'mma' from 'A/B/C', then it will make
MODULES-IN-A-B-C as expected (since there are no makefiles in
parent directories). This is the expected behavior in this case
and it is common in directories where Android.bps have been
removed (since they only referenced subdirs) or outside of
git projects.
The reason why this usecase is supported is so that given this:
A/B/C/D/Android.bp
A/B/C/D/include/D/foo.h
You can, from A/B/C/D/include/D/ (for instance) do an mma, and
it will still make the modules defined in A/B/C/D/ which are
presumably related to this.
This change doesn't fix mm or other binaries. In the long term,
either we should just consider mma to make the current directory
(and not look for parent directories for the above 'feature') or
we should move more of the complexity in the build system itself
so that it can intelligently find the first parent directory
which contains a makefile in a subdirectory.
Fixes: 65407300
Test: mma from following dirs
system/tools/hidl/test/hash_test/bad/hash/1.0 MODULES-IN-system-tools-hidl-test-hash_test
system/tools/hidl/test/hash_test/ MODULES-IN-system-tools-hidl-test-hash_test
system/ MODULES-IN-system
hardware/ril/ MODULES-IN-hardware-ril
Change-Id: I072d3f382d40cd360ec3d14f8f5b060a4bde9289
Now most of the other noise is gone, we should probably quiet down too.
Bug: N/A
Test: `source build/envsetup.sh`
Change-Id: Ic5b169b1771163488e70d732276372efbf304bae
settitle always had a bug in the PROMPT_COMMAND, it used "\033]0;",
where it should be "\033[0m". It was opt-in, and changed to opt-out, and
no one really complained that it didn't work. So we are just going to
remove this.
References:
- http://www.termsys.demon.co.uk/vtansi.htm
- https://en.wikipedia.org/wiki/ANSI_escape_code
Test: lunch and see no change in prompt
Change-Id: I777c87b4d8e80c0e9437e5d2628f6df020883389
Start deprecating add_lunch_combo, preferring a list of common choices
in each AndroidProducts.mk file.
This list will be validated so that we don't have typos:
https://android-review.git.corp.google.com/c/device/generic/car/+/619533
Or targets that no longer exist.
Bug: 77599627
Test: lunch
Test: lunch 34
Test: lunch aosp_x86_64-eng
Test: lunch aosp_<tab>
Change-Id: Ie0ddaa94cbd6cee26584f56f1706a8ec1333f87e
* Use the definitions of ClangDefaultBase and ClangDefaultVersion
in build/soong/cc/config/global.go.
* scan-build is too old;
replaced by better clang-tidy's -clang-analyzer-* checks.
* WITH_STATIC_ANALYZER is still effective
to invoke ccc-analyzer or c++-analyzer.
Test: make checkbuild
Change-Id: Ifd159dd28e529d5d3c9807f5e391911365da8cdb
This architecture only existed for unbundled use, but even the NDK is
removing support in their r17 release, so just remove support for it.
Test: build/soong/build_test.bash -only-config
Test: check buildserver configs, I don't see anything still using armv5
Change-Id: Ic183b510c9ada94438bd4cc2b9362fa438a29ced
Some parts of envsetup.sh aren't very happy with things like
this:
function cd() {
builtin cd "$@" && pwd && ls -l
}
here, I have s/cd/builtin cd/ one such case where envsetup
is trying to execute the output of cd.
Test: manual
Change-Id: I2774481dfbd958410682a4f773f1b8f12a0080aa
Let folks opt in if they want the custom title.
Bug: https://issuetracker.google.com/38402256
Test: hitting enter no longer flashes this title
Change-Id: I8c1e1b22cc47ab9496797328fb1b13c0827840b0