This patch changes the setpaths() function in envsetup.sh to probe
for prebuilts/android-emulator/<host>/, and prepend it to PATH if
it exists.
See https://android-review.googlesource.com/#/c/93399/
for a related patch that adds the binaries.
BUG=13747402
Change-Id: I30794ea52f6dfc58908e6271f2c0da8e2f0b68e8
This patch changes the setpaths() function in envsetup.sh to probe
for prebuilts/android-emulator/<host>/, and prepend it to PATH if
it exists.
See https://googleplex-android-review.googlesource.com/#/c/459741/
for a related patch that adds the binaries.
BUG=13747402
Change-Id: I30794ea52f6dfc58908e6271f2c0da8e2f0b68e8
Specifying the major version rather than hard coding
to a minor version.
(cherry-picked from commit 13b2e19ef2)
Change-Id: Ie2c08d35fcff2129b26c1dfa8a2e5cd7b19c4b49
On architectures other than "arm", the combination of
ANDROID_KERNEL_TOOLCHAIN_PATH being empty, and CODE_REVIEWS being empty,
leads to adding a :: into the user's PATH, which is highly undesirable.
Neither CODE_REVIEWS nor the mips toolchaindir is ever used, so just
remove them, and make sure we only include the extra colon when setting
the kernel toolchain path to a non-empty value.
Change-Id: I2dfa7d3a322b56b6abbc47476082dc6ae4dd6a82
tapas with multiple app names currently works in bash but discards all
but the first app in others (specifically, zsh). Use shell
constructions that are more universal.
Change-Id: I2f836ddf75b89019ac04ef99647d782ffe79cfee
Correct the solib-search-path for 64-bit to look in /system/lib64
for all libraries including those in subdirectories.
Change-Id: I606a0eae1137a857564facc79306ad83097d9659
All introduce a flag LEGACY_USE_JAVA6 to force java6 builds.
This is an unsupported configuration, and provided temporarily
to iron out regressions and compare build output (if required.).
- Increment the version check sequence number.
- Move a more specific check (OpenJDK vs non OpenJDK) after
the more general version check.
- Update the link in the version check error message to the
"initializing" page instead of the "download" page. The latter
talks about repo, mainly.
bug: 8992787
Change-Id: I313e17b1911768d4f3bc318c4162c53dec6eaf0d
Conflicts:
core/main.mk
Analyzer needed by WITH_STATIC_ANALYZER and WITH_SYNTAX_CHECK is
moved from prebuilts/clang/{linux-x86,darwin-x86}/host/3.3 to
prebuilts/misc/{linux-x86,darwin-x86}/analyzer
See https://android-review.googlesource.com/#/c/83852/
BUG=13243591
Usage:
"WITH_SYNTAX_CHECK=1 make ..." instructs build system to invoke "clang -fsyntax-only"
to utilize clang's better diagnostics before calling LOCAL_CC/LOCAL_CXX for code generation.
The compilation time is slightly longer, and the generated object file should be the same as
w/o WITH_SYNTAX_CHECK
"WITH_STATIC_ANALYZER=1 m/mm/mmm/mma/mmma ..." instructs build system to run static
analyzer via "clang --analyze" on a successful build. If analyzer finds any issue, instruction
to open report is displayed. See http://clang-analyzer.llvm.org/scan-build.html for details.
WITH_STATIC_ANALYZER trumps WITH_SYNTAX_CHECK if both exist. Project use lots of GCC extensions
(eg. nested function) not supported by clang may opt out by adding LOCAL_NO_STATIC_ANALYZER:=true
Change-Id: Ib3dda3ffb0fd3aaf2eadec867a966d1dd2868fb1
It can detect and support 3 different scenarios:
- 32-bit exe / 32-bit OS
- 64-bit exe / 64-bit OS
- 32-bit exe / 64-bit OS
Change-Id: I799a91277a5e2331aebf4b2f031e9a79f7ab5bb0
68895a96 has introduced the possibility to limit the modules being
built by mmm. In many occasions this can save a lot of developement
time since it allows to build one target without processing all the
makefiles in the Android tree. Unfortunatelly this nice feature is
undocumented. This CL adds the one line documentation.
Change-Id: I6ded32c4774047599e9c44e5ea71c07e65731cda
Note that despite the location of this change, this function
is run only during "lunch" and not during ". build/envsetup.sh"
Also, make it easier to switch back and forth between java6 and 7
on the same session.
bug: 8992787
Change-Id: I56ec0ba8552b46c04204a8b96b9abc0180f7605f
dumpvar doesn't work right if we're not called from the toplevel;
due to the way the build system works internally, -C does not
suffice. This was already done in get_abs_build_var.
Redundant -C calls removed since we're at the toplevel already.
Change-Id: Iaaa48982547d099186922cc3ddc417a82c85e9a5
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Add x86_64 Android builds. Compiler is expected to be able to understand
-m64 code generation option.
Change-Id: I99e7337c5a5766afc5e528a481bd21631ff44dd5
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
The new option WITH_STATIC_ANALYZER=1 instructs build system to
run static analyzer via "clang --analyze" on a successful build.
If analyzer finds any issue, instruction to open report is displayed.
See http://clang-analyzer.llvm.org/scan-build.html for details.
WITH_STATIC_ANALYZER trumps WITH_SYNTAX_CHECK if both exist.
Project use lots of GCC extensions (eg. nested function) not supported
by clang may opt out by adding LOCAL_NO_STATIC_ANALYZER:=true
Change-Id: I9970560560bd52ce5f0fd7129c3488629627c735
Switch from gcc-4.7 32-bit only to gcc-4.7 multilib (32/x32/64) compiler.
Tested x86 image build on Linux and Darwin.
This bionic patch is required:
https://android-review.googlesource.com/#/c/64183
Change-Id: Ifc2c6c5d6a4a1b71a00a87af072bb7f67b1c284d
Signed-off-by: Pavel Chupin <pavel.v.chupin@intel.com>
It can be used as a goal of mm/mmm.
It prints out modules' install paths, which can be used by the runtest
utility.
Change-Id: If113e4c990b672acbacf723104583c0157d43c3b
o Add -Wno-unused-parameter -Wno-unused-but-set-parameter to suppress
new warnings.
o Define GCC_COLORS to enable colorful diagnostic messages.
Change-Id: Icbd62300b0e6f39d4e514edec2431a06b4d72421
(cherry picked from internal commit ccd8e6082b)
The new --exact flag for pid does an exact match on the
process name, rather than grepping anywhere in the ps
output, which helps target a specific process if its name is
a substring of another process name. (Nothing else about
pid's output, including inclusion of the ps header if it
matches, is affected.)
qpid ("quick pid" or "quiet pid") lists all processes in the
following simplified format:
<pid> <procname>
It also helpfully strips off the header line from ps.
With an argument, qpid will search for processes or pids
matching the argument. With --exact it matches process names
exactly (as does pid, above).
Change-Id: I28a201df40281a66cb1a2918b7ee3a0b2d7b6ffd
AndroidProducts.mk allows for a maxdepth of 4 in device and vendor while
vendorsetup.sh and BoardConfig.mk only allow for smaller depth.
Make search depth consistent for these files.
Change-Id: I406770c1423d4f27fe097956a7c705a0da937e35
Signed-off-by: Beare, Bruce J <bruce.j.beare@intel.com>
Signed-off-by: Laurent Fert <laurent.fert@intel.com>
Signed-off-by: Guilhem Imberton <guilhem.imberton@intel.com>
Author: Laurent Fert <laurent.fert@intel.com>
Summary: We must use the -P flag for pwd to properly get $PWD from the environment *with* symlinks. Otherwise symlink
detection is broken and anything we do using $(gettop) at the top of a symlinked path won't work properly. I noticed this
issue while running on a system that has a SSD RAID symlinked to my android build home directory, which is ~/ssd_storage.
The top in this instance is a symlink, which means that gettop() returns my home path, or the path above the symlink
directory (but not the symlinked directory). This is a major issue in case developers choose to use $(gettop),
$ANDROID_BUILD_TOP, or $T (doesn't really matter either way).
Test Plan: Create a symlink and sync android source into the path. Open up the symlink, run envsetup.sh, and check
$(gettop) output.
While this isn't the best solution, it fixes an issue without creating new issues.
Change-Id: I65bc345753805e6161098d2af6e0bee0b07d37b1
One of the adb commands in runhat was not using the adbOptions and would
fail if specifying a single serial device with multiple connected devices.
Change-Id: I804a6fccc51090cdc78dc2af76bbc0a24d843e3d
pez is a new bash function that can be prepended to existing functions
or commands to clearly show a colored exit status.
Example:
$ pez mmm frameworks/base/etc
will print all the usual output, and at the end either a green "SUCCESS"
line or a red "FAILURE" line.
Change-Id: I7e369b0280d6ece16fb0be1895278c26922491fe
Use gdbwrapper() for launching gdb. This can be redefined to launch
one of the many gdb wrappers instead.
Example:
function gdbwrapper()
{
ddd --debugger $ANDROID_TOOLCHAIN/$GDB -x "$@"
}
Change-Id: I3cce8a2ca1bae6d531e2388a93cb52075b21a42c
Saves any existing traces, dumps stacks from the target process,
then restores the original traces.
(cherry picked from commit f582437162)
Change-Id: I2513f0de0d90cccd56c4949ca7d218e430439c00
Saves any existing traces, dumps stacks from the target process,
then restores the original traces.
Change-Id: I2513f0de0d90cccd56c4949ca7d218e430439c00
augmented mm/mmm:
Their usages are the same as mm/mmm.
They build not only all modules in given path(s), but also their
dependencies.
With them, to run mm/mmm you don't need to run a full build first now:
Just run mma/mmma first.
Note that mma/mmma need to load all the makefiles in the source tree
so they are much slower than mm/mmm.
You should run mma/mmma the first time, and then mm/mmm for
incremental build.
Bug: 8163814
Change-Id: I554a97c0a23343b65c50870406225eb0064e0651
So tools like adb that are built from source won't be overridden by the
host system tools, when you run these tools without specifying the path.
Change-Id: I2f0a288b38fabf57c7a4aa3bae5e42d7b734398d
So tools like adb that are built from source won't be overridden by the
host system tools, when you run these tools without specifying the path.
Change-Id: I2f0a288b38fabf57c7a4aa3bae5e42d7b734398d
Improves attaching to multi-process applications, connecting to the root process
if child process not specified instead of passing bad data to gdbserver
Also logs error instead of passing bad data to gdbserver if pid undetermined
Change-Id: I68ad62645c4f0a7a24aef02c84e3b5b84e14461e
So the returned path can match the one returned by gettop,
and so we can get the correct relative path of ONE_SHOT_MAKEFILE when running mm.
Change-Id: I492d68fec47e59ec9f4ea0fb5139b1a28af0f6cd
Added a few new functions to envsetup.sh:
- getsdcardpath() returns the sdcard path. This will be more useful
when multiuser storage complicates the sdcard path.
- getscreenshotpath() returns the path to screenshots
- getlastscreenshot() adb pulls the most recently-taken screenshot
Change-Id: I851145088344dff6f1672f0a423201f3aa3e4390
The 4.4.3 TC was still being specified in one spot.
Also, no need to cross-set x86/ARM variables when buliding
for ARM/x86.
Change-Id: Icbb0f772a983a24dc10ccab0800d4b7bbd60a099
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Adding a script to there and people thought it would be nice if it were
available/in seach path.
bug:4208971
Change-Id: I58475f5f0149cec2485dc5bc787b5fb3cc68ba0a
Check the Target Architecture to choose the correct
version of the gdb client.
Change-Id: I1d75df235a18e60c6a7142a95c93b0fce69ee736
Signed-off-by: Mark D Horn <mark.d.horn@intel.com>
Hardware API implementations and SSL engines are stored as a
subdirectory to the /system/lib directory. This makes it easier to debug
them with the "gdbclient" command.
Change-Id: If7c3c7ffbca87425aac85d527e44fbea3bb025ad
Bash has a built-in command "help" that is useful for getting
help on bash commands without wading through the bash man page
(e.g. "help test" will give you the syntax for those "if [ ]"
expressions). Overwriting a built-in with a convenience function
is not good.
The function "hmm" was added recently that serves much the same
purpose as help. It seems like a good idea to remove the new
"hmm" command and rename "help" to be "hmm" so we no longer
overwrite the built-in.
Change-Id: I2079b3e6a10715956ec077d31e817a939c6ee4a0
Signed-off-by: Scott Anderson <saa@android.com>
Everyone always mixes up m/mm/mmm and may not know about the "help"
command; this seems to be a nice way to remind yourself. :)
Change-Id: I009c7f7891768a8605c06e8d16384a812e607438
Build all modules: mmm dir
Build a single module: mmm dir:module
Build multiple modules: mmm dir:module1,module2
Or in other words:
Change-Id: If32770c19f03a4d460f32046a3dd06656e33ee11
Otherwise oprofile will punt with the following error message when
processing results collected by perf events since the event descriptions
are not stored in the default location on the host.
profile: could not open unit mask description file
/usr/local/share/oprofile//arm/armv7/unit_masks
Change-Id: I4ff2f2a87546ed3606490596285fb3e466e8d661
Some people were using case-insensitive filesystems which broke when
including simply [a-z]* since it matched the uppercase files. Use this
to filter only the actual bash scripts.
Change-Id: Ibfdcf2c091a154f0485545537a044667783a19f7
Running lunch multiple times results in inserting "::" each time.
"::" is an empty path element, which is treated as a current directory.
Change-Id: I770f4c1f40224ea91fd7989b0ea47d3cd081c24f
"lunch sdk-eng" on cygwin tries to use a gcc.exe from the
prebuild arm toolchain, but it doesn't exist. This prevents
from setting variables to point on a gcc toolchain if there
is none for the given arch.
Change-Id: I3b72220663687f9fdaacc050899aef00632f2c3c
Running build/envsetup.sh on cygwin always shows a
warning since there is no 'ps -o command' option.
Bash already sets SHELL=/bin/bash so we can rely on that if present.
Change-Id: I145b42508985735ba61d2b53b216ecc56e321943
With "incrementaljavac" on your make command line, you will recompile
only Java source files that have been changed since last build.
Nothing is changed if "incrementaljavac" is not among your make goals.
Change-Id: Iae591459827df81ac91e95292464db5e9828343a
Merge commit '73143d9dfcaca5416d46be2733bb370824b3acb2'
* commit '73143d9dfcaca5416d46be2733bb370824b3acb2':
Fix mmm to work with an ANDROID_BUILD_TOP that contains a symlink
Merge commit 'ea83daa389aea493294617232b5c34414861d701' into gingerbread-plus-aosp
* commit 'ea83daa389aea493294617232b5c34414861d701':
Fix mmm to work with an ANDROID_BUILD_TOP that contains a symlink
Merge commit '1fdbf261a0d550baaed96f5461bb014754364c16' into gingerbread-plus-aosp
* commit '1fdbf261a0d550baaed96f5461bb014754364c16':
Don't set DISABLE_DEXPREOPT in lunch.
androideabi target is already in upstream GCC. The arm-linux-
androideabi toolchain can be built directly from upstream GCC.
Switching from old special tailored arm-eabi toolchain to the new
arm-linux-androideabi toolchain make us closer to the opensource
community and friendly to all toolchain developers.
kernel still uses arm-eabi toolchain. So we add arm-eabi toolchain
path to PATH.
The arm-linux-androideabi-4.4.x toolchain is built with the same
source as the latest arm-eabi-4.4.3 toolchain except for the
target change patches.
Change-Id: I1e5f2fe2faeee08f913f37e0ba93e84d2654a8ff
Merge commit 'b96e8a8cc629c3e3a196263cc548bd55824e4ade'
* commit 'b96e8a8cc629c3e3a196263cc548bd55824e4ade':
add phony target "all_modules" and use it as make goal for "mm"/"mmm"
Merge commit 'd9dea715e5841028b1a30aa3f357b05c9de3e8c7' into gingerbread-plus-aosp
* commit 'd9dea715e5841028b1a30aa3f357b05c9de3e8c7':
add phony target "all_modules" and use it as make goal for "mm"/"mmm"
Merge commit 'd5c217aca18726f0ed9f2ea034f750620d4bdf7d' into gingerbread
* commit 'd5c217aca18726f0ed9f2ea034f750620d4bdf7d':
add phony target "all_modules" and use it as make goal for "mm"/"mmm"
So that mm/mmm don't depend on phony target "files", which brings in
unwanted files for apps-only build.
Also allow "dist" for mmm.
Bug: http://b/issue?id=2811503
Change-Id: I2c0794aebd1d171d8a0f44eb8cda67855704d6bd
By inheriting from full, this will be more self-maintaining, and
automatically gets a better-configured variant (e.g. it has locales,
a date format, etc...).
Change-Id: I67b6c2d9f9b7d20cb89154906c3f3d6a5391c838
Instead of sending a kill -10 to write a file to /data/misc, we now use
"am dumpheap" to create a file on /sdcard.
Also,
- Removed mention of unused "output-file" argument.
- Quoted args in initial tests so bash doesn't go nuts when you say
"runhat" with no arguments.
Bug 2835170.
Change-Id: I614fdb54a1d6b8824bc9b568c07cc0901c41a3d4
Merge commit '47bc4e3407326bc58bb171660af5ced4edb93608'
* commit '47bc4e3407326bc58bb171660af5ced4edb93608':
Explicitly indicates that only bash is supported.
Remove all zsh compatibility code and related comments.
Display a warning when other shell is used, to prevent the illusion
that building under Zsh is supported when it's not.
Change-Id: Ie6d43ace3a30bde99aad45b00d25007ac28d5155
Merge commit '6069db77bbd93bdf2a4635a8a7d2ccfb90f0fa75'
* commit '6069db77bbd93bdf2a4635a8a7d2ccfb90f0fa75':
Add full-eng instead of generic-eng in the lunch menu
The path to the Java toolchain is now explicitly
specified so no manual configuration should be
required.
Change-Id: I84abc122c557372e77e4579e9a9efe56af2b412c
The java version changed, and we made envsetup automatically find the right JAVA_HOME.
This change forces everyone to re-source envsetup.sh
Change-Id: Ieb9512d5725cca26a83debf9b0480bc20e19d5ee
Fix javadoc for Java 6.
If you don't set bootclasspath, there would be errors like:
javadoc: error - In doclet class DroidDoc, method start has thrown an exception java.lang.reflect.InvocationTargetException
Change-Id: I1b83360cb595d50577c6043d6e91b0f92e4c04d6
Avoid inheriting PRIVATE_BOOTCLASSPATH from moduels that depend on api-stubs-timestamp
The inherited value has caused build breakage on Mac build.
Change-Id: I8a1b1d6c6d411f6aaaee2d8dbd0297e3d60ab5c2
Ignore STAY_OFF_MY_LAWN when setting JAVA_HOME.
Don't check STAY_OFF_MY_LAWN in set_java_home. That function already
refuses to update JAVA_HOME if it's set to something, which should
be sufficient for anybody who doesn't want the script to mess with it.
With this change, you can get the benefits of the 1.5/1.6 auto-selection
without having to suffer through window title changes.
Change-Id: I5cfc5d6fdf26a10b42b52925f877012c0506b9a5
So that "tapas" without argument won't end in makefile-could-not-load error in unbundled branch.
Also, the magic "all" apps will build only apps, not other things.
Change-Id: Iac6dd928ee4e42996147acdab31930cd4ffa1768
Don't check STAY_OFF_MY_LAWN in set_java_home. That function already
refuses to update JAVA_HOME if it's set to something, which should
be sufficient for anybody who doesn't want the script to mess with it.
With this change, you can get the benefits of the 1.5/1.6 auto-selection
without having to suffer through window title changes.
Change-Id: I5cfc5d6fdf26a10b42b52925f877012c0506b9a5
Merge commit '1884d99a7ab74dd53d9134d6200bb0aff3867f8c'
* commit '1884d99a7ab74dd53d9134d6200bb0aff3867f8c':
The java version changed, and we made envsetup automatically find the right JAVA_HOME.
The path to the Java toolchain is now explicitly
specified so no manual configuration should be
required.
Change-Id: I84abc122c557372e77e4579e9a9efe56af2b412c
gcc-4.4.3 toolchain is based on fsf GCC-4.4.3 with numerous patches.
It reduces 3.65% code size than the prebuilt gcc-4.4.0 toolchain,
and improves 3.4% performance on Android benchmarks.
The toolchain uses gold as default linker. With gold, the toolchain
further reduces 1MB system image.
Change-Id: I55eb4df185f2932e71498fcc28428e4d1b175393
(Actually there was a tapas command that just called choosecombo).
The new better tapas command is for building unbundled apps. Run
it with one or more modules to build and optionally a build variant.
tapas [variant] App1 App2 ...
If you don't supply a build variant, it defaults to eng.
Change-Id: I02214abd0b5ad02e364fcb024e10cf6ad17a9e68
I tried running gdbclient from a subdirectory of $ANDROID_BUILD_TOP
and found that the absolute paths generated by get_abs_build_var
included my subdirectory's path. This fixed get_abs_build_var to
changing directory in a subshell to $ANDROID_BUILD_TOP before invoking
make.
Change-Id: I12b9d9135ac7c044c21c88ed5705b22b0700c039
This way, individual open-source device configurations can
publish device-specific configurations without having
to maintain those centrally in envsetup.sh
Bug: 2533998
Change-Id: I1377846d4d3ebe7abcd2f8279a08abe54039cdbb
Use the PWD= /bin/pwd trick used in getopt in mmm so that it can deal with a symlinked
root directory.
Change-Id: Ia8b5ef10cbd10ca05f2301db86f64fdf11ff2840
This makes runtest, in particular, happier, since it will now find that
its idea of the cwd actually matches with what's claimed in ANDROID_BUILD_TOP.
Change-Id: I485df382d9d314a73b410030bf2116215b6250f9
For debugging non-ANR weird states in the system server, it is incredibly handy
to be able to force a complete thread-stack dump of that process. Here's a
shell function that does so (creating the /data/anr/traces.txt file with the
usual permissions if it does not yet exist).
Depends on adb having been configured to run as root.
Change-Id: I01d9d733ef08ffefb00cb61968df36ecf62087f0
Merge commit 'bd1ee348a1891836cf3b5d0da72e75c0d256fa43'
* commit 'bd1ee348a1891836cf3b5d0da72e75c0d256fa43':
Also look in vendor/*/build for vendorsetup.sh
Merge commit 'a3896fbc15d32881d87e1ae8b7c6e2e7523008c7'
* commit 'a3896fbc15d32881d87e1ae8b7c6e2e7523008c7':
Change runtest env shortcut to point to runtest.py
People keep getting confused by the default products
in this list, which are almost never what they want,
because this list roughly corresponds to the DEVICES
and not the PRODUCTS.
Now that lunch works again, I'm not too worried about
choosecombo except for the couple of cases lunch can't
handle, like the simulator. Therefore, this change
just removes the list of suggested products, and you
have to know which one you're trying to build (which
seems like a resonable prerequisite).
This change does not affect device code.
Original author: brettchabot
Merged from: //branches/cupcake/...
Original author: android-build
Merged from: //branches/donutburger/...
Automated import of CL 143392