Commit graph

701 commits

Author SHA1 Message Date
Ying Wang
8b4d143239 am cd7dfdb4: Merge "Cleanups."
* commit 'cd7dfdb4bf3f7d431d2a37908c550a83a282bf22':
  Cleanups.
2015-07-21 23:57:42 +00:00
Ying Wang
bbd4755647 Cleanups.
- Deleted unused functions in definitions.mk.
- lint is never fully functional in the platform source tree.
- Retire LOCAL_DIST_BUNDLED_BINARIES: now the build system/framework
  supports JNI embedded in apk.

Change-Id: I6314cb20d1544c704ccbc4c1f9cccb9c54fb5a51
2015-07-21 16:03:19 -07:00
Colin Cross
8c25fd565a am 1d0f6eb1: Merge "Read BUILD_NUMBER from file in rules"
* commit '1d0f6eb115e4fd0093bd3d026264e579689a57c3':
  Read BUILD_NUMBER from file in rules
2015-07-21 19:31:47 +00:00
Colin Cross
f37b455858 Read BUILD_NUMBER from file in rules
Using $(BUILD_NUMBER) inside a rule causes odd behavior, as the rule
is different every time make is run, but since make doesn't depend
on the command line it only ends up being built with the new value
if some other dependency has changed.

To allow ninja, which does depend on the command line, to provide the
same behavior, store the build number in out/build_number.txt, and
use a shell expansion to cat the file in rules that use it.  This will
cause the rule command to stay identical between builds, while still
getting the new build number if the rule is rerun for a dependency.

Also use the same trick for BUILD_FINGERPRINT, and the date in
droiddoc rules.

Change-Id: I6c5e6b6b3ef4c613563d7f5604df0e401575ba5f
2015-07-18 12:15:04 -07:00
Colin Cross
af7abc38fc am 0f0a6b62: am 03e74d66: Merge "Move @echo to first command in rules"
* commit '0f0a6b62bf9e06f980d86fbd6afeaad33fef03e5':
  Move @echo to first command in rules
2015-07-17 23:23:01 +00:00
Colin Cross
0f0a6b62bf am 03e74d66: Merge "Move @echo to first command in rules"
* commit '03e74d66c73558b517a56be75acc9a391c676ba8':
  Move @echo to first command in rules
2015-07-17 23:12:41 +00:00
Colin Cross
b6da589f60 Move @echo to first command in rules
Move the @echo command that prints the rule description to be the
first command in each rule so that the kati tool can find it to
use as a ninja rule description.

Change-Id: I90f27c35bb719d327a7f2109f8d00d3589082f19
2015-07-16 17:14:27 -07:00
Ying Wang
c2231e70e3 am e8ecab8d: Merge "Don\'t uncompress/page-align the jni libraries in apps_only build." into mnc-dev
* commit 'e8ecab8d099f465d527f7bc0fbd04f26ac477a93':
  Don't uncompress/page-align the jni libraries in apps_only build.
2015-07-16 19:04:49 +00:00
Ying Wang
1f8964d388 Don't uncompress/page-align the jni libraries in apps_only build.
Don't uncompress/page-align the jni libraries in apps_only build,
because the apk may be run on older platforms that don't support loading
jni directly from apk.
When prebuilt apks are installed to platform build, the build system
will automatically uncompress/page-align the prebuit apks in M and
downstream, so no need to uncompress/page-align in the apps_only build
either.

Bug: 22491084
Change-Id: I67e977b2592800ae467450592069843b4e5fc466
2015-07-15 18:34:20 -07:00
Evgenii Stepanov
436a2fb9e3 am 275e3c8c: am 2d0ec893: Merge "Use a different linker for ASan binaries."
* commit '275e3c8c105e5702b25868f80983c82c668e5664':
  Use a different linker for ASan binaries.
2015-07-15 21:27:42 +00:00
Evgenii Stepanov
275e3c8c10 am 2d0ec893: Merge "Use a different linker for ASan binaries."
* commit '2d0ec89357e29138abc28f65876e4aaa208f961c':
  Use a different linker for ASan binaries.
2015-07-15 19:43:45 +00:00
Evgenii Stepanov
8f5e67a98c Use a different linker for ASan binaries.
Another change in bionic/linker adds linker_asan/linker_asan64 that
know where to find ASan shared libraries.
Also, include linker_asan to the required packages list when building
for ASan.

Change-Id: I8ebe7c0091bbeb0c135708a891d33d9844373d37
2015-07-14 11:10:40 -07:00
Ying Wang
1f59fcb23d am 8f908ade: am 2e26f896: Merge "Simplify LOCAL_NO_CRT."
* commit '8f908ade58fd21d5bb27b7a42f8f07553c237df6':
  Simplify LOCAL_NO_CRT.
2015-07-04 02:58:23 +00:00
Ying Wang
8f908ade58 am 2e26f896: Merge "Simplify LOCAL_NO_CRT."
* commit '2e26f896a65563f750f2d459d13cc8edfa705d95':
  Simplify LOCAL_NO_CRT.
2015-07-02 23:06:54 +00:00
Ying Wang
491fca9809 Simplify LOCAL_NO_CRT.
Change-Id: If2486e4861071df6b225fe7f387530a38f554484
2015-07-02 15:58:34 -07:00
Dan Albert
8b36f7fcc7 am 2bb996f6: am 46cb2ee3: Merge "Force some clang Werrors that *will* break things."
* commit '2bb996f6a58dd4b9e682f9c59a7dad94412bdd86':
  Force some clang Werrors that *will* break things.
2015-06-13 02:25:20 +00:00
Dan Albert
2bb996f6a5 am 46cb2ee3: Merge "Force some clang Werrors that *will* break things."
* commit '46cb2ee3cb120a1c03241e9e2aa66d76c890c486':
  Force some clang Werrors that *will* break things.
2015-06-12 19:59:13 +00:00
C. Sean Young
6f44670ada am cbaead4c: am 540772fa: am cf469989: Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
* commit 'cbaead4cfe737c96c649672b6c1396c35597b5b7':
  Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
2015-06-12 17:43:46 +00:00
C. Sean Young
cbaead4cfe am 540772fa: am cf469989: Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
* commit '540772fa2287e63a0c745229fb72b78903c9cd70':
  Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
2015-06-12 16:29:25 +00:00
Dan Albert
d160041149 Force some clang Werrors that *will* break things.
Clang is really aggressive at optimizing a handful of cases (read:
clang will ruin your day some if you write bad code). Fortunately, it
also emits a warning when it's about to do this.

To prevent anyone from suffering from these optimizations, make these
warnings errors and make them impossible to disable.

Change-Id: I5e10bb0fc2ca23190017da716b3b84635577a0bd
2015-06-10 17:24:38 -07:00
Adrian Roos
6784cae413 Switch build to stricter aapt symbol generation
Prevents aapt from generating java symbols for strings that don't have
a default localization.

Bug: 21537397
Change-Id: I2f17397e33d823045f7dcff02e3d0817f3f81849
2015-06-10 20:00:13 +00:00
C. Sean Young
cf4699895a Add new variable SCAN_EXCLUDE_DIRS; specifies directories to exclude when searching source tree.
These directories are excluded in addition to OUT_DIR.
This can be useful if your build system has other output directories
beyond what OUT_DIR is set to.

Change-Id: I6d98a85bcc8c89279e939406a7fec32547e8922f
2015-06-10 13:00:13 -05:00
Dimitry Ivanov
72bced8a75 Merge changes from topic 'prebuilt-open-from-apk' into mnc-dev
* changes:
  Uncompress .so files before signing the apk.
  Don't extract jni from prebuilt apks.
2015-06-04 18:33:00 +00:00
Yohann Roussel
b518c3ec0b [DO NOT MERGE] Add support for RMTYPEDEF with Jack
Bug: 21099584

(cherry-picked from commit 5b2c6e26db)

Change-Id: I39aa1f24780c216e978ef743098ca7ac65b2962e
2015-06-02 12:25:51 +02:00
Yohann Roussel
a9dd74c395 Merge "Add support for RMTYPEDEF with Jack" into mnc-dev 2015-06-02 09:36:27 +00:00
Ying Wang
1fb0152ff7 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: Ic3666dc72bf17cd293787414dd185470b365f967
2015-06-01 19:19:45 -07:00
Ying Wang
9cc3b7572c am 91c2f705: Merge "Add /lib[64] to host binary\'s rpath."
* commit '91c2f7053d131cb9449eccfda97ec80130dbf451':
  Add $ORIGIN/lib[64] to host binary's rpath.
2015-06-01 18:37:12 +00:00
Ying Wang
30127bfdad Add $ORIGIN/lib[64] to host binary's rpath.
Normally the binaries use the exsiting $ORIGIN/../lib[64] with binaries
in the bin subdirectory;
For historical reason the binaries in the SDK package don't have a bin
subdirectory. This workaround enables them to work in the existing SDK
directory structure.

Bug: 21301578
Change-Id: Ibebfbfb8b30e81e7bbaf13a21bb205f3f0282d24
(cherry-pick from commit 4fe7bfd373)
2015-06-01 11:28:02 -07:00
Ying Wang
4fe7bfd373 Add $ORIGIN/lib[64] to host binary's rpath.
Normally the binaries use the exsiting $ORIGIN/../lib[64] with binaries
in the bin subdirectory;
For historical reason the binaries in the SDK package don't have a bin
subdirectory. This workaround enables them to work in the exsiting SDK
directory structure.

Bug: 21301578
Change-Id: Ibebfbfb8b30e81e7bbaf13a21bb205f3f0282d24
2015-06-01 10:43:29 -07:00
Yohann Roussel
5b2c6e26db Add support for RMTYPEDEF with Jack
Bug: 21099584
Change-Id: I39aa1f24780c216e978ef743098ca7ac65b2962e
2015-05-28 18:10:03 +02:00
Yohann Roussel
f09e59eb52 [DO NOT MERGE] Compile using Jack.
This allows to compile dex targeted java sources using Jack and Jill.
Default is still to compile with the legacy toolchain. Default can be
switched to the new toolchain by setting environement variable:
export ANDROID_COMPILE_WITH_JACK=true
Toolchain can also be forced for one module by defining
LOCAL_JACK_ENABLED:=full # disabled, full, incremental
in the mk portion defining the module.

Jack execution environement can be controlled with:

Global variable ANDROID_JACK_VM allow to change the jvm executing Jack.
Global variable ANDROID_JACK_VM_ARGS allows to change default args given
to the jvm.
Global variable ANDROID_JACK_EXTRA_ARGS allows to define some default args
to give to Jack

LOCAL_JACK_VM_ARGS allows to override default args given to the jvm for
the module.
LOCAL_JACK_EXTRA_ARGS allows to override default args passed to Jack.

This includes cherry-picks of the following changes:
b4c49cba57
22c3fa6d73
138768c1bb
5dd3e1d312
83d5d04047
8bc90fd2d6
140274707e
0fbc9ff2a2
833b427d72
f9a27f45b4
2809666941
37822c443d
c6b44d43c3
d2a76c14bf
06744f60fc
95573d5036
b821391614
2794e7b582
801f2c44d0
c76d99dca1
f528e132d6
76a5e0bd1a
e25b3984ff Partially, only Jack related parts werekept
ec46a3b71f
abee3a9f41
77cbe10fd9
daf07db4cd
b6bfb5893a

Ie all Jack related changes untill
b6bfb5893a
except
a96cc59ab5 "Use Jack by default"

Change-Id: If9d47ef1c4fd1e6765ad2a47d816c1ad3cfab0e3
2015-05-19 18:31:05 +02:00
Ying Wang
90598cb70c Cleaned the outdated incrementaljavac.
Nobody is using this feature and now we switched to jack.

Change-Id: I749b486eb347cbf3ee7b107565fc800eeb238c44
2015-05-08 13:27:25 -07:00
Ying Wang
884738e4a6 Revert "Fix and cleanup."
This reverts commit f28bad5227.

Change-Id: Ib64936457a1236fabbe7c6b9c56f52ef650342e7
2015-05-08 18:51:00 +00:00
Ying Wang
f28bad5227 Fix and cleanup.
- Detect java-source-list before transforming to java-source-list-uniq.
  This fixes non-fatal errors in build log like:
  /bin/bash:
  out/target/common/obj/APPS/android.core.tests.libcore.package.tzdata_intermediates/classes/java-source-list:
  No such file or directory
- Cleaned the outdated incrementaljavac. Nobody is using this feature
  and now we switched to jack.

Change-Id: If1adb9b5820d9b295a11984c0f170f9a7ff4de7b
2015-05-07 16:53:13 -07:00
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
Ying Wang
40423825da am 21f78782: am 1b140e16: Merge "Build hostdex on only Linux."
* commit '21f78782d5e59a58e664e9ae52f537cee314f407':
  Build hostdex on only Linux.
  Fix comma in $(if ...).
2015-01-26 19:17:34 +00:00
Dan Albert
cfc95cf435 Merge "Fix comma in $(if ...)." 2015-01-25 22:30:19 +00:00
Logan Chien
e481e7d494 Fix comma in $(if ...).
Change-Id: I2f9fba5b5c0384ef12ee9e5f48fa01102436a425
2015-01-25 21:15:12 +08:00
Dan Albert
b89760a76b am 3723af1b: am 9ba25d6b: Merge "Enable host coverage."
* commit '3723af1b4e8de4941d7b9be569f209d88f565964':
  Enable host coverage.
2015-01-24 23:48:46 +00:00
Dan Albert
9ba25d6bfd Merge "Enable host coverage." 2015-01-24 23:32:16 +00:00
Dan Albert
43e128acfc Enable host coverage.
Don't remember why I didn't enable this for the host when I made the
first pass, but it works just fine.

Change-Id: I0892c0bc353bf8b60b432ba9f69f97281177d41d
2015-01-24 13:24:19 -08:00
Chih-Hung Hsieh
afa30df68e am 6698ba3d: am 840bc269: Merge "Add -static to static link command, for clang."
* commit '6698ba3d6c9efebac63c224a1fb985f0a53a501a':
  Add -static to static link command, for clang.
2015-01-24 16:58:15 +00:00
Chih-Hung Hsieh
69b1fe6d1c Add -static to static link command, for clang.
Clang driver needs -static flag, not -Bstatic,
to produce statically linked modules.
However, -static is not added if LDFLAGS contains -shared,
which is used in bionic/linker to create a shared object with static libraries.

BUG: 18008984

Change-Id: I75c3e24973ee77170285ec4c8e7aacc345722685
2015-01-23 13:02:43 -08:00
Ying Wang
833b427d72 Explicit dependency on hostdex classes.jar.
Previously for hostdex Java libraries, we set up dependency on only
javalib.jar, which in turn is dependent on classes.jar.
But when jack is enabled there is no dependency of javalib.jar on
classes.jar. In commit b4c49cba57 classes.jar was universally added to
all host java library dependencies. That's unnecessary.

This change adds explicit dependency on classes.jar only for hostdex
modules.

On the other hand, if we switch checked module to $(full_classes_jack),
like what we did in commit 8bc90fd2d6, we won't need this to fix jack
build either, because classes.jar isn't needed when you run checkbuild.

Change-Id: I92c0e4d621d266f6e6914ab2b4f20e5531af070f
2015-01-21 17:30:21 -08:00
Ying Wang
07acdbfd32 Running jarjar on Java resources.
Before this change, Java resources are added as a separate step
(add-java-resources-to-package) after dex is run, so jarjar isn't run on
the resource files.
With this change, we add Java resources immediately after we call javac,
so jarjar is run on the resource files (the module's own resource, as
well as resources carried by static Java libraries).
When we generate the final apk/jar, we use the jarjar'ed jar as the
inital pacakge file, with class files and empty folders removed.

(cherry-picked from commit 140274707e)

Bug: 18837479
Change-Id: I15ecf282bfb65fd53dd03fbd03dd4c71927c186a
2015-01-21 11:57:52 -08:00
Ying Wang
33360dd569 Running jarjar on Java resources.
Before this change, Java resources are added as a separate step
(add-java-resources-to-package) after dex is run, so jarjar isn't run on
the resource files.
With this change, we add Java resources immediately after we call javac,
so jarjar is run on the resource files (the module's own resource, as
well as resources carried by static Java libraries).
When we generate the final apk/jar, we use the jarjar'ed jar as the
inital pacakge file, with class files and empty folders removed.

When jack is enabled, in jack-java-to-dex we add the Java resources to
a temp jar using the PRIVATE_EXTRA_JAR_ARGS, and extrac the files in a
temp dir. Jack will process the resource files and output the result to
PRIVATE_JACK_INTERMEDIATES_DIR. When we package the final apk/jar, we
need to call add-carried-jack-resources to readd the resources.
(TODO: if jack can output all resources to a jar/zip file, we can use
that file as the initial package file as well.)

Bug: 18837479
Change-Id: I8d7296e30ec8d005054cf04c4f2aed6d7a0d823b
2015-01-21 11:54:13 -08:00
Narayan Kamath
c1ed9796bb Revert "Running jarjar on Java resources."
This reverts commit 140274707e.

Breaks the build on uiautomator_compat.

Change-Id: I6d14f39e3432bf5e691027bbb8e7260e4bec8e8d
2015-01-21 11:04:22 +00:00
Ying Wang
140274707e Running jarjar on Java resources.
Before this change, Java resources are added as a separate step
(add-java-resources-to-package) after dex is run, so jarjar isn't run on
the resource files.
With this change, we add Java resources immediately after we call javac,
so jarjar is run on the resource files (the module's own resource, as
well as resources carried by static Java libraries).
When we generate the final apk/jar, we use the jarjar'ed jar as the
inital pacakge file, with class files and empty folders removed.

When jack is enabled, in jack-java-to-dex we add the Java resources to
a temp jar using the PRIVATE_EXTRA_JAR_ARGS, and extrac the files in a
temp dir. Jack will process the resource files and output the result to
PRIVATE_JACK_INTERMEDIATES_DIR. When we package the final apk/jar, we
need to call add-carried-jack-resources to readd the resources.
(TODO: if jack can output all resources to a jar/zip file, we can use
that file as the initial package file as well.)

Bug: 18837479
Change-Id: I15ecf282bfb65fd53dd03fbd03dd4c71927c186a
2015-01-20 11:46:59 -08:00
Yohann Roussel
b515f27d6b Merge "Don't exlude META-INF resources when building with Jack" 2015-01-15 17:56:23 +00:00
Yohann Roussel
5dd3e1d312 Don't exlude META-INF resources when building with Jack
java-to-jack is not manipulating jar files, just zip files so there
are no META-INF files generated by jar in them and no reason to filter
them out. And mainly, there are valid META-INF resources in the tree
we must keep.

Bug: 8287658
Bug: 18901198
Change-Id: Ice0fafca686b8fa3bafd886076946fbb1f952fb6
2015-01-15 18:53:42 +01:00
Christopher Ferris
d694dbbe09 am b773a8d5: am edbd5fd7: Merge "Fix whole static lib handling of duplicate names."
* commit 'b773a8d517189a06c54d8ed789806ed42aa42be0':
  Fix whole static lib handling of duplicate names.
2015-01-13 20:30:44 +00:00
Christopher Ferris
44203f3316 Fix whole static lib handling of duplicate names.
If LOCAL_WHOLE_STATIC_LIBRARIES contains a library that has
two files that have the same name but are in different
directories, only the first gets included.

This fix detects this case, and uses the m option to ar to force the
duplicate object to the end of the archive. After this, using the p
option gets the correct object file.

Change-Id: I2e183f48cef3c79499d4ab8ff147444611ff938b
2015-01-07 18:19:54 -08:00
Yohann Roussel
22c3fa6d73 Adapt to Jack and Jill Brest release
Includes cherry-picks of:
2e78d2f4263bc7c0f90d58af7014017f16aa3ce6 Jack option --import-res was renamed --import-resource
fdc913ee86fe0c45581178b901a673fdd7937e03 Update references to Jack type collison policy
8d83d1b21ec678fb9fb1c6ee643ace46d5f700ce Rename jill tmp file
8a1c98ce4ba0b4db39f274d6258b6a08bbc3ec2c Ensure that jar-arg-list is never shared
8d83d1b21ec678fb9fb1c6ee643ace46d5f700ce Remove manipulations of jack libraries

Change-Id: I3ee159d408ba5281ac15c9836dc4fd2bdeb845d3
2014-12-10 15:41:56 +01:00
Yohann Roussel
75dbbb6e0f Merge "Compile using Jack." 2014-12-04 09:27:14 +00:00
Stephen Hines
e3d102807c am b2f55103: am 4bad2d21: Merge "Add more support for GLOBAL_CONLYFLAGS."
* commit 'b2f5510365be26e279a8d02770a9f46e57741d54':
  Add more support for GLOBAL_CONLYFLAGS.
2014-12-02 19:01:41 +00:00
Yohann Roussel
b4c49cba57 Compile using Jack.
This allows to compile dex targeted java sources using Jack and Jill.
Default is still to compile with the legacy toolchain. Default can be
switched to the new toolchain by setting environement variable:
export ANDROID_COMPILE_WITH_JACK=true
Toolchain can also be forced for one module by defining
LOCAL_USE_JACK:=true # false
in the mk portion defining the module.

Jack execution environement can be controlled with:

Global variable ANDROID_JACK_VM allow to change the jvm executing Jack.
Global variable ANDROID_JACK_VM_ARGS allows to change default args given
to the jvm.
Global variable ANDROID_JACK_EXTRA_ARGS allows to define some default args
to give to Jack

LOCAL_JACK_VM_ARGS allows to override default args given to the jvm for
the module.
LOCAL_JACK_EXTRA_ARGS allows to override default args passed to Jack.

Change-Id: Ib81a0fd5f86a51d1e0edbb81cc791d828a05dd29
2014-12-02 18:11:13 +01:00
Stephen Hines
1568029218 Add more support for GLOBAL_CONLYFLAGS.
This will be necessary to support -std=gnu99 mode for clang 3.6, which
defaults to C11 mode (unlike prior releases that use C99).

Change-Id: Iea84582f9f12ba76b988463cbc0a20bd61042538
2014-12-01 15:36:26 -08:00
Dan Albert
65f44b7df7 am 0951017a: am 9cef6823: Merge "Revert "Fix the libgcc/libatomic link order.""
* commit '0951017a9e6ea7760323e24d44ba8e75414d47f7':
  Revert "Fix the libgcc/libatomic link order."
2014-11-20 23:47:00 +00:00
Dan Albert
e440c3c07b Revert "Fix the libgcc/libatomic link order."
This caused a lot of failures in the libc++ tests, since linking
libgcc.a before libc++.so means that the wrong unwinder will be used.

This patch is still correct, but I will revert for now while I find a
good way to apply it without breaking unwinding.

This reverts commit 741b36e922.

Change-Id: I57e0b89534adf5c1677dbf2f64ac750e74bd5fbf
2014-11-20 15:10:00 -08:00
Ying Wang
84699355c8 am e55efcdd: am 471e60d6: Merge "Use ALL_MODULES..INSTALLED in modules-for-tag-list"
* commit 'e55efcdde59f9f8cfc7fb0039b427cd038559c53':
  Use ALL_MODULES.$(m).INSTALLED in modules-for-tag-list
2014-11-19 19:04:08 +00:00
Ying Wang
634f7992f0 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
2014-11-18 12:48:07 -08:00
Dan Albert
8e25667f12 am a4ad6442: am 9b0ccb74: Merge "Fix the libgcc/libatomic link order."
* commit 'a4ad6442d6a54c9eaf771a0d4ab7f7ab9de163ac':
  Fix the libgcc/libatomic link order.
2014-11-18 00:07:22 +00:00
Dan Albert
9b0ccb7480 Merge "Fix the libgcc/libatomic link order." 2014-11-17 23:55:57 +00:00
Miao Wang
11798647e4 am 439458d1: am ec64b05e: Merge "Add -Wl,--hash-style=sysv flag to rs: transform-bc-to-so for compatibility lib."
* commit '439458d1c97c846cab5cd6c09f9f5195f9587ad9':
  Add -Wl,--hash-style=sysv flag to rs: transform-bc-to-so for compatibility lib.
2014-11-17 23:07:18 +00:00
Miao Wang
e23e8080c6 Add -Wl,--hash-style=sysv flag to rs: transform-bc-to-so for compatibility lib.
Bug 18395015

Change-Id: Ib9aecf347c685c8b8b725eecfbc0cec03d9b2c1b
2014-11-15 14:25:33 -08:00
Dan Albert
cf559ed073 am 7d5fe242: am a05a04cc: Merge "Refactor transform-o-to-* definitions."
* commit '7d5fe24251846ef70f423f15bf941be35750c2e8':
  Refactor transform-o-to-* definitions.
2014-11-14 19:31:56 +00:00
Dan Albert
741b36e922 Fix the libgcc/libatomic link order.
The previous position of libgcc.a/libatomic.a on the link line causes
the linker to prefer satisfying dependencies from these libraries from
other libraries that might include them, rather than from libgcc.a (or
libatomic.a) itself. This imposes an ABI requirement that those
intermediate shared libraries _always_ export those symbols, which is
undesirable.

Change-Id: Ib593236b475d3e98356b2b1be6f96cee2b67378f
2014-11-13 21:29:28 -08:00
Dan Albert
e088c0d281 Refactor transform-o-to-* definitions.
Previously, there was one generic definition for each of the
transform-o-to-* functions in definitions.mk, and one target specific
one in each combo/TARGET_*.mk. The generic one was entirely unused,
and the target specific ones were all nearly identical.

Changing anything in these functions was tedious at best, and often
error prone. The differences between any 32-bit arch and its 64-bit
equivalent were restricted to the name of the linker, and the ARM and
MIPS definitions were identical. The few differences between ARM and
x86 looked to be compatibility for an old (ca. 2008) toolchain issue
with --gc-sections, and a bug (LDFLAGS coming first rather than
later).

To simplify things, I've moved the definitions for these out of
combo/TARGET_*.mk and back into definitions.mk. The differences
between ARM and x86 have been scrapped. Anything that really does
still need to be target specific can be handled as I have the linker:
add a TARGET_FOO variable to the given target and then add it to the
generic definition.

Change-Id: I54dc1bffc32ac39f27f0b87247dd6a6dbaf0b162
2014-11-13 16:21:46 -08:00
Ying Wang
5778600fd0 am 11186695: am b45f7c35: am 8683612f: Merge "definitions.mk: look for definitions.mk in device/*/build also"
* commit '111866953a95324b7ba342f92f14de2b7c35de24':
  definitions.mk: look for definitions.mk in device/*/build also
2014-11-05 20:16:12 +00:00
Ying Wang
b45f7c35b1 am 8683612f: Merge "definitions.mk: look for definitions.mk in device/*/build also"
* commit '8683612fbd15640ae59daf7ba7c36e1f2ff8e687':
  definitions.mk: look for definitions.mk in device/*/build also
2014-11-05 19:01:47 +00:00
Andrew Boie
388c04dd6b definitions.mk: look for definitions.mk in device/*/build also
build/core/Makefile looks for build tasks in either device/*/build/tasks
or vendor/*/build/tasks. Do the same with vendor-specific definitions.mk.

Change-Id: Ib4fd00a1d0effe8e347382a922da101ce26bf696
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2014-10-28 08:36:00 -07:00
Stephen Hines
3cbf16092a am e77cba7b: am 2094f855: am a503fb36: PIE executables created with mingw use "mainCRTStartup" as their entry point.
* commit 'e77cba7bfd518355a2bf732d0a559dbb45b594a0':
  PIE executables created with mingw use "mainCRTStartup" as their entry point.
2014-10-02 19:57:09 +00:00
Stephen Hines
e77cba7bfd am 2094f855: am a503fb36: PIE executables created with mingw use "mainCRTStartup" as their entry point.
* commit '2094f855a89277320bd9533108e443e92d2dc25b':
  PIE executables created with mingw use "mainCRTStartup" as their entry point.
2014-10-02 19:42:12 +00:00
Stephen Hines
0d07cfeaf8 am a503fb36: PIE executables created with mingw use "mainCRTStartup" as their entry point.
* commit 'a503fb362918363b28637b487eba83e9ad647ceb':
  PIE executables created with mingw use "mainCRTStartup" as their entry point.
2014-10-02 15:23:41 +00:00
Stephen Hines
a503fb3629 PIE executables created with mingw use "mainCRTStartup" as their entry point.
Bug: 14416410

Our linker uses "start" as the primary entry point, so we need to adjust this
for mingw-based Windows compiles, or nothing will execute correctly.

Change-Id: I6e99f43e075ef9f00500099ce34ec4425c996454
2014-10-02 00:57:09 -07:00
Ying Wang
c888b2d106 am 583ec9da: am e84eb7e3: am a6a6c35c: Return "none" if no matching arch found
* commit '583ec9da3e8d6d8ebf83fdba078cba2a0d24af5c':
  Return "none" if no matching arch found
2014-09-29 19:44:06 +00:00
Ying Wang
c811481734 am a6a6c35c: Return "none" if no matching arch found
* commit 'a6a6c35c3afdf9c4bcd05ea5e4c40983e7e49246':
  Return "none" if no matching arch found
2014-09-26 21:57:12 +00:00
Ying Wang
583ec9da3e am e84eb7e3: am a6a6c35c: Return "none" if no matching arch found
* commit 'e84eb7e3e1dd3d58af8ebc62e3b9e20dab9275bb':
  Return "none" if no matching arch found
2014-09-26 21:52:03 +00:00
Ying Wang
a6a6c35c3a Return "none" if no matching arch found
So result of get-prebuilt-src-arch can be passed to
LOCAL_MODULE_TARGET_ARCH, which takes empty string as "any" actually.

Change-Id: I916c9738ccce4a94ac084fb4141d54659e896a1f
2014-09-26 10:41:27 -07:00
Tim Murray
30333338ce am 3a20a171: am 965fa22d: am 039cd7e0: Merge "Add LOCAL_NO_FPIE."
* commit '3a20a171110cbdb2d92369f452a41e95a2affdd6':
  Add LOCAL_NO_FPIE.
2014-09-03 23:19:08 +00:00
Tim Murray
3a20a17111 am 965fa22d: am 039cd7e0: Merge "Add LOCAL_NO_FPIE."
* commit '965fa22d85aa1af3974c5f32e3c3325e66781f73':
  Add LOCAL_NO_FPIE.
2014-09-03 23:07:46 +00:00
Ying Wang
2fa90263b5 Merge "Strip prebuilt shared library by default." 2014-09-03 23:06:55 +00:00
Tim Murray
595d0dbd5b Add LOCAL_NO_FPIE.
Not all executables should be built with -pie.

bug 15814177

Change-Id: I402e8a531866b507ee80a0bf677f9f3551ca7693
2014-09-03 15:39:50 -07:00
Ying Wang
bfb52a2ec1 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
2014-09-03 12:11:06 -07:00
Stephen Hines
2138f5ecbc am 52626d2a: Fix build breakage due to incorrect bcc_compat RS_TRIPLE.
* commit '52626d2a7b4767905e8a369ddc8316c1290ad156':
  Fix build breakage due to incorrect bcc_compat RS_TRIPLE.
2014-09-03 14:34:52 +00:00
Stephen Hines
5c72544d48 Fix build breakage due to incorrect bcc_compat RS_TRIPLE.
Bug: 17333374
Change-Id: I13582ce0cde86f7b3728aa4f45a5197438d65a2d
(cherry picked from commit 52626d2a7b)
2014-09-02 21:46:25 -07:00
Stephen Hines
52626d2a7b Fix build breakage due to incorrect bcc_compat RS_TRIPLE.
Bug: 17333374
Change-Id: I13582ce0cde86f7b3728aa4f45a5197438d65a2d
2014-09-02 19:09:35 -07:00
Dan Albert
c3733c7765 am 467f8f32: am df73a5fa: Merge "Performance improvement for whole static libs"
* commit '467f8f326b979b43b6be48d5294f0627cf8fdd71':
  Performance improvement for whole static libs
2014-08-20 21:28:49 +00:00
Dan Albert
e0f44ac25d Performance improvement for whole static libs
Improves performance for LOCAL_WHOLE_STATIC_LIBS by copying the first .a
to the new .a rather than extracting and recreating

Change-Id: Iecdb5e4bb2ce987bb41a70c3393d18a6d72ae689
2014-08-20 13:58:36 -07:00
Ying Wang
0a5db68c01 am 66a2aa21: am 9c80e8a5: Merge "Apply TARGET_GLOBAL_LDFLAGS to transform-bc-to-so"
* commit '66a2aa2180ca161bf73d2554972f9952b8e1bb7d':
  Apply TARGET_GLOBAL_LDFLAGS to transform-bc-to-so
2014-08-14 02:22:56 +00:00
Ying Wang
bfd651600c Apply TARGET_GLOBAL_LDFLAGS to transform-bc-to-so
This fixes mips unbundled build since we switched to mips64el toolchain
for both mips and mips64.
TODO: multilib build support.

Change-Id: I7add92d2cecfc3ab739785ceef6700240a25093a
2014-08-13 19:03:16 -07:00
Ying Wang
903e2dd014 Apply TARGET_GLOBAL_LDFLAGS to transform-bc-to-so
This fixes mips unbundled build since we switched to mips64el toolchain
for both mips and mips64.
TODO: multilib build support.

Change-Id: I7add92d2cecfc3ab739785ceef6700240a25093a
2014-08-13 18:47:50 -07:00
Dan Albert
04cf315970 Inhibit implicit -Bsymolic in -shared.
Bug: 16853291

Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c
(cherry picked from commit b6bb71b85d)
2014-08-08 08:15:19 -07:00
Dan Albert
908ab54fda Fix uses of -fPIC and -fPIE.
We've been using -fPIC and -fPIE together in the global cflags all this
time. These options are incompatible. The only reason we haven't been
hit by this before is because of the forced -Bsymbolic in GCC. To fix
this, pass -fpic when compiling objects for shared libraries and -fpie
when compiling objects for executables. For static libraries, also use
-fpic. We have to do this because static libraries might be included in
either a shared library or an executable. Code compiled with -fpie
cannot be included in a shared library, but code compiled with -fpic
may be included in an executable.

We've also been using -fpic and -fPIC together. These are different
options, and only the latter will take effect.
http://stackoverflow.com/a/967010

The final thing this fixes is that we had -f(PIC|PIE) flags being passed
to link commands. These are compile time flags, and don't do anything at
link time.

Bug: 16823325
Change-Id: Ic76f47e63dc2c81b7e1a8058bae1b3dc8565d606
(cherry picked from commit 4803ce2696)
2014-08-08 08:15:14 -07:00
Dan Albert
9d6aa51a0f am e99d8947: am cbc742a1: Merge "Inhibit implicit -Bsymolic in -shared."
* commit 'e99d8947c09731d71db7e95a280cf81f51f4049a':
  Inhibit implicit -Bsymolic in -shared.
2014-08-08 00:23:56 +00:00
Dan Albert
d423e5fbdb am 897cd3d4: am afae9fd8: Merge "Fix uses of -fPIC and -fPIE."
* commit '897cd3d494272b8a6a12f0fb6d02bfe7426a309c':
  Fix uses of -fPIC and -fPIE.
2014-08-08 00:23:55 +00:00
Dan Albert
4803ce2696 Fix uses of -fPIC and -fPIE.
We've been using -fPIC and -fPIE together in the global cflags all this
time. These options are incompatible. The only reason we haven't been
hit by this before is because of the forced -Bsymbolic in GCC. To fix
this, pass -fpic when compiling objects for shared libraries and -fpie
when compiling objects for executables. For static libraries, also use
-fpic. We have to do this because static libraries might be included in
either a shared library or an executable. Code compiled with -fpie
cannot be included in a shared library, but code compiled with -fpic
may be included in an executable.

We've also been using -fpic and -fPIC together. These are different
options, and only the latter will take effect.
http://stackoverflow.com/a/967010

The final thing this fixes is that we had -f(PIC|PIE) flags being passed
to link commands. These are compile time flags, and don't do anything at
link time.

Bug: 16823325
Change-Id: Ic76f47e63dc2c81b7e1a8058bae1b3dc8565d606
2014-08-07 10:20:58 -07:00
Dan Albert
b6bb71b85d Inhibit implicit -Bsymolic in -shared.
Bug: 16853291

Change-Id: Id70488b077256a70137c4417f21be2c2d1d4341c
2014-08-07 15:43:16 -07:00
Ying Wang
7f625aad03 Improve rules of split apks.
- Better messaging if the expected split apk isn't generated by the aapt
  command in the base apk rule; Remove the built base apk, so make will
  rerun aapt after the user changes the splitting parameters.
- Use cleaner static pattern rules instead of running $(foreach) with
  $(eval).

Bug: 16319961
Change-Id: If6ae302e1a39d2e0db8f784d4e1cf292ec855281
2014-07-23 16:38:06 -07:00
Ying Wang
1425e2d8c0 Support LOCAL_PACKAGE_SPLITS.
Support LOCAL_PACKAGE_SPLITS, which accepts a list of resource lables
and generates multiple apks. The build system sets up rules to sign and
zipalign the split apks.

Bug: 16319961
Change-Id: I344b3d1c7eb158c6d0df879093d666a89870aadd
2014-07-22 17:37:11 -07:00
Ying Wang
af9757e849 New installation path for apks and their JNIs.
Apk's path is changed to <parent_dir>/MyApp/MyApp.apk;
JNI path is changed to <parent_dir>/MyApp/lib/<arch_name>/libfoo.so.
Symlinks of JNIs are changed accordingly.

Bug: 16319961
Change-Id: Ib3b2309c95fa9aea27837fcc29e28d990b04747b
2014-07-18 16:26:24 -07:00
Yohann Roussel
e019dfd721 Support dx generating multiple dex files.
Dx is now capable of generating multiple dex file in one run.
This capability is not compatible with --output=*.dex so this CL
changes the --output argument to be a directory. This CL also
includes the packaging of the multiple dex files when dx generates
more than one dex file.

(cherry picked from commit 8ffe9c3e79)

Conflicts:
        core/java.mk

Change-Id: I1ddc91b416de5929d4d4b41824c6012b32f94deb
2014-07-16 12:38:22 +02:00
Ying Wang
58f8cf7273 am 904446ce: am 1a3d260f: am e69d4350: Merge "Support to add JNI of both archs in multilib build."
* commit '904446ce0b3f430ac88ae0c08b9c613721474cd5':
  Support to add JNI of both archs in multilib build.
2014-06-25 18:52:02 +00:00
Ying Wang
8e20ef6205 Support to add JNI of both archs in multilib build.
Use "LOCAL_MULTILIB := both" to install jni libraries of both archs in
multilib build.
The build system will package jni of both archs to the apk, or install
them to the right location on the system image and create symlinks,
extract .so files from prebuilt apk, etc if appropriate.

Bug: 15849902
Change-Id: I7e147b5a47db476584c38250de7b36c75ea40d81
2014-06-25 09:07:01 -07:00
Colin Cross
bf2f0c729b am a1ac4736: am b110da5f: am 9d8854e3: Merge "build: delete 64-bit blacklist"
* commit 'a1ac47367636c0473156679f8f30af626df7da85':
  build: delete 64-bit blacklist
2014-06-18 21:40:27 +00:00
Colin Cross
ae2986e51a build: delete 64-bit blacklist
The last projects in the blacklist have been fixed, delete the code.

Change-Id: I0fe7809bd18e32516374c9cb2a6f71df1d3c62ee
2014-06-17 21:35:44 -07:00
JP Abgrall
0ed7cec97a core: Fixup assert-max-image-size/assert-max-file-size usage
- Remove the incorrectly used (and unused) 3rd arg to assert-max-image-size
- Remove test for fstype in assert-max-file-size() as it was always
  set to a value leading to 0.

Change-Id: I0a1182fcc85c6c3801d45731e691b9bb38657606
Signed-off-by: JP Abgrall <jpa@google.com>
2014-06-16 14:20:40 -07:00
Ying Wang
01c4f4622b am dceddd91: am 79b46720: am 02f98a26: Merge "Fix loophole in module expansion."
* commit 'dceddd91d9a6516346e752b9f942747bea931cfa':
  Fix loophole in module expansion.
2014-06-11 20:49:20 +00:00
Ying Wang
541b1d0f7c am fe9ad097: am b1f65358: am 5ad17493: Merge "Support .asm being compiled by yasm targeted for x86."
* commit 'fe9ad0975ade10219a5fa9a77d034ba77735e393':
  Support .asm being compiled by yasm targeted for x86.
2014-06-11 17:44:54 +00:00
Ying Wang
e1b867dde7 Fix loophole in module expansion.
Previously we only expanded product_MODULES with LOCAL_REQUIRED_MODULES,
but not modules introduced by LOCAL_SHARED_LIBRARIES; Later we did a further
shared libary expansion in vendor_module_check.mk.
It couldn't track C in the following case:
A : B, by LOCAL_SHARED_LIBRARIES; B : C, by LOCAL_REQUIRED_MODULES.

With this change, we transformed the LOCAL_SHARED_LIBRARIES dependencies
into LOCAL_REQUIRED_MODULES dependencies before doing the required
module expansion and the loophole is closed.
All module names are now expanded to product_MODULES now and it makes
vendor_module_check.mk simpler.

Change-Id: I8835a478d2ce0ce10601a8449f446f07b01c2b7f
2014-06-10 14:30:30 -07:00
Ying Wang
7b913ce6fa Support .asm being compiled by yasm targeted for x86.
Change-Id: Icd6626a082facf920b0e49e2fbe8861e94400552
2014-06-06 11:00:36 -07:00
Ying Wang
8b73a86834 am 834ec0ea: am d3ddfdf8: am b3bed595: Merge "Add a dummy build recipe for generated RS cpp files."
* commit '834ec0ead591cf64a5f660af0210e95728e08c4f':
  Add a dummy build recipe for generated RS cpp files.
2014-05-28 23:45:29 +00:00
Ying Wang
d3ddfdf847 am b3bed595: Merge "Add a dummy build recipe for generated RS cpp files."
* commit 'b3bed5952b44e69dc9e1988beb4092303084ef61':
  Add a dummy build recipe for generated RS cpp files.
2014-05-28 23:38:46 +00:00
Ying Wang
81ab8339fe Add a dummy build recipe for generated RS cpp files.
Previously the RS cpp files are generated by the timestamp rule. Though
we have the generated RS cpp files depend on the timestamp file, we
don't have a build recipe. In such case gmake does some "optimization"
that it skip recompiling the generated cpp files, because it assumes the
generated cpp files are already up to date even if the rs files have
been updated.

Bug: 15313144
Change-Id: Ie69ecd2c788057d3619f9c7d2a125d44c4a534a1
2014-05-28 16:17:09 -07:00
Dan Albert
a5b0b1303d am 3805f619: Merge "Revert "Fix for duplicate names in whole static libs""
* commit '3805f619156163eab8ad92fd51b4a431be1287bd':
  Revert "Fix for duplicate names in whole static libs"
2014-05-27 19:44:19 +00:00
Dan Albert
3c12b5c02b Revert "Fix for duplicate names in whole static libs"
This reverts commit 0e5ce8be34.

Change-Id: I68b776cb915fd7be8299ddb2899907046dddadf3
2014-05-27 19:30:36 +00:00
Dan Albert
212772f632 am 31101623: Merge "Fix for duplicate names in whole static libs"
* commit '31101623b3e621436f6b46f49242ed4642d86164':
  Fix for duplicate names in whole static libs
2014-05-27 18:26:38 +00:00
Jeff Brown
4c4aa99ced Support more precise package exclusion from JAR files.
Allow LOCAL_JAR_PACKAGES to work on subpackages.  Previously it
only worked on top-level packages due to a bug in how the directories
were recursively deleted.

Add LOCAL_JAR_EXCLUDE_PACKAGES to allow specific subpackages to
be excluded.  This rule applies after LOCAL_JAR_PACKAGES has
selected which packages to include.  It may also be used independently.

Change-Id: Ibd0e495be1a20c84b59c9da132e92100ef3f8705
2014-05-23 18:41:19 -07:00
Dan Albert
0e5ce8be34 Fix for duplicate names in whole static libs
_extract-and-include-single-(host|target)-whole-static-lib was written such that
only the first file of a given name would be extracted and included into the new
library. This patch iterates over each identically named archive member,
extracts them individually, and adds them to the new archive.

Bug: 15110069
Change-Id: Ia08c7be6f40bfc8403908a8808898ada479099b1
2014-05-23 18:23:47 -07:00
Ying Wang
1dc4f0bace am 2bf10a72: am cdcb6926: am 6cb69bd4: Merge "Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build"
* commit '2bf10a72f87a8e97923286aa331f7db81e2361ca':
  Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build
2014-05-23 19:43:57 +00:00
Ying Wang
cdcb6926d4 am 6cb69bd4: Merge "Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build"
* commit '6cb69bd4f20ac3ae3a7d5b5cc323c4480cf8ef75':
  Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build
2014-05-23 17:44:31 +00:00
Ying Wang
6cb69bd4f2 Merge "Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build" 2014-05-23 17:39:40 +00:00
Ying Wang
78ae0ad8df am 913e0317: am a72e6f80: am 8a3f514d: Merge "Split the rules to build the odex file"
* commit '913e031793928981640f51fa2e6480312f044c37':
  Split the rules to build the odex file
2014-05-22 02:38:52 +00:00
Ying Wang
a72e6f80e4 am 8a3f514d: Merge "Split the rules to build the odex file"
* commit '8a3f514d44e2c1d4920126b3edd47f7a7616b732':
  Split the rules to build the odex file
2014-05-22 02:29:52 +00:00
Ying Wang
36142f64ae Split the rules to build the odex file
Previously the odex file is byproduct generated by the package.apk rule.
Though we have the odex file depend on the package.apk it doesn't have
its own build recipe. In case package.apk isn't updated but we still
need to update the odex file (such as changed LOCAL_MULTILIB), the odex
file will never be rebuilt.
This change split out the rules to build the odex file and make sure the
build recipe get executed if the odex file needs rebuild.

Change-Id: I60c2f32b536b3d59045301ee863aae1451734aad
2014-05-21 16:24:59 -07:00
Ying Wang
966c1e0cae Add HOST_PREFER_32_BIT to support 32-bit-by-default multilib build
We already support pure 32-bit and 64-bit-by-default multilib build.
With HOST_PREFER_32_BIT we can build 32-bit-by-default multilib build.
This will be lest disruptive during the period we transition to
64-bit-by-default.

Bug: 13751317
Change-Id: I0d56ce4abbe4afeaacfd70d709f6a349791c0722
2014-05-20 18:03:21 -07:00
Ying Wang
8200231ae1 am e50f2d9f: am 40b49d30: am a74ade94: Merge "Support host multilib build"
* commit 'e50f2d9f32a27d8290692dbf99ab8b247ef9d553':
  Support host multilib build
2014-05-15 01:09:49 +00:00
Ying Wang
40b49d3043 am a74ade94: Merge "Support host multilib build"
* commit 'a74ade945776e80f99f3b05d06a131cfd353c3f6':
  Support host multilib build
2014-05-15 00:41:37 +00:00
Ying Wang
6feb6d5607 Support host multilib build
This change basically ported our target multilib to the host side.
It supports 2 host build modes: x86 and x86_64 multilib build.
For now you need to set "BUILD_HOST_64bit=true" to switch to x86_64
multilib build. Later we'll default to x86_64 build and have a flag
to force 32-bit only build, which may be needed by SDK build.

In host module definition, like in target ones, you can use the
following
LOCAL variables to set up multilib configuration:
LOCAL_MULTILIB: can be "both", "first", "32" or "64".
It also supports the same set of arch or 32-vs-64 specific LOCAL
variables.
By default, it builds only for the first arch.

To keep path compatibility, in x86_64 build files are still output to
out/host/linux-x86; Both 32-bit and 64-bit executables are in
out/host/linux-86/bin;
In x86_64 build 32-bit shared libraries are installed to
out/host/linux-x86/lib32
and 64-bit shared libraries are installed to out/host/linux-x86/lib;
32-bit object files are output to out/host/linux-x86/obj32 and 64-bit
object files
are output to out/host/linux-x86/obj.

Bug: 13751317
Change-Id: I6044f83b7db369a33e05209e8c588eb6dc83409f
2014-05-14 16:55:04 -07:00
Adam Lesinski
2d1718aaea Change aapt flag to use new name
Change-Id: I59ee77ede4716fdbf8403504da65fcadc9946423
2014-05-09 10:57:48 -07:00
Bill Yi
1e4adfa837 Merge commit '8113e43601aac7702b9ec007e81a179826143d1e' into HEAD 2014-04-29 11:32:53 -07:00
Ying Wang
7d43b0f6a5 am f90ef06f: am 73c1422d: am b5956468: Merge "Disable host -fPIE if BUILD_HOST_static is set."
* commit 'f90ef06f0847f2adba3248859376775112ab1a81':
  Disable host -fPIE if BUILD_HOST_static is set.
2014-04-04 23:25:19 +00:00
Ying Wang
f90ef06f08 am 73c1422d: am b5956468: Merge "Disable host -fPIE if BUILD_HOST_static is set."
* commit '73c1422dd297553948ebfc4603fe852aa9a0336a':
  Disable host -fPIE if BUILD_HOST_static is set.
2014-04-04 23:19:20 +00:00
Ying Wang
faf3d5ed0f Disable host -fPIE if BUILD_HOST_static is set.
It turns out -static doesn't work with -fPIE.

Bug: 13568878
Change-Id: I66951a5517dece1c5f4f22c329cf703bd99b5163
2014-04-04 14:38:14 -07:00
Torne (Richard Coles)
dc74b38040 am e4915bbe: am 59d0c658: am c783b9bd: Merge "Add GYP as a target type that requires 2nd arch."
* commit 'e4915bbebbaaeb337df5dec87b82c18d186a6bfb':
  Add GYP as a target type that requires 2nd arch.
2014-04-02 17:31:04 +00:00
Torne (Richard Coles)
e4915bbebb am 59d0c658: am c783b9bd: Merge "Add GYP as a target type that requires 2nd arch."
* commit '59d0c658847d3c8118de46d2d7fa1fa3bfc563d2':
  Add GYP as a target type that requires 2nd arch.
2014-04-02 17:27:53 +00:00
Torne (Richard Coles)
3972253b0f Add GYP as a target type that requires 2nd arch.
"GYP" class targets are used by external/chromium_org for gyp's "none"
type. The processing in these targets needs a separate intermediate
directory for the primary/secondary architecture, so add it to the list
in intermediates-dir-for along with libraries/executables.

Change-Id: Id05899c83b45ed0647dfbfa6b0b2e7f61b04348b
2014-04-02 11:33:17 +01:00
Ying Wang
82784b285a am 1758fe1f: am 30dbfa43: am 1c380c13: Merge "Remove the unnecessary indirection of TARGET_STRIP_COMMAND"
* commit '1758fe1f87b58f91db569ba3c0fa406f5f37819e':
  Remove the unnecessary indirection of TARGET_STRIP_COMMAND
2014-03-31 17:43:57 +00:00
Ying Wang
1758fe1f87 am 30dbfa43: am 1c380c13: Merge "Remove the unnecessary indirection of TARGET_STRIP_COMMAND"
* commit '30dbfa43eff071438376b5699dbe3391d08204da':
  Remove the unnecessary indirection of TARGET_STRIP_COMMAND
2014-03-31 17:37:47 +00:00
Ying Wang
ce1c596e15 Remove the unnecessary indirection of TARGET_STRIP_COMMAND
Now all archs use the same strip command which can be put just in
transform-to-stripped.

Change-Id: Ief79697d47ea142fc9e63e63a7e2dace9e839165
2014-03-28 17:25:34 -07:00
Ying Wang
c63d345b18 am 264a5ed3: am 711951ab: am 78a819d6: am 266cf4f2: am f39752e9: Skip the product-scoped --product flag if it\'s set in LOCAL_AAPT_FLAGS
* commit '264a5ed3654b71ddc3c6dc0a52371624b2fa5204':
  Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
2014-03-25 21:19:18 +00:00
Ying Wang
711951abf0 am 78a819d6: am 266cf4f2: am f39752e9: Skip the product-scoped --product flag if it\'s set in LOCAL_AAPT_FLAGS
* commit '78a819d600ab750227009fd3dc93f7f2886600c7':
  Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
2014-03-25 10:04:39 +00:00
Ying Wang
78a819d600 am 266cf4f2: am f39752e9: Skip the product-scoped --product flag if it\'s set in LOCAL_AAPT_FLAGS
* commit '266cf4f2595323170fe02db05835884b4522a0f9':
  Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
2014-03-25 09:56:52 +00:00
Ying Wang
288bf3a377 am 266cf4f2: am f39752e9: Skip the product-scoped --product flag if it\'s set in LOCAL_AAPT_FLAGS
* commit '266cf4f2595323170fe02db05835884b4522a0f9':
  Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
2014-03-24 21:26:51 +00:00
Ying Wang
266cf4f259 am f39752e9: Skip the product-scoped --product flag if it\'s set in LOCAL_AAPT_FLAGS
* commit 'f39752e99b4e5083f1e91c46722f87def8143b49':
  Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
2014-03-24 21:21:26 +00:00
Ying Wang
f39752e99b Skip the product-scoped --product flag if it's set in LOCAL_AAPT_FLAGS
Bug: 11335547
Change-Id: Ic08b7557a288508e8e8d14a725923960c47f5ca0
2014-03-20 17:28:57 -07:00
Christopher Ferris
ddb9b4042e am 10eaabfc: am a908fc96: am aea9f041: am 8b1bcc7d: Merge "Add a method to leave the symbol table in a library."
* commit '10eaabfceb715baecbcdf71ebfb4f108ce295fb6':
  Add a method to leave the symbol table in a library.
2014-03-19 18:25:22 +00:00
Christopher Ferris
a908fc96db am aea9f041: am 8b1bcc7d: Merge "Add a method to leave the symbol table in a library."
* commit 'aea9f041f72a128065691ac402ccdb72a5a7aad4':
  Add a method to leave the symbol table in a library.
2014-03-19 18:15:39 +00:00
Christopher Ferris
810cf65d71 am aea9f041: am 8b1bcc7d: Merge "Add a method to leave the symbol table in a library."
* commit 'aea9f041f72a128065691ac402ccdb72a5a7aad4':
  Add a method to leave the symbol table in a library.
2014-03-19 18:15:39 +00:00
Christopher Ferris
a6e2f9322c Add a method to leave the symbol table in a library.
When LOCAL_STRIP_MODULE := keep_symbols is set, then the normal strip rules
will be modified so that only the .debug_* sections are removed. The original
symbol table is left alone.

This allows the compilation of certain libraries so that libbacktrace library
can provide meaningful names to functions.

Bug: 12958251
Change-Id: I82bdc304a463012e29086325ccb51163464cb4a9
2014-03-18 17:34:41 -07:00
Hui Shu
ec21c58574 Fix another build break.
The doclava build does not need to depend on the intermedidate
removed.txt. It depends on public_api.txt. Removed.txt is generated
along with public_api.txt by doclava.

BUG: b/11293324
Change-Id: Ia5ea675bbfb15b81ce6ae81cf34c608e83676ca1
2014-03-13 16:31:21 -07:00