Commit graph

67 commits

Author SHA1 Message Date
Ying Wang
57ddcb1bbc Support to build executables against the NDK
Use "LOCAL_SDK_VERSION := <number>" to build against the NDK when you
include $(BUILD_EXECUTABLE).
Cherry-picked from master.

Bug: 7170098
Change-Id: Ib35a294bd6aa4e969d46ecd8ebab8ca5d843e24b
2012-10-10 10:24:26 -07:00
Ian Rogers
76a6dc3a19 Fix common typo in comments, warning and error messages.
s/can not/cannot/g

Change-Id: I1bac31157732666deb46f6f20389ff539977ffb9
2012-10-01 16:36:23 -07:00
Ying Wang
da4bf42514 Don't include system/core/include/arch/<arch>/Android.mk for apps-only build.
Bug: 6994483
Change-Id: I76c4d96264cf94a79d59fdeb52bb37c07a9458dd
2012-08-16 16:45:01 -07:00
Ying Wang
27d51bf6d3 Force out LOCAL_NDK_VERSION.
Change-Id: I0a9f1a630ef2019bed38d420525eac9510b09798
2012-08-14 13:06:22 -07:00
Ying Wang
54fdb473b6 Retire LOCAL_NDK_VERSION.
We are now unifying the NDK versions of unbundled native code to always
use the latest NDK.
We don't need the variable LOCAL_NDK_VERSION now.
To build native code with NDK, you need set just LOCAL_SDK_VERSION.

Bug: 6932421
Change-Id: I86f05a264249cda6bae97b4b1616f03700cd9dfa
2012-08-14 11:58:13 -07:00
Ying Wang
7f8d0ba6bd Adopt the new prebuilts/ndk/<number> paths.
Bug: 6932421
Change-Id: Iba7200aacef2201001f92c6ffa020881f0b528ea
2012-08-14 11:55:46 -07:00
Stephen Hines
bec4a4b980 Disable libcompiler-rt-extras for BUILD_TINY_ANDROID.
Change-Id: I05aa9e43f987ef422d98f43b3734dfbc261feb4b
2012-06-26 16:38:21 -07:00
Jean-Baptiste Queru
471d6d8b11 am 4a65f812: am 6e587f53: Merge "Profiling use aprof, enable by LOCAL_ENABLE_APROF or LOCAL_ENABLE_APROF_JNI"
* commit '4a65f812373e1ecfa6e7058d635e998429a4cf17':
  Profiling use aprof, enable by LOCAL_ENABLE_APROF or LOCAL_ENABLE_APROF_JNI
2012-06-22 14:32:49 -07:00
Jean-Baptiste Queru
4a65f81237 am 6e587f53: Merge "Profiling use aprof, enable by LOCAL_ENABLE_APROF or LOCAL_ENABLE_APROF_JNI"
* commit '6e587f53152127370c6b45204f6529dd7b0ce32a':
  Profiling use aprof, enable by LOCAL_ENABLE_APROF or LOCAL_ENABLE_APROF_JNI
2012-06-22 14:31:05 -07:00
Kito Cheng
70dc3e1d3d Profiling use aprof, enable by LOCAL_ENABLE_APROF or LOCAL_ENABLE_APROF_JNI
Change-Id: Ia95dc7318e17c0804867b22e239edccc5cbec0af
2012-06-15 15:16:50 +08:00
Ying Wang
022a7b32ef Fix arm mode for the generated protobuf code.
Change-Id: Ic644ab9e1b83d9616dd9ca93362805cdd17f36a7
2012-06-13 11:38:10 -07:00
Ying Wang
8e53708ab1 Don't add COMPILER_RT_CONFIG_EXTRA_STATIC_LIBRARIES if we build against NDK.
Change-Id: I732be02bb4b9ee7a2d11ed89f409487f0bc37d0f
2012-06-12 15:52:58 -07:00
Stephen Hines
c72f39664d EXPERIMENTAL: Add libcompiler-rt-extras.a to device builds.
Change-Id: I463217aef573a28069469514ad94cd85a7f38bea
2012-06-12 13:34:50 -07:00
Ying Wang
68f1c77a8d Make export_includes depend on the module's definition makefile.
Bug: 6383397

Note that LOCAL_MODULE_MAKEFILE is calculated in the macro my-dir,
which must be called at the beginning of your Android.mk to calculate
 LOCAL_PATH.

Change-Id: I7aa079e37253fbda25ffb85c2e5bbf0663340e27
2012-04-23 21:29:18 -07:00
Ying Wang
616e596385 Write out export_includes whenever the module is built.
Bug: 6362268
Change-Id: If872cf8fe597a02e6ca740a181cea85f486df98e
2012-04-18 17:35:55 -07:00
Ying Wang
c32af65886 Revert "Write out export_includes whenever the module is built."
This reverts commit 40c34f3778
2012-04-18 16:55:07 -07:00
Ying Wang
40c34f3778 Write out export_includes whenever the module is built.
Bug: 6362268
Change-Id: Ic5d028c108423c694736a06c05ec13093d42f1b8
2012-04-18 16:30:17 -07:00
Evgeniy Stepanov
f50f4c5299 More Clang tweaks to the build system.
Adds arm_neon.h to the include path when building with Clang.
Filters out 3 additional compiler flags when building with Clang.
Filters out unsupported flags from TARGET_(arm|thumb)_CFLAGS, as well.

Change-Id: I5e23a95356e0b10c31c9aa3cb4905f6a674709e4
2012-04-10 16:33:37 +04:00
Ying Wang
4394aaef7e Merge "Build system support to export include paths" 2012-04-09 12:43:09 -07:00
Evgeniy Stepanov
6cc9c06854 Add support for building with AddressSanitizer.
Change-Id: I559d21bbeb9f869f51e48ce18247ceaf766768b4
2012-04-03 14:59:01 +04:00
Evgeniy Stepanov
a7095e9192 Include Clang headers from ".../include" directory.
Do it with -isystem instead of -I.

Change-Id: I70fd55772e59a35f0b5a56816d61120f4921f4a4
2012-04-03 14:58:57 +04:00
Narayan Kamath
2109487a29 Changes to C++ protocol buffer compilation.
Generate C++ code for all .proto files before attempting
to compile them. This takes care of the case where generated
.pb.cc files include other header / c++ files due to proto
imports in the original .proto files.

Change-Id: I26513842618fd31f0b33a3f10df2a5e556094515
2012-04-02 18:39:31 +01:00
Colin Cross
9ad36ef929 Remove base_intermediates from LOCAL_C_INCLUDES
base_intermediates is not used anywhere in the main build system,
and should not be part of LOCAL_C_INCLUDES.  It is used by
external/webkit/Android.mk as a local variable, which causes
the libwebcore_intermediates directory to be added to the include
path for every module.

Change-Id: Iddeee880add4b6f694a15d1900c588e1c547b9df
2012-03-30 19:32:37 -07:00
Ying Wang
dfbe79b803 Don't expose the compiler dependency.
Change-Id: Ia472eaab3e8e883a32e8b441a2480562db278e45
2012-03-22 11:26:22 -07:00
Evgeniy Stepanov
b71e2df30a Add LOCAL_CLANG variable to switch C/C++ build environment to Clang.
Change-Id: I8ca1c24f51aa5546ac9618d31566a52e4fdb1436

Conflicts:

	core/clear_vars.mk
2012-03-22 07:31:27 -07:00
Steve Block
d14d3b4e64 Add a comment about publishing licenses for third-party code
Change-Id: I21bee0bb78ab42b4f7b6a938f94653c7e21e8503
2012-03-21 17:05:11 +00:00
Steve Block
495e58502a Revert "Remove unused notice_files target"
This broke the PRODUCT-sdk-(win_)sdk target of SDK builds

This reverts commit 620a5270fc.

Change-Id: I81afe68ae98b5daac5fe136ec8d04f6fba5af9b4
2012-02-29 20:09:09 +00:00
Steve Block
620a5270fc Remove unused notice_files target
The notice_files target generates $(TARGET_OUT_INTERMEDIATES)/NOTICE.txt and
$(TARGET_OUT_INTERMEDIATES)/NOTICE.html. The former is not needed and the
latter is an explicit dependency of $(TARGET_OUT_INTERMEDIATES)/NOTICE.html.gz.
We can therefore remove the target and the logic to generate NOTICE.txt.

Change-Id: I6179c049bebe590c7298e8be0a30e30265423468
2012-02-29 16:00:58 +00:00
Ying Wang
5f074803fb Build system support to export include paths
Bug: 5573756
With this change, we can set LOCAL_EXPORT_C_INCLUDE_DIRS in the module
definition to export include dir paths.
Paths in LOCAL_EXPORT_C_INCLUDE_DIRS should be relative to the top dir
of the source tree.
If a library (shared or static) exports some include paths, any module
using it will import the include paths and add them to the compiler
command line.

Change-Id: I49aabc589d2cf214044d13ccd5532ef68209adf0
2011-11-17 10:52:32 -08:00
Ying Wang
704c0c9fca Use LOCAL_REQUIRED_MODULES to add dependency of installed shared libraries
Bug: 5200343
Before this change the build system assumes that shared libraries will
be installed to $(TARGET_SHARED_LIBRARIES). That's not true if the
module uses custom LOCAL_MODULE_PATH.
With this change we defer the evaluation of the dependency to after all
Android.mks are loaded and all modules have their installed path
determined.

Change-Id: Ib6628ed44154a90e8668d31691fbbac67125be6c
2011-09-15 14:05:49 -07:00
Ying Wang
d9020c2e9a Add ABI specific include path for NDK.
Change-Id: I37a935126b9a1e544fc5a7471cf6ca224fc89cf3
2011-09-07 14:31:47 -07:00
Ying Wang
a7d9ca371e Use the LOCAL_* as dependency.
PRIVATE_* should be used only in the build commands.

Change-Id: Ie1d8db7c78012a8615b893d3ef3be893da7466f4
2011-07-13 14:29:33 -07:00
Jeff Brown
e33ba4c49e Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: Ie814f4c8d3aa1e7cc7f5735822ab25542f36cf62
2011-07-11 23:51:37 -07:00
Doug Kwan
e3c3c6d4fe Allow per module RTTI setting. This fixes a bug in previous check-ins.
Change-Id: I5fcac192a7945720fd7667f7497078d310370bc5
2011-06-07 10:55:48 -07:00
Doug Kwan
9a8ecf970b Allow enabling RTTI in a module.
Change-Id: Ie8ce920e3ccb7e53bdf917d8ac5a386df3e7836a
2011-05-10 21:50:58 -07:00
Ying Wang
fcdabd4bdb Add LOCAL_GROUP_STATIC_LIBRARIES
Set LOCAL_GROUP_STATIC_LIBRARIES := true to group the static libraries,
in case we need gcc flags "-Wl,--start-group" and "-Wl,--end-group" to
fix circular references.

Change-Id: I03c4901670112fcdd2bb0fe660b6924e5776fcf8
2011-04-25 14:22:41 -07:00
Ying Wang
cce4c973e4 Support stl variants when LOCAL_NDK_VERSION is set.
LOCAL_NDK_STL_VARIANT can be set to system, stlport_static, stlport_shared
or gnustl_static. It defaults to system.

Change-Id: I2840d30ff732a00bc0ea70eab8a8179aea0abbdf
2011-03-04 10:48:28 -08:00
Ying Wang
2f76c6d11b Add stl include path if LOCAL_NDK_VERSION is set
Since NDKr5 the stl headers reside in a separate directory.

Change-Id: I98f37b593560a1a2a55418f8ba413ca842ed37ef
2011-02-23 10:07:03 -08:00
David 'Digit' Turner
d6b413a904 am 3be47af9: am b3f59bde: am 86a90364: Merge "core/binary.mk: Add missing Objective-C objects to the build."
* commit '3be47af9491b7fd93b74122cb7f979f2b86c1634':
  core/binary.mk: Add missing Objective-C objects to the build.
2011-02-15 11:03:57 -08:00
David 'Digit' Turner
5ca286d58b core/binary.mk: Add missing Objective-C objects to the build.
For some reason, all_objects was not listing objects generated from
objective-C sources. We need these for the emulator (which builds its
own version of SDL which uses Quartz on OS X).

+ Fix a typo in transform-host-m-to-o definition.

This also explains why https://review.source.android.com/#change,21074
had to be reverted, since it gets rid of the prebuilt SDL libraries when
building the emulator.

Change-Id: I173811cf11cdb5b045073aade59364236145bc77
2011-02-11 17:52:52 +01:00
Jeff Brown
703e7c6d50 Build system tweaks for Valgrind.
Added LOCAL_NO_CRT to enable building executables that do not link
to the C runtime library.

Removed support for LOCAL_MODULE_SUBDIR since it was broken
and unused.  (Was going to use it but ended up using LOCAL_MODULE_PATH
instead.)

Change-Id: I3b6f5ab7e5ae6aaa7119899adccece2b4ab1cbb3
2011-02-08 16:38:56 -08:00
Jean-Baptiste Queru
c61d4c91b6 Extra protobuf-related support
Change-Id: I375d32f0bcb695ccb0603743133034941d584163
2011-01-27 13:49:30 -08:00
Jean-Baptiste Queru
79ee7bf896 Protobuf compiler support in the build system 2011-01-27 12:44:30 -08:00
Ying Wang
33c0d952fc Allow module-specific protoc flags.
You can add local protoc flags via LOCAL_PROTOC_FLAGS.

Change-Id: If246a4edafe1edcec6a7f193bde8ce3c83de745b
2010-11-05 11:30:58 -07:00
Ying Wang
a5fc87a937 Integrate protocol buffer compiler into the build system.
Bug: 3152546
Change-Id: Ida3ca3d633ce45704dc8e80d044cdbd3ca69aca5
2010-11-02 19:25:47 -07:00
Jean-Baptiste Queru
5a98ec046c resolved conflicts for merge of 54ddcc27 to gingerbread-plus-aosp
Change-Id: I336f9e6859dce3bb18224b3340837474319c809c
2010-10-19 15:19:45 -07:00
Jim Huang
20d1ba602b Explicitly declare assembly only __ASSEMBLY__ macro for assembly source
To isolate the assembly-only macros in header files, such as
<machine/cpu-features.h>, this patch attempts to declare assembly
only __ASSEMBLY__ macro in build system.

Change-Id: I081c3e46258a9256b20995e4d0b473c64745444c
2010-10-14 16:17:31 +08:00
Ying Wang
bbbed9e1f1 am 02c9813a: Prebuilt NDKs are merged for linux and darwin.
Merge commit '02c9813a726803e1c406b19f6b9dc4e411326e66' into gingerbread-plus-aosp

* commit '02c9813a726803e1c406b19f6b9dc4e411326e66':
  Prebuilt NDKs are merged for linux and darwin.
2010-09-23 18:05:38 -07:00
Ying Wang
02c9813a72 Prebuilt NDKs are merged for linux and darwin.
Change-Id: I0b632d7ba4df5b27dda36280b22dfd0b37e116b7
2010-09-23 17:59:36 -07:00
Ying Wang
3986feae32 am ef5bf469: am bce4b75f: Add JNI_H_INCLUDE as default header search path
Merge commit 'ef5bf469fab7166373b10db6c88e6c3cf0e64217' into gingerbread-plus-aosp

* commit 'ef5bf469fab7166373b10db6c88e6c3cf0e64217':
  Add JNI_H_INCLUDE as default header search path
2010-07-22 17:52:01 -07:00