Commit graph

517 commits

Author SHA1 Message Date
Ying Wang
97dfa3177d Revert "Don't extract jni from prebuilt apks."
This reverts commit 3797466fbd.

Bug: 20810492
Bug: 20811499
Change-Id: Ic922d9daccc4550db489c0f3d4ad6b4ff85b5e60
2015-05-04 18:39:46 +00:00
Ying Wang
3797466fbd Don't extract jni from prebuilt apks.
- We don't need LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES now, for we always
  page-align jni shared libraries and store them umcompressed.
- For prebuilt apks, we don't extract jni any more; Instead we always run
  uncompress-shared-libs on them.
- For apks built from source, we still install the jni separately, because
  that way multiple apks can share the same jni and it saves space.

With this change, for most prebuilt apks, we don't need to specify
LOCAL_PREBUILT_JNI_LIBS ("@lib/<abi>/foo.so") any more, for the build
system automatically replaces the embedded jni with uncompressed files;
But if a prebuilt is a fat apk (i.e. containing jni not needed by the
current product architecture), you still need LOCAL_PREBUILT_JNI_LIBS to
specify what jni to keep. Otherwise all embedded jni will be replaced with
uncompressed files, that wastes space.

Bug: 8076853
Change-Id: Icf07e0998ac3602e6e05e80fed836fbafca33e01
2015-05-01 16:09:58 -07:00
Dmitriy Ivanov
be55caf288 am 6f2935dc: am dabf96ab: am c84b3a78: am 648f1b66: Merge "Pack relocation tables for dynamic executables"
* commit '6f2935dc1432a38e149498b6efbd43ed9aceb827':
  Pack relocation tables for dynamic executables
2015-04-23 23:16:36 +00:00
Dmitriy Ivanov
4c2d1a64fb Pack relocation tables for dynamic executables
Add replocation-packer step for dynmic executables.

  Enable it by default for arm and arm64 platforms.

Bug: http://b/18051137
Change-Id: I0c88fd31595bcea62a087f219acb9ecf9c80f2e5
2015-04-23 12:07:16 -07:00
Dimitry Ivanov
bc83d0bb68 am 893ed24d: am 387a9fee: am 941d61de: am 1ff47c7f: Merge "Revert "Pack relocation tables for all dynamic executables""
* commit '893ed24dd7cec9b560fe46862b3635efa327ec65':
  Revert "Pack relocation tables for all dynamic executables"
2015-04-23 05:07:11 +00:00
Dimitry Ivanov
1eca10fa9d Revert "Pack relocation tables for all dynamic executables"
This reverts commit e7a1b8a0c6.

Change-Id: I1a2185e1c68d364941e3b3e525a8c4a7a42e0cc1
2015-04-23 04:22:33 +00:00
Dmitriy Ivanov
943381b7df am ff084258: am b7b27621: am 64119a7f: am ec6a9773: Merge "Pack relocation tables for all dynamic executables"
* commit 'ff084258ea53c414d724ba87f89c324056def1bd':
  Pack relocation tables for all dynamic executables
2015-04-23 03:42:44 +00:00
Dmitriy Ivanov
e7a1b8a0c6 Pack relocation tables for all dynamic executables
Bug: http://b/18051137
Change-Id: I277277d5f5eb450ef9b4a23cfec16d75d977eb89
2015-04-22 13:30:43 -07:00
Nick Kralevich
e128152c4c am ebe3f7a5: am 700265ce: am 69b20474: Merge "Support LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES for prebuilt APKs"
* commit 'ebe3f7a59878d797f8f0de234f251958fee1c5af':
  Support LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES for prebuilt APKs
2015-04-18 01:33:09 +00:00
Nick Kralevich
5aa0223c6a Support LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES for prebuilt APKs
If a prebuilt APK contains shared libraries and the flag
LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES := true is set, then
uncompress any shared libraries stored within the APK.
This allows processes to load the shared library directly from
the APK.

Bug: 20247329
Bug: 8076853
Bug: 1162500
Change-Id: Iac4db32457d9ce31eb7256410023819b44fda0a6
2015-04-17 16:53:15 -07:00
Dmitriy Ivanov
cc39abfdd2 am a6c44859: am bc671bc6: am e3aa1c1f: Merge "Remove LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS"
* commit 'a6c44859c5344d489526641ce5a08598254da57b':
  Remove LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS
2015-04-17 19:42:55 +00:00
Dmitriy Ivanov
8f9487431c Remove LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS
Use LOCAL_PAGE_ALIGN_JNI_SHARED_LIBRARIES instead.

Change-Id: Id30529fbc1652d066e0008813352848b5e404ab9
2015-04-17 11:39:04 -07:00
Ying Wang
aaf9a5b0cc Remove ancient ranlib workaround on Mac OS X.
Apparently we don't need it for Mac OS X 10.7 and above.

Change-Id: I5ee81700c16e8c66b2d5f2b373fd2d523b5ec018
2015-04-09 10:06:33 -07:00
Ying Wang
4972d195dd Remove ancient ranlib workaround on Mac OS X.
Apparently we don't need it for Mac OS X 10.7 and above.

Change-Id: I5ee81700c16e8c66b2d5f2b373fd2d523b5ec018
2015-04-09 09:45:39 -07:00
Ying Wang
d9509e970c resolved conflicts for merge of 133415d5 to master
Change-Id: Iba6c1dd40e7a4c8058e7100f03296c8f72a2c949
2015-04-08 18:08:46 -07:00
Ying Wang
c45a47b5f3 Better way to package up the otatools-package.
With this, you can easily add more executables, jars or shared libraries
to the package. Also now it automatically takes care of
32-bit-v.s.-64-bit library issue.

Change-Id: I5afe00fadc978d0da229b192eca1a4b1c149764e
2015-04-08 12:40:37 -07:00
Ying Wang
faeb693174 Consolidate the nanopb-c and regular protobuf build rules.
Bug: 20093047
Change-Id: I38ebd748aacce6d215403da481ad04833810a995
2015-04-07 12:49:50 -07:00
Ying Wang
11e923a0e5 am ea517854: am aacc8bb4: am 18ecae31: Merge "Convert bc depfiles to .P files."
* commit 'ea5178545bf939fb65f77cd54eba9f274512638b':
  Convert bc depfiles to .P files.
2015-04-04 01:49:47 +00:00
Ying Wang
b931956076 Convert bc depfiles to .P files.
So you don't need clean step when a header file gets moved or deleted.

Change-Id: Iec0d63b89ba17c4ef0ad75f4a52b6759f2bff58a
2015-04-03 16:55:09 -07:00
Ying Wang
b70c42079a am 5c11bd52: am 20fa9a8e: am 62003acd: Merge "Use PRIVATE_ALL_OBJECTS"
* commit '5c11bd52db5d0887196895f321bf723ca1d206c7':
  Use PRIVATE_ALL_OBJECTS
2015-04-03 14:52:55 +00:00
Ying Wang
854607ec49 Use PRIVATE_ALL_OBJECTS
Instead of the dirty $(filter) call.

Change-Id: Idd3c9be570a00dc365a08e5b4ba1cb2e1f0ce005
2015-04-02 18:02:33 -07:00
Dan Albert
57d71306a5 am 8f7338d9: am dc8d7092: am 0064c51e: Merge "Use prebuilt libclang_rt.profile."
* commit '8f7338d9b145379ea9c51b7e551509a2d8f0f24e':
  Use prebuilt libclang_rt.profile.
2015-04-02 18:49:26 +00:00
Etan Cohen
c74a3b4cae Merge "Merge commit '597cfdb' into merge" 2015-04-02 03:11:00 +00:00
Dan Albert
343ed674e3 Use prebuilt libclang_rt.profile.
Bug: 17574078
Change-Id: I4838cd5d125a0b2bf76aad2fdaef1ee3122687e8
2015-04-01 19:03:22 -07:00
Dan Albert
7d1c9d312d am 8985a409: am 0ea16fcc: am 60335c03: Merge "Revert "Revert "Fix the libgcc/libatomic link order."""
* commit '8985a409b75e23dcadd0cb743a344876a95eb5d8':
  Revert "Revert "Fix the libgcc/libatomic link order.""
2015-04-01 17:27:32 +00:00
Dan Albert
91f713a168 Revert "Revert "Fix the libgcc/libatomic link order.""
This reverts commit e440c3c07b.
2015-03-31 16:42:52 -07:00
Etan Cohen
5c92a46ea3 Merge commit '597cfdb' into merge
Change-Id: I4df718345626439ece9fdad242cccea7d6930819
2015-03-30 16:42:42 -07:00
Ying Wang
c1729f3602 Strip prebuilt shared library by default.
Strip prebuilt shared library but not try adding gnu debuglink.
It would fail if you try run the adding gnu debuglink command if a
prebuilt is already stripped.

Bug: 17177288
Change-Id: If5811865715c2437e45fbd329983ef1212ef0109
(cherry picked from commit bfb52a2ec1)
2015-03-13 11:36:15 -07:00
Ying Wang
08b32584f4 am 4e32ac83: am dedff62c: Merge "Contain obj of ../ source files in their intermediate dir."
* commit '4e32ac834299da0c5892e9fb15777ca2cd335492':
  Contain obj of ../ source files in their intermediate dir.
2015-03-13 02:59:09 +00:00
Ying Wang
25c894bf70 am ec447f36: am 168357ae: Merge "Support .asm being compiled by yasm targeted for x86_64."
* commit 'ec447f368a0622781a0b6f95d422d30f480a24b5':
  Support .asm being compiled by yasm targeted for x86_64.
2015-03-12 15:35:53 +00:00
Wink Saville
597cfdb9db Add support for PB_ENABLE_MALLOC in nanopb-c
There will be two version of the the nanopb-c library,
libnanopb-c-2.8.0 which doesn't support automatic malloc
and libnanopb-c-2.8.0-enable_malloc which does.

There will be two version of the the nanopb-c library,
libnanopb-c-2.8.0 which doesn't support automatic malloc
and libnanopb-c-2.8.0-enable_malloc which does.

Set LOCAL_PROTO_OPTIMIZE_TYPE=nanopb-c which doesn't support
malloc and set it to nanopb-c-enable_malloc which does.

For client code details see nanopb-api:
  http://koti.kapsi.fi/jpa/nanopb/docs/reference.html

Change-Id: If238412463aabb5e1d556dfc9c464bcaf9e3333a
2015-03-11 23:59:50 +00:00
Wink Saville
042d4dc4a1 nanopb-c
Change-Id: I584d0a1e228338ea4ec3e5e2875d1ed329bc37f2
2015-03-11 22:00:09 +00:00
Ying Wang
dedff62c8e Merge "Contain obj of ../ source files in their intermediate dir." 2015-03-11 20:43:41 +00:00
Ying Wang
fb22a42d4f Contain obj of ../ source files in their intermediate dir.
Previously when a file in LOCAL_SRC_FILES starts with "../", the object
file may escape out of the module's intermediate directory, because we
insert the source file's path (but not with LOCAL_PATH) to the object
file's path. Even worse when two object files escape to the same destination
and cause conflict.
This change fixes the issue by removing the "../" inside the object
files' paths. To do that, we have to set up the compilation rules for
those files one by one, instead of using the one-for-all static
pattern rules.

Bug: 19641115
Change-Id: I19f3c48ece3244fa14acb2caa609deea710840d3
2015-03-10 19:05:15 -07:00
Ying Wang
fe1e5c3453 Support .asm being compiled by yasm targeted for x86_64.
Change-Id: Ia6425c38dd2f7ad2dc697213cd61b7515b9e7aff
2015-03-09 18:57:40 -07:00
Yohann Roussel
0d70cc4a72 Merge "Allow to pass arguments to Jill" 2015-03-06 10:05:54 +00:00
Ying Wang
690227763c am 8ed194d3: am a7c669f2: am 71c64dc1: Merge "Reorder lib paths in transform-bc-to-so to avoid build race condition."
* commit '8ed194d30a5e635c3de9e0545215e6cda9bb19d3':
  Reorder lib paths in transform-bc-to-so to avoid build race condition.
2015-03-05 20:18:19 +00:00
Ying Wang
bfc436969d Reorder lib paths in transform-bc-to-so to avoid build race condition.
We should put the NDK library path before
$(TARGET_OUT_INTERMEDIATE_LIBRARIES), so that we link against the NDK
libc/libm, instead of the platform libc/libm in
$(TARGET_OUT_INTERMEDIATE_LIBRARIES), which may still being written out,
because we don't have dependency on them.

Bug: 19613709
Change-Id: I26a8b272e38b7436bca3324246b21cd71349662b
2015-03-05 11:29:30 -08:00
Yohann Roussel
801f2c44d0 Allow to pass arguments to Jill
Bug: 19026410
Change-Id: I3f3d7c0e7f8d6cc7150ae560b8734093798e8299
2015-03-05 14:54:06 +01:00
Ying Wang
0e36bfeb3f Use ALL_MODULES.$(m).INSTALLED in modules-for-tag-list
Previously we store tag's installed modules in a separate variable
ALL_MODULE_TAGS.$(tag). However we only record the main installed file
for a module, but omit affiliated files like .odex.
With this change, we handle the tagged module the same way as modules in
PRODUCT_PACKAGES.

Change-Id: I7972528a4df5a4ba8bc98930864da9672d32d7fe
2015-02-26 14:12:25 -08:00
Ying Wang
c894e099d3 resolved conflicts for merge of 641e283f to master
Change-Id: I9c5d9dd9f0f8c9206112f4c2f773ed81c9c2f06f
2015-02-26 10:34:33 -08:00
Ying Wang
dcd90831e5 Use a less freqent dummy file name: zipdummy
Previously if user has a directory with name dummy in the root of the
source tree, "zip -qd package.apk dummy" fails with:
"zip error: Nothing to do!".
This change mitigates the error.

Change-Id: I642e3bf0378e5b9911a068ecb72f795b3e92f1fe
2015-02-26 09:36:27 -08:00
Narayan Kamath
7a9e388405 am 738871f6: am e886392c: am 37a44faa: Merge "Store native libs aligned to PAGE_SIZE"
* commit '738871f6eb3c372b60928e761f0dc24e46a6bba5':
  Store native libs aligned to PAGE_SIZE
2015-02-26 12:58:11 +00:00
Dmitriy Ivanov
13e5965306 Store native libs aligned to PAGE_SIZE
- Add a new flag to zipalign (-p) that page aligns shared
  libraries (zip entries ending with ".so") in the archive.

- Add a new build variable LOCAL_PAGE_ALIGN_SHARED_LIBRARIES
  to turn on this behaviour in zipalign.

- Add a new LOCAL_JNI_SHARED_LIBRARIES_ZIP_OPTIONS to control
  zip behaviour.

Bug: 8076853
Bug: 19330157

Co-Authored-By: Simon Baldwin <simonb@google.com>
Co-Authored-By: Dimitry Ivanov <dimitry@google.com>
Change-Id: I1aa2c039bb2a590ae72f256acc9ba5401c2c59b1
2015-02-26 12:31:40 +00:00
Dan Albert
b4cca80999 am 9ddc52c1: am 13baa319: am 876f45e7: Merge "Make some warnings impossible to override."
* commit '9ddc52c1e4d2111346b865e72019b98cb9562d57':
  Make some warnings impossible to override.
2015-02-25 23:32:47 +00:00
Dan Albert
0c91fa84ff Make some warnings impossible to override.
These CFLAGS and CPPFLAGS will always be added last, and are
controlled by the build system. This way we can add warnings that
users are not allowed to disable.

Change-Id: Id71f69249078f62ca2687ecbf764aff0fd3a1c1b
2015-02-23 10:05:51 -08:00
Yohann Roussel
37822c443d Engage Jack incremental on demand
Each module may engage Jack incremental with

LOCAL_JACK_ENABLED := incremental

Include renaming of LOCAL_USE_JACK to LOCAL_JACK_ENABLED that is
now accepting 3 values "disabled", "full" and "incremental".

Change-Id: Icbff275b397bee36b29312e821f3e8d45f83fbcc
2015-02-04 11:22:26 +01:00
Yohann Roussel
2809666941 Simplify handling of ANDROID_JACK_* variables
This concerns ANDROID_JACK_VM, ANDROID_JACK_VM_ARGS and
ANDROID_JACK_EXTRA_ARGS.

Change-Id: Iba75ecaaceb09ac9607a3aee41324d9f5ae4beef
2015-02-03 12:37:09 +01:00
Ying Wang
723db51fdb am 7c05897b: am e937ac81: Merge "Add new build flag LOCAL_DONT_DELETE_JAR_DIRS."
* commit '7c05897b69801e1945889a9b1a89b86bbbbbdd3a':
  Add new build flag LOCAL_DONT_DELETE_JAR_DIRS.
2015-01-29 18:38:00 +00:00
Fredrik Roubert
cc93f0c87c Add new build flag LOCAL_DONT_DELETE_JAR_DIRS.
Normally the build function initialize-package-file will delete all
class files and all directory entries from JAR files, but sometimes
external projects (eg. ICU4J) depend on having directory entries in
their JAR files.

This change adds the flag LOCAL_DONT_DELETE_JAR_DIRS (analogous to the
flag LOCAL_DONT_DELETE_JAR_META_INF) which when set will skip deletion
of directory entries in initialize-package-file.

Change-Id: I4464b947b7528fca23925affa95e4071915f04d4
2015-01-29 17:44:27 +00:00