You can dist the same file for multiple goals in multiple calls to
dist-for-goals. The first call will establish the real copy rule, while
the rest call just establishes the goals' dependency on the dest file.
This enable uss to remove the bizarre $(if ..) enclosing the droid and
sdk dist while avoiding make's multiple rules warning.
Change-Id: I76475db76a9e6167e0e606dd582b54e80dfcdd22
Trying to use reflection on classes loaded from a different ClassLoader
than the system one caused SecurityException since you can't load
certain packages.
Adding them to the boot classpath forces them to be in the same
ClassLoader.
Change-Id: Id518ab0a99da6defac525c0ad430a63f600ce85f
With this change, e2fsck is run only when you build the update.zip file,
which is built when "dist" is among the make command.
Bug: 7591683
Change-Id: I446b71d5aa9295aff3af622f115175f769746615
Previously, any target Java code that depends on framework.jar has to
wait for the library's javalib.jar.
To build javalib.jar we have to run dx, which is quite slow.
Actually when code links against framework.jar, only classes.jar is
needed.
This improves the potential parallelism of the build system.
Change-Id: I82c5926ef282a3a6096bbf49b54ef4f2a0c2c0e7
Make the host and the target x86 build more uniform by using the same machine flags.
Its unlikely Android has ever been built on a machine without SSE3 support.
Bug: 8068608
Change-Id: I19635528b61bf2c6faf02c2e575b1d9bf8025d3a
Output a meaningful error message, when OpenJDK is detected
instead of giving the "wrong java version" output.
That output confused several users (from experiences in IRC)
since it gives you an output like "You are using java
version 1.6.0, right version would be Java SE 1.6".
Change-Id: I31ceeb03f1f98524b2b7de9b8be45231985fdb9e
Signed-off-by: Tim Roes <tim.roes88@googlemail.com>
There is lurky bug in the previous logic I believe:
in rare cases, people saw almost all cleansteps rerun.
Anyway, it's very rare that you need to run cleansteps when you run mm/mmm.
Change-Id: I42e84b3bf01590712ba1b167fe9a500f4ae1ddde
Before this, if there are duplicate module names in both the host and
target spaces, LOCAL_SHARED_LIBRARIES results in mixed dependencies.
Bug: 7026946
Change-Id: I5407e3d078a8903c94978cc6d3e256851c52340f
Set ANDROID_BUILD_EVERYTHING_BY_DEFAULT to true to build everything by
default. You can set it in your .bashrc or buildspec.mk.
Change-Id: I0bc2461d0e17c63a6f1c439cdfaaa94e36483a02
Add -D_FORTIFY_SOURCE=1 to the default cflags
Update build rule for executable with PRIVATE_ALL_WHOLE_STATIC_LIBRARIES
Use single dash version of -print-whatever
compile everything with relro / bind_now
Enable NX protections
Some other cleanups to reduce differences between ARM and MIPS config files
Change-Id: I30b4de449e6353b581ef7f9437a3bb9be53d5bbf
Signed-off-by: Chris Dearman <chris@mips.com>
* commit '7ce7473f866fc5356291f38a3437a071ea5fd00d':
For the current MIPS compiler __builtin___clear_cache() generates synci instruction only with -msynci option So, add -msynci to all mips32r2 makefiles. Also add msynci to the list flags not recognized by clang.
If this is mm/mmm and there is no pre-existing clean_steps.mk.
Otherwise, the build system will run almost all the clean steps in the
sourcet tree if you do a full build next.
Change-Id: I5fe1e99c4f09629e4455319ea664cfba4ac634ea
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, add -msynci to all mips32r2 makefiles. Also add msynci to the list flags not recognized by clang.
Change-Id: I48fd6f2b0cbe80c3cd90f453ced97a2f154f7ad3
Signed-off-by: Rocky Zhang <yan@mips.com>
With this support, you can piggy-back some symlinks when a module gets
installed.
This is especially helpful if the target of the symlink doesn't exist on
the build machine.
Change-Id: I48af7a90ce67475bc49b72f94a8753b94da98edd
# Via Android Git Automerger (3) and Dirk Dougherty (1)
* commit 'f0b7415e6e27120b6358445c3c58fef7cc43f28a':
Add new droiddoc option for project-specific secondary html input/output paths.
About symlink, show error on Mac.
To fix it, use 'rm' before 'cp'.
error log:
cp: symlink: /data/misc/audio/wcd9310_anc.bin: File exists
make: *** [out/target/product/mako/system/etc/firmware/wcd9310/wcd9310_anc.bin] Error 1
Bug: 8127112
Change-Id: I94e1677a6742cf4350e92bdffd58e6b782cf662c
# Via Android Git Automerger (2) and Dirk Dougherty (1)
* commit '34eb13de682225fbb6453f606ed75b3460c0a57d':
Add new droiddoc option for project-specific secondary html input/output paths.
# Via Android Git Automerger (1) and Dirk Dougherty (1)
* commit '18a1a50f981449bb3dbd6bab3ee2502b51259fd7':
Add new droiddoc option for project-specific secondary html input/output paths.
# Via Dirk Dougherty
* commit '9c2336e073cef13a5237965dc7d5fcdb0091be34':
Add new droiddoc option for project-specific secondary html input/output paths.
Error "cc1plus: error: unrecognized command line option
‘-mfloat-abi=softfp’" is much more confusing than
"...gcc: No such file or directory".
Also we don't build in Windows/Cygwin any more so we don't need the old
trick.
Change-Id: Ibbe3da67b412575e56bd6e61ef412ea5b2789fea
With this change, by choosing the right build target, you can reduce
significant verification build time:
If you are working on the framework, "make target-java" sounds enough;
if you are working on native target code, "make target-native" saves
your time by not building the Java code.
This will help reduce uncaught breakges for by default not everything
is built now.
Change-Id: I5a7c82d3f6372db03bea76155c8d6cc63d988eae
Currently building libcore (i.e. to get the core Java libraries) has a
dependency on AAPT. This is problematic for some users that don't want to pull
in the entirety of frameworks/base, e.g. for Dalvik development.
It turns out that all definitions.mk is using aapt for in this case is 'aapt
add -k <jar> <dex>', which adds a file to a JAR while stripping path info.
This is functionally equivalent to 'zip -j', and this CL just makes that
switch.
Change-Id: I292ecaf9d0321018bb7d2e68a49b2cc81de98a20
Add voip-common to various files so that its available when booting
and building. Basically everyplace telephony and mms-common where needed
voip-common was added.
In core/pathmap.mk voip is removed as it is no longer in frameworks/base.
Change-Id: Ieaba759a0f69b45c4b8839cbed1fe757cdf190c5
# Via Android Git Automerger (2) and others
* commit '46fa45ad76ff63978bd35a07aa5e1d743657bf55':
Use += to append to target-specific PRIVATE_CLEAN_FILES
# Via Android Git Automerger (1) and others
* commit 'cf0a90426ad969bd2deb66b0c23079842b6c4fa2':
Use += to append to target-specific PRIVATE_CLEAN_FILES
# Via Gerrit Code Review (1) and Ying Wang (1)
* commit '9e808ff70515479458d39abfd64ed11eb55fefbb':
Use += to append to target-specific PRIVATE_CLEAN_FILES
Cherry picked from commit fe3f62d06b
in master. Since this is already in master, and we're upstream,
set to DO NOT MERGE.
Change-Id: I09e8e849f642792e3a74e2564820ab9bbf1eb28c
Signed-off-by: Mike J. Chen <mjchen@google.com>
If multiple build targets use a common recovery.fstab or system.prop,
this allows them to live in a centralized location and not be copied
or symlinked to the device directories.
Change-Id: I7aeb31ed9dc9b43a5e2c9e46fe582b10cba71b24
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
With this change, you can easily switch between building from source
code and prebuilt.
Set LOCAL_PREBUILT_MODULE_FILE to the path of the prebuilt file,
relative to the top of the source tree, in the usual module definition.
The prebuilt will be used unless any of the followings satisfied:
1) ANDROID_BUILD_FROM_SOURCE is "true", which disable prebuilt globally;
2) The module name is in ANDROID_NO_PREBUILT_MODULES;
3) The LOCAL_PATH is prefixed by any of ANDROID_NO_PREBUILT_PATHS.
A developer can set ANDROID_NO_PREBUILT_MODULES or
ANDROID_NO_PREBUILT_PATHS to build only his own module(s) from source,
while build other modules from prebuilts.
You can set ANDROID_BUILD_FROM_SOURCE to true to build everything from
source.
Those variables can be set with shell environmental variable or in your
buildspec.mk.
Sometimes module B is able to be built from source only if module A is
also
built from source, for example, if B is the test apk of A.
In that case, you can use the macro include-if-build-from-source to
include B's Android.mk only if A is built from source too, or
if-build-from-source to conditionally include the definition of module
B,
if their module definitions are in the same Android.mk.
Support host-executable-hook and host-shared-library-hook.
Change-Id: Icab7cf028c87eaba0dd7efc2a7749fd6f32b44e4
Otherwise the previously exported value will be sticky and the value
defined in the TARGET makefile is ignored.
Change-Id: Icdacb8c46034b8a24a9875b7596b31d00861512a
Otherwise the previously exported value will be sticky and the value
defined in the TARGET makefile is ignored.
Change-Id: I13b9cca2d288f7ab09104c57e7cad9f23de2548a
Enable FORTIFY_SOURCE for Android x86. This adds certain security
protections to Android programs, checking for common programming
mistakes and buffer overflows.
FORTIFY_SOURCE protections have been enabled for ARM since
a46c480e43 (Jun 4th 2012)
Change-Id: Idae6f93d37ddae605088867cd3029f12632456e1
Before this change, because the file_contexts is not in the system,
data or cache directory, the dependency is not reliable.
This fixed the gms build error:
out/target/product/gms/root/file_contexts: No such file or directory
Change-Id: Id8d5b3f4557d43a509ccc00b21dd426a414b7c42
Before this change, because the file_contexts is not in the system,
data or cache directory, the dependency is not reliable.
This fixed the gms build error:
out/target/product/gms/root/file_contexts: No such file or directory
Change-Id: Id8d5b3f4557d43a509ccc00b21dd426a414b7c42
Among other things, this helps monitoring of automated tests, to
properly show which branch the device is running on
Change-Id: I8bb8e3ec347849da44d29ce502b09a593d61ae0e
1) Move check-api to definition.mk, so it can be used in other places.
2) Add additional dependency to the api-stub module to consolidate the
apicheck dependency. Previously you have to run 2 "make"s in a row and
only in the 2nd run apicheck is run, due to a gnu-make optimization.
Bug: 7540265
Change-Id: Ib24ed87d9330027a9f95ed7b16dd4002cc0e3198
1. Use prebuilts/gcc/darwin-x86/host/i686-apple-darwin-4.2.1
See https://android-review.googlesource.com/#/c/46223/
2. Rewrite logic dealing with mac_sdk_version to support all
MacOSX SDK 10.6, 10.7 and 10.8. Note that since
ad2342375963c2468849c1f83a97158383db6511 emulator no longer
depends on 10.6 to build. Since the lowest SDK among intersection
of the "available" and the "supported" SDKs is picked, add a
new variable MAC_SDK_VERSION for developer really want to overwrite
it. MAC_SDK_VERSION still has to be one of the supported, though.
3. Improve mac_sdk_path detection to deal with case where Xcode
*dmg is mounted only, not installed at /Applications.
4. Now we can retire BUILD_MAC_SDK_EXPERIMENTAL
Change-Id: I83e463556a857d527710f766de0e19e1b576151f
1. Check $(HOST_CC) instead of gcc for llvm-gcc.
2. Remvoe Mac SDK 10.4 check because emulator uses
the same SDK version as the rest of framework
Change-Id: I4071fd45dc09a18c5341ad79e6a85e61df060fb4
Phantasm PDK support doesn't work with the factory build.
It's not needed for eng support so we'll disable it.
Change-Id: I9b65cdbb20bbcff601600d6b0cac7cc98f6f614c
Signed-off-by: Nick Sanders <nsanders@google.com>
To pick up a NOTICE file in LOCAL_PATH and attach it to
/system/lib/libfoo.so, use the following syntax:
include $(CLEAR_VARS)
LOCAL_MODULE_CLASS := NOTICE_FILES
LOCAL_INSTALLED_MODULE := $(PRODUCT_OUT)/system/lib/libfoo.so
include $(BUILD_NOTICE_FILE)
Bug: 7460213
Change-Id: Ie692be72deab37be04d1b578578c131a0885a090
When a device java module was using the layers.txt files, and that device java module depenended on
a host java module, when building the host java module, the layer checker tried to run and would
fail, complaining about the host module.
The problem was that since the value wasn't set for the host module, it would be inherited from its
dependent module (a make "feature") and would cause the layer checker to run. So this change makes
it explicitly set PRIVATE_JAVA_LAYERS_FILE for host java modules too.
Change-Id: Ifbc085295d0995a2da5d6d63d8cb379ef2631cc4
When a device java module was using the layers.txt files, and that device java module depenended on
a host java module, when building the host java module, the layer checker tried to run and would
fail, complaining about the host module.
The problem was that since the value wasn't set for the host module, it would be inherited from its
dependent module (a make "feature") and would cause the layer checker to run. So this change makes
it explicitly set PRIVATE_JAVA_LAYERS_FILE for host java modules too.
Change-Id: Ifbc085295d0995a2da5d6d63d8cb379ef2631cc4
This can fix the error "/bin/bash: Argument list too long", if we get a
really long apk list.
Bug tracker Link: http://code.google.com/p/android/issues/detail?id=38937
Change-Id: I72258125c4297dfd9f8f502a96dbfa5a08f3cc50
The Chromium makefile generator used to use module class NONE for the
meta-targets in the gyp files; this was changed to GYP in order to make
it more obvious where they come from in the build. Update the build
system's handling of NOTICE files to reflect this change.
Change-Id: Iff7d4487f3024ec83db0c2a896ec0caf8fb18b24
Default to 4.6, but can overwritten to something else in
prebuilts/gcc/$os/$arch/$arch-linux-android*-$ver
Change-Id: I16f99d642b8ff8e831d392261a0c536041107051
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.
This warning will turn into an error in a future change
(via --fatal-warnings)
Change-Id: I2d169c7ce3600d02e25591f3ec15aba363730298
References: http://www.akkadia.org/drepper/textrelocs.html
Third time's the charm. :-)
In b238210c01, we added
-Wl,--warn-shared-textrel to TARGET_GLOBAL_LDFLAGS. This generated
a warning whenever we created a shared library with a text
relocation. At the time, we wrote:
=====
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.
This warning will turn into an error in a future change
(via --fatal-warnings)
=====
All code which uses text relocations has either been fixed, or
we've temporarily worked around the issue so the code can still
compile.
Enable --fatal-warnings.
This reverts commit 942167dab8.
Change-Id: I578701692ead7e7cd60d73d2070a5bed366e2c6c
In b238210c01, we added
-Wl,--warn-shared-textrel to TARGET_GLOBAL_LDFLAGS. This generated
a warning whenever we created a shared library with a text
relocation. At the time, we wrote:
=====
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.
This warning will turn into an error in a future change
(via --fatal-warnings)
=====
All code which uses text relocations has either been fixed, or
we've temporarily worked around the issue so the code can still
compile.
Enable --fatal-warnings.
This reverts commit 4dc781657b.
Change-Id: I81b96477f1c11069637f28cfd8fb98d42b39be5e
In b238210c01, we added
-Wl,--warn-shared-textrel to TARGET_GLOBAL_LDFLAGS. This generated
a warning whenever we created a shared library with a text
relocation. At the time, we wrote:
=====
Emit a warning when the static linker detects a shared library
has text relocations. Text relocations make it harder to
share pages across processes, and make it harder to use
certain memory protection features in, for example, SELinux.
This warning will turn into an error in a future change
(via --fatal-warnings)
=====
We've successfully removed all text relocations from Android's
compiled code, so turn on -Wl,--fatal-warnings .
Some pre-compiled shared libraries continue to have text relocations,
but they will be unaffected by this change.
Change-Id: I505ea23120048afc45f62593704fe1d6d26a352c