Commit Graph

7112 Commits

Author SHA1 Message Date
Dan Albert 7f28965c23 am 6a944e5e: am b9a8aa63: Merge "Fix prebuilts for target builds with USE_MINGW=1."
* commit '6a944e5e0b9dde4aa086d83555adfe09df3f472e':
  Fix prebuilts for target builds with USE_MINGW=1.
2015-05-06 22:44:27 +00:00
Chih-Hung Hsieh d88ebe7f14 am 0ba68baf: Upgrade x86 gcc to 4.9 and disable devirtualization.
* commit '0ba68bafa3b465110d10da1a57a1843ff91b2f3a':
  Upgrade x86 gcc to 4.9 and disable devirtualization.
2015-05-06 00:52:22 +00:00
Chih-Hung Hsieh 0ba68bafa3 Upgrade x86 gcc to 4.9 and disable devirtualization.
Also filter out gcc-only flags -Wno-clobbered and -fno-devirtualize
when compiled with clang/llvm.

BUG: 19872411
Change-Id: I6de57583be04da607f569df65e93531787dbb789
(cherry picked from AOSP commit 90036610dd)
2015-05-06 00:24:18 +00:00
Ying Wang bb2b9fe761 am 4f5d0e60: Raise SDK version for ProGuard processing when app links support library.
* commit '4f5d0e60b441f009f78ef6595172ffa11dd69a2d':
  Raise SDK version for ProGuard processing when app links support library.
2015-05-05 19:08:03 +00:00
Ying Wang 4f5d0e60b4 Raise SDK version for ProGuard processing when app links support library.
When an app's LOCAL_SDK_VERSION is lower than the support library's
LOCAL_SDK_VERSION,  we artifically raises the "SDK version" "linked"
by ProGuard, to
- suppress ProGuard warnings of referencing symbols unknown to the
  lower SDK version.
- prevent ProGuard stripping subclass in the support library that
  extends class added in the higher SDK version.

This allows us to remove the dangerous ProGuard flag
"-dontwarn android.support.**".

Notes:
- We don't raise the app's LOCAL_SDK_VERSION, so that the app's own
  code is still unable to use the higher SDK version.
- For platform build, we can't just raise to the "current" SDK,
  because would break apps that use APIs removed from the current SDK.
  We raise it to framework.jar instead, which contains the most complete
  symbol set.

Bug: 20658265
Change-Id: I90099073457a65cb8031fbaec6b396d68ce614a7
(cherry picked from commit 8e8d1e7aba)
2015-05-05 17:35:12 +00:00
Dmitriy Ivanov 20a04cfcfc am c787453f: Merge "Pack module before making symbolic version" into mnc-dev
* commit 'c787453fdd0d64d8b8e5ce29c1242e659de737f4':
  Pack module before making symbolic version
2015-05-05 01:24:47 +00:00
Dan Albert b9a8aa63cb Merge "Fix prebuilts for target builds with USE_MINGW=1." 2015-05-04 22:46:58 +00:00
Dan Albert 216ecac61e Fix prebuilts for target builds with USE_MINGW=1.
USE_MINGW=1 mm didn't work in directories that contained target modules
because the build system would use the Windows locations and extensions
when trying to find the host GCC prebuilts. Windows is the target OS,
not the OS we're building from.

Change-Id: Ic994fed15388d0c7d393f71ba28fe7afdc659f5c
2015-05-04 22:44:39 +00:00
Dmitriy Ivanov 86bd653f70 Pack module before making symbolic version
We need PT_LOAD segments to match for the gdb sake.
  If we pack module after stripping symbolic version
  PT_LOAD differ from actual ones; this confuses gdb.

Bug: http://b/20687795
Change-Id: If7b1ffcda918d0cc47051a30ca1202007ed62403
(cherry picked from commit 258b29cf76)
2015-05-04 13:13:01 -07:00
Dmitriy Ivanov 258b29cf76 Pack module before making symbolic version
We need PT_LOAD segments to match for the gdb sake.
  If we pack module after stripping symbolic version
  PT_LOAD differ from actual ones; this confuses gdb.

Bug: http://b/20687795
Change-Id: If7b1ffcda918d0cc47051a30ca1202007ed62403
2015-05-04 12:42:51 -07:00
Ying Wang 0d0f91e385 am 7acd4a5a: Merge "Revert "Don\'t extract jni from prebuilt apks."" into mnc-dev
* commit '7acd4a5afdecf883fb83a39b30715ad3d408e50c':
  Revert "Don't extract jni from prebuilt apks."
2015-05-04 19:16:56 +00: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 c1be19a8ee am 37c9b500: Merge "Don\'t extract jni from prebuilt apks." into mnc-dev
* commit '37c9b500ed8c739ca4b47b41bc77863d0971f9f4':
  Don't extract jni from prebuilt apks.
2015-05-02 16:53:45 +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
Ying Wang 5c8f9101f6 am 069f1f89: Deference symlinks when copying LOCAL_PICKUP_FILES.
* commit '069f1f8942bf89817b064506495f6ab181548b55':
  Deference symlinks when copying LOCAL_PICKUP_FILES.
2015-05-01 03:06:27 +00:00
Ying Wang 069f1f8942 Deference symlinks when copying LOCAL_PICKUP_FILES.
Change-Id: I2399529ee9168bb93a4cad5daa61cd2ea500df04
2015-04-30 19:46:00 -07:00
Ying Wang 6dc2db2076 am ffe376b4: Fix jack transformation on prebuilt AAR.
* commit 'ffe376b49ef54b5669f17e0b4cdad18912b68dd9':
  Fix jack transformation on prebuilt AAR.
2015-04-30 17:33:59 +00:00
Ying Wang ffe376b49e Fix jack transformation on prebuilt AAR.
Change-Id: I74f932cff606138943d97b923bbd059bcd496e46
2015-04-30 09:55:08 -07:00
Dmitriy Ivanov ae70327e58 am 923d355f: am 0a3b080a: Merge "Revert "Revert "Pack relocations for mips64"""
* commit '923d355fdcd3ebfe4bf4a94c111d35ac98ecf7d5':
  Revert "Revert "Pack relocations for mips64""
2015-04-30 06:30:58 +00:00
Dmitriy Ivanov 5924f142cc Revert "Revert "Pack relocations for mips64""
This reverts commit 6399dcce59.

Bug: http://b/20658994
(cherry picked from commit 8387d99ec3)
2015-04-29 23:11:03 -07:00
Dmitriy Ivanov 8387d99ec3 Revert "Revert "Pack relocations for mips64""
This reverts commit 6399dcce59.

Bug: http://b/20658994
2015-04-29 17:08:54 -07:00
Dmitriy Ivanov a738f29d62 am fbbe8926: am cb238772: Merge "Revert "Revert "Pack relocations for mips"""
* commit 'fbbe8926aa1159bdcc95b5cb7fffa28948deb94a':
  Revert "Revert "Pack relocations for mips""
2015-04-29 23:04:26 +00:00
Dmitriy Ivanov 0cabfed78e Revert "Revert "Pack relocations for mips""
This reverts commit d05fd6fc82.

Bug: http://b/20658994
Change-Id: Iccbd4846b310306ed11b87f4566b8aaadfa63ebb
(cherry picked from commit cb2b3d47ad)
2015-04-29 15:44:20 -07:00
Dmitriy Ivanov cb2b3d47ad Revert "Revert "Pack relocations for mips""
This reverts commit d05fd6fc82.

Bug: http://b/20658994
Change-Id: Iccbd4846b310306ed11b87f4566b8aaadfa63ebb
2015-04-29 15:32:10 -07:00
Dimitry Ivanov f1ae206312 am a00a4f27: am b7550093: Merge "Revert "Pack relocations for mips""
* commit 'a00a4f27226feafb64dfa4d5af979c3c4a69b8bc':
  Revert "Pack relocations for mips"
2015-04-29 19:38:47 +00:00
Dimitry Ivanov 8fb3350f1a Merge "Revert "Pack relocations for mips"" into mnc-dev 2015-04-29 19:37:46 +00:00
Dimitry Ivanov d896883bfe Revert "Pack relocations for mips"
This reverts commit 9dc1a7359f.

Bug: http://b/20658994
Change-Id: Ib10c764a7d06db823ee2fccfa47240e0a639d4bc
(cherry picked from commit d05fd6fc82)
2015-04-29 12:33:19 -07:00
Dimitry Ivanov 3e037e36d0 Revert "Pack relocations for mips64"
This reverts commit 8bd30fe3cb.

Bug: http://b/20658994
Change-Id: I6c31094559a12b824344802bf3993f91aee79a26
(cherry picked from commit 6399dcce59)
2015-04-29 12:32:27 -07:00
Dimitry Ivanov 821d089441 am f91de521: am dcf8bd8c: Merge "Revert "Pack relocations for mips64""
* commit 'f91de521e5f8199b3d3671966f23eeeace2247e6':
  Revert "Pack relocations for mips64"
2015-04-29 19:20:40 +00:00
Dimitry Ivanov b755009325 Merge "Revert "Pack relocations for mips"" 2015-04-29 19:14:17 +00:00
Dimitry Ivanov dcf8bd8c07 Merge "Revert "Pack relocations for mips64"" 2015-04-29 19:03:56 +00:00
Dimitry Ivanov 6399dcce59 Revert "Pack relocations for mips64"
This reverts commit 8bd30fe3cb.

Bug: http://b/20658994
Change-Id: I6c31094559a12b824344802bf3993f91aee79a26
2015-04-29 18:59:05 +00:00
Dimitry Ivanov d05fd6fc82 Revert "Pack relocations for mips"
This reverts commit 9dc1a7359f.

Bug: http://b/20658994
Change-Id: Ib10c764a7d06db823ee2fccfa47240e0a639d4bc
2015-04-29 18:57:54 +00:00
Chris Banes 214fe303c9 am 0e8383ca: am 8f168d1b: Add design support library docs
* commit '0e8383ca6f4c2ffc6200ed81aaa6fa52bfe6fdb8':
  Add design support library docs
2015-04-29 09:41:50 +00:00
Chris Banes 0e8383ca6f am 8f168d1b: Add design support library docs
* commit '8f168d1b986516112d103958070830c9075f6ce2':
  Add design support library docs
2015-04-29 09:17:22 +00:00
Evgeniy Stepanov 9f187eebf9 am 63156752: am cd092913: Merge "Don\'t pack ASAN executables."
* commit '63156752647f044ec3485b21b5d7b6157b7fde8e':
  Don't pack ASAN executables.
2015-04-28 22:25:16 +00:00
Dan Albert 275c2c5d71 am 92d37d21: am 5a54a468: Merge "--no-as-needed needs -Wl."
* commit '92d37d21118f8b8c156e9c70b404420a977baf5a':
  --no-as-needed needs -Wl.
2015-04-28 22:25:14 +00:00
Dan Albert 5619dbec25 Don't pack ASAN executables.
The relocation packer is causing the kernel to load the executable
overlapping ASAN's shadow space.

Bug: http://b/20665974
Change-Id: Ifc5914f4fbed5f4f00ed1c795d01cf2fcb849cfe
2015-04-28 15:00:15 -07:00
Dan Albert 1f0d53080b --no-as-needed needs -Wl.
Not sure why my checkbuild passed.

Change-Id: Iead84121daaaa32c5dd1f0712e9b7caaffd58352
2015-04-28 14:55:50 -07:00
Dan Albert 096f7698d8 am a4adfb4e: am a06323d6: Merge "Make asan more closely match clang behavior."
* commit 'a4adfb4ef0dc9129f32c1dcd64f0dedc6c7e61cd':
  Make asan more closely match clang behavior.
2015-04-28 21:46:05 +00:00
Dan Albert a1d605226d am 14cb9130: am a7ebd27b: Merge "Fix bad variable names."
* commit '14cb9130857c2d3181997a100ddef53bf94a4d91':
  Fix bad variable names.
2015-04-28 21:10:22 +00:00
Dan Albert 8a31153ae0 Make asan more closely match clang behavior.
Always link libm with asan. Hasn't been a problem before because ASAN
was only ever used when libc++ was as well, which already links libm.

Pass --no-as-needed for host modules.

These aren't needed for the target builds because the target uses the
shared RTL.

Change-Id: I5d6a3c2dd557b5231be2b7711df6438693753a88
2015-04-28 14:09:34 -07:00
Dan Albert 9f17655453 Fix bad variable names.
My working tree was still dirty when I verified the original change.

Change-Id: I3e6fa6908b809c016231b398c5d30d8cce3b87ab
2015-04-28 11:26:45 -07:00
Chris Banes 8f168d1b98 Add design support library docs
BUG: 20524332
Change-Id: I471ab17a2a5ccc43f4ef0fa04b7c2e9077d56361
2015-04-28 12:01:49 +01:00
Evgenii Stepanov 68f8620ccb am 59b0dad7: am 55f3c4c2: Merge "Fix AddressSanitizer link order and multilib setup."
* commit '59b0dad7272118e39be180eef24ffa50c0ffdf17':
  Fix AddressSanitizer link order and multilib setup.
2015-04-27 23:14:37 +00:00
Evgenii Stepanov 55f3c4c25e Merge "Fix AddressSanitizer link order and multilib setup." 2015-04-27 22:46:41 +00:00
Evgenii Stepanov f0b15e173b Fix AddressSanitizer link order and multilib setup.
ASan runtime library (when using dynamic linking) must be the first
dependency of the main executable to achieve correct symbol
interposition. This matches how the clang driver works.

In multilib setup, ASan-RT name depends on the target arch:
  /system/lib/libclang_rt.asan-arm-android.so
  /system/lib64/libclang_rt.asan-arm64-android.so

We also set RPATH to /system/lib/asan or /system/lib64/asan
to have a place for ASan-only versions of system libraries.

Change-Id: I5c0cdb89e5e08a1950eb276e406da9f31a6e52dd
2015-04-27 14:48:35 -07:00
Dan Albert ba25452fa7 am 55309f84: am 959f0ecc: Merge "Add LOCAL_SANITIZE_RECOVER."
* commit '55309f847680c6d6f1821fb1abb59e182e229a75':
  Add LOCAL_SANITIZE_RECOVER.
2015-04-27 20:24:52 +00:00
Dan Albert 959f0eccb4 Merge "Add LOCAL_SANITIZE_RECOVER." 2015-04-27 19:53:02 +00:00
Dan Albert 4111d4804a Add LOCAL_SANITIZE_RECOVER.
This is needed for projects that have known ubsan issues that we can't
fix right away (perhaps because it's an upstream project that we're
diligent about keeping in sync with upsteam).

Also make the normal ubsan use -fno-sanitize-recover=all by default.

Change-Id: I1b0f3309792f32dbd08c18816d7306e76c8d7c30
2015-04-27 11:07:38 -07:00