Commit graph

3753 commits

Author SHA1 Message Date
Ying Wang
695e826a0c Update rules to install JNI libraries.
Previously we have to use LOCAL_REQUIRED_MODULES to install jni
libraries for an apk in bundled build.
With this change, we'll use LOCAL_JNI_SHARED_LIBRARIES alone to
install jni shared libraries.

The new rules are:
- If we are doing unbundled build, or the apk isn't going to be
  installed to system partitions, we'll embed the jni libs in the
  built apk.
- Otherwise, the jni libraries will be installed to the system
  lib path, and symlinks created in the app specific lib path.

Change-Id: Id6bd5301eb632bda3593664acee580f0d8b1d5d4
2014-04-18 16:36:19 -07:00
Ian Rogers
67c209281f Merge "For 64-bit, use 32-bit DEXPREOPT if zygote64 isn't enabled." 2014-04-18 23:10:31 +00:00
Ian Rogers
5d186aee8e For 64-bit, use 32-bit DEXPREOPT if zygote64 isn't enabled.
Change-Id: Ia95d74517f8182031d6044ae55559010a98ec5ca
2014-04-18 15:23:40 -07:00
Ben Cheng
e76fee59fc Revert "Use aarch64-linux-android-4.9 for arm64 build (attempt #3)"
This reverts commit 084a7f8387.

GCC 4.9 still has stability issues (b/14160872)

Change-Id: I4d40829dbbfac0e7b6cd7eaf9924744bc5714271
2014-04-18 18:34:35 +00:00
Ben Cheng
084a7f8387 Use aarch64-linux-android-4.9 for arm64 build (attempt #3)
GCC: 4.9 (which supports -fstack-protector)
Binutils: 2.24 (which supports gc-sections)
GDB: 7.7

NDK libraries are still picked up from prebuilts/ndk/*/4.8/*
GCC has been patched to disable codegen for calling
__cxa_throw_bad_array_new_length.

Change-Id: Ie0bf38357c0cf3d265d8b5dd3c2b8a8fd83b1de1
2014-04-16 12:18:14 -07:00
Ben Cheng
d32bbe7d06 Merge "Explicitly link libstdc++.a for static gtest executables." 2014-04-16 17:03:21 +00:00
Ben Cheng
e34bb09eab Explicitly link libstdc++.a for static gtest executables.
Change-Id: I29e3a4036264acd00dfa3229c9d0fc52ee20830e
2014-04-16 09:42:56 -07:00
Andrew Hsieh
50536c20af Add -Wl,-maarch64linux
The "-maarch64linux" switch is needed before aarch64-*4.8 is rebuilt with
backport of upstream patch, see https://android-review.googlesource.com/#/c/91099/

The existing ld.bfd is fine because it's configured to support
aarch64linux only.  ld.mcld (see https://android-review.googlesource.com/#/c/91047)
needs explicit emulation switch because it supports multiple targets

Change-Id: Idc1a491c5722ea9e26db917b667b1000bccc1f60
2014-04-15 11:54:06 -07:00
Narayan Kamath
22261a3f9b Merge ""desktop" linux has Posix clocks." 2014-04-15 10:58:52 +00:00
Colin Cross
5b1fa1c8a0 Merge "build: remove LOCAL_NO_2ND_ARCH" 2014-04-12 00:06:30 +00:00
Colin Cross
149d65b177 build: remove LOCAL_NO_2ND_ARCH
Delete LOCAL_NO_2ND_ARCH, it is no longer used.  Equivalent
functionality is available with LOCAL_MULTILIB := first.

Change-Id: I36838a8a7e10b0a59ca0022c4c8a3a190e782c71
2014-04-11 16:57:36 -07:00
Ben Cheng
38fef38c40 Revert "Use aarch64-linux-android-4.9 for arm64 build (attempt #2)"
This reverts commit 1ae9b213eb.
Sigh... new warnings found by 4.9 break checkbuild.

Change-Id: I46ad622fa9c8ac4fb1e15e29bb400634abc5914c
2014-04-11 23:36:25 +00:00
Ben Cheng
1ae9b213eb Use aarch64-linux-android-4.9 for arm64 build (attempt #2)
GCC: 4.9 (which supports -fstack-protector)
Binutils: 2.24 (which supports gc-sections)
GDB: 7.7

NDK libraries are still picked up from prebuilts/ndk/*/4.8/*
GCC has been patched to disable codegen for calling
 __cxa_throw_bad_array_new_length.

Change-Id: Ie647fc4c6b227d6bee792f04d5c2f02eb0099559
2014-04-11 12:22:56 -07:00
Ben Cheng
eec11d9727 Merge "Decouple platform compiler and NDK library versioning." 2014-04-11 17:02:32 +00:00
Ben Cheng
4de6fa4069 Decouple platform compiler and NDK library versioning.
TARGET_GCC_VERSION: select compiler from prebuilts/gcc/...
TARGET_NDK_GCC_VERSION: select libraries from prebuilts/ndk/...

Change-Id: I4422a42cdc97aa92b40798014cba82c3c123bbd2
2014-04-10 22:46:26 -07:00
Colin Cross
161cd77f21 build: remove packages/ from 64-bit blacklist
Everything under packages/ will build for 64-bit now, and
package.mk has been updated to not produce 64-bit libraries
on devices that don't support them (all of them right now).

Change-Id: I2c10e41f727cfc8fe237819308a6dfa34c4fff3f
2014-04-10 20:44:24 -07:00
Colin Cross
1750944332 build: use TARGET_SUPPORTS_32_BIT_APPS and TARGET_SUPPORTS_64_BIT_APPS
Use TARGET_SUPPORTS_32_BIT_APPS and TARGET_SUPPORTS_64_BIT_APPS to
determine which native libraries to build for an app.  If
both are set, it will use 64-bit unless TARGET_PREFER_32_BIT is set.
If only one is set, it will only build apps that work on that
architecture.  If neither is set it will fall back to only building
32-bit apps.

On existing 32-bit devices neither variable will be set, and the
build system will continue to build 32-bit apps.

Once a device has support for a 64-bit runtime, the same logic
that selects the dual runtimes should set TARGET_SUPPORTS_32_BIT_APPS
and TARGET_SUPPORTS_64_BIT_APPS, and packages will be built for
the preferred arch, or fall back to the non-preferrred arch if
necessary.

For testing, a device may set TARGET_SUPPORTS_64_BIT_APPS without
TARGET_SUPPORTS_32_BIT_APPS to produce only 64-bit apps.

Change-Id: I5b5e23f15602c3cf9bd96791971208a85492c7a3
2014-04-10 20:44:24 -07:00
Colin Cross
dc1c95aa20 build: add support for LOCAL_MULTILIB := 64
I don't expect it to be useful for modules, but package.mk will
use it to only install 64-bit native apps on devices that
only have a 64-bit zygote.

Change-Id: If3f5a81c3a60bd13fa6ded08e2a7579a29877324
2014-04-10 15:49:38 -07:00
Colin Cross
d3624d5f48 build: fix TARGET_PREFER_32_BIT
TARGET_PREFER_32_BIT can't assume that the 32-bit rule is allowed,
it needs to try the 32-bit rule first, then fall back to the 64-bit
rule in case the module specifies LOCAL_MODULE_TARGET_ARCH or
LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH to disallow the 32-bit build.

Also port TARGET_PREFER_32_BIT to package.mk.

Change-Id: I07520b75c4ee11a1e95a82b3afa2a33d4907eb04
2014-04-10 15:49:32 -07:00
Ben Cheng
13eaf184f6 Merge "Revert "Use aarch64-linux-android-4.9 for arm64 build."" 2014-04-10 17:14:57 +00:00
Ben Cheng
81892e29ff Revert "Use aarch64-linux-android-4.9 for arm64 build."
This reverts commit 6154690d86.

Change-Id: I7427ad6ca1f74ad632229348bac31ebdbc0590ad
2014-04-10 17:14:01 +00:00
Narayan Kamath
163140ceaf "desktop" linux has Posix clocks.
Change-Id: I90885a2bbb65f14f774ae72b2ca6738176bf0341
2014-04-10 17:36:53 +01:00
Ben Cheng
d957d6bbdb Merge "Use aarch64-linux-android-4.9 for arm64 build." 2014-04-10 16:33:51 +00:00
Ben Cheng
6154690d86 Use aarch64-linux-android-4.9 for arm64 build.
Change-Id: I63e1b54947326fb5da07af7691d4729bcbf99ac1
GCC: 4.9 (which supports -fstack-protector)
Binutils: 2.24 (which supports gc-sections)
GDB: 7.7
2014-04-09 15:58:08 -07:00
Ying Wang
d81d71a020 Increase the maximum javac heap size again.
Change-Id: Ic3422650ea22977f3dcfd74505cb287ff6543c2d
2014-04-09 14:27:29 -07:00
Narayan Kamath
e6243e176b Stop defining HAVE_TIMEDWAIT_MONOTONIC.
We no longer provide this function in bionic. All callers
should be moved over to pthread_condattr_setclock().

Change-Id: Iccd3384b40de423f7d5f9521b6d8073bf8bdea42
2014-04-09 16:08:09 +00:00
Narayan Kamath
cf61a7a0db Merge "Add 32 / 64 bit abi lists to system properties." 2014-04-09 08:48:04 +00:00
Narayan Kamath
7303ebda84 Add 32 / 64 bit abi lists to system properties.
Introduce ro.product.cpu.abilist32 / abilist64, which are
comma separated lists of the 32 and 64 bit ABIs that the
device supports. These properties are used by the zygote and
system server to determine what ABI an app should be
started with.

This changes move abilist related make steps out of envsetup.mk
and into config.mk because they depend on variables set by
core/combo/***. Additionally, config.mk performs a few additional
cleanups of these variables (like stripping them) after the
inclusion of envsetup.mk so this seems like a better place to
put them.

bug: 13647418

Change-Id: I3db39bdd761220c5b4966f651892fb592396f9a1
2014-04-08 17:40:40 +01:00
Ying Wang
bdac8cf148 Merge "Fix javadoc error "class file for sun.util.resources.OpenListResourceBundle not found"" 2014-04-07 22:41:22 +00:00
Ying Wang
5b6b46459c Fix javadoc error "class file for sun.util.resources.OpenListResourceBundle not found"
It seems to be a javac/javadoc bug.
See https://code.google.com/p/doclava/issues/detail?id=38

sun.util.resources.OpenListResourceBundle is a class defined in the host rt.jar,
but sometimes on some platform javadoc/javac can't find it.
-XDignore.symbol.file tells javadoc/javac to skip the stubs file ct.sym
and link against rt.jar directly.

Change-Id: I3930f7399fc14b2d6b43c29f737fa90f37515aff
2014-04-07 15:19:33 -07:00
Ying Wang
584d8adbea Different bootclasspath for droiddoc.
- If it's host module, don't set bootclasspath;
- If it's arget module,
  - It can build against the API stubs;
  - It can build against a historical SDK version;
  - It can build against core.jar

Change-Id: Id1ec3ba624bc38068b206ad7173f4facf590e021
2014-04-07 15:14:50 -07:00
Narayan Kamath
f122d41b75 Fix droiddoc generation.
We want javadoc generated from the standard libraries
we supply and not the host standard libraries.

This also has the side effect of fixing javadoc generation
for java7 APIs that android introduced, while compiling
with java6.

bug: 8992787
Change-Id: Idebc7e12c7743a43b425ef4971f4482719fd480d
2014-04-07 15:08:18 -07:00
Narayan Kamath
c84889b80a Build with java7 by default.
All introduce a flag LEGACY_USE_JAVA6 to force java6 builds.
This is an unsupported configuration, and provided temporarily
to iron out regressions and compare build output (if required.).

- Increment the version check sequence number.
- Move a more specific check (OpenJDK vs non OpenJDK) after
  the more general version check.
- Update the link in the version check error message to the
  "initializing" page instead of the "download" page. The latter
  talks about repo, mainly.

bug: 8992787

Change-Id: I313e17b1911768d4f3bc318c4162c53dec6eaf0d

Conflicts:
	core/main.mk
2014-04-04 18:44:47 -07: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
Ying Wang
8a52b231d2 Unset _JAVA_OPTIONS before running "java -version".
Unfortunately the previous approach of grepping out java version before
"head -n 1" clash with the effort of running "java -version" only once.

Change-Id: Ic78719c3bf1a54a45342d74bbbfa8e83bbc1bce1
2014-04-02 18:15:10 -07:00
Torne (Richard Coles)
c783b9bda9 Merge "Add GYP as a target type that requires 2nd arch." 2014-04-02 17:20:11 +00:00
Narayan Kamath
bee0ec4196 Add warning message for java6 builds.
The instruction URL has been amended and a few additional
details have been added.

(cherry picked from 8c06afdea3)

Change-Id: Icaffc3b13ed881ac7e29f2021ed31eb1f877a5ab
2014-04-02 13:16:15 +01:00
Ying Wang
8d45e51803 Call "java[c] -version" only once
and print out the full output if error occurs.
Bug: 11672548

(cherry picked from 7b66d366bf)

Change-Id: I8e2f2ffa2f28146405273b04667efe3c8d1c03ad
2014-04-02 10:45:17 +00:00
Narayan Kamath
2f5de9f504 Merge "Bring main.mk in sync with master." 2014-04-02 10:45:07 +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
Nicolas Geoffray
38c0ac7386 Merge "Use debug versions of dex2oat explicitly." 2014-04-02 08:45:56 +00:00
Dmitriy Ivanov
00479a9fe0 Remove redundant my_target_global_ldflags
* Fix: my_target_global_ldflags is defined in binary.mk
    so they effectivelly override previous definition

Change-Id: I9c7d9bde82c3a6d25a94ae109fa71ecaa33640b0
2014-04-01 16:36:21 -07:00
Tim Murray
125a3c9fb0 Always use prebuilt clang, even if we're explicitly building clang/LLVM.
This is needed for self-hosting Clang/LLVM.

bug 13588226

Change-Id: Ic98adc2b174b12ce046b7b65bbc28901a766a485
2014-04-01 16:08:51 -07:00
Brian Carlstrom
49c80cd9b6 cortex-a7 supports div
(cherry picked from commit cece45d226)

Change-Id: I9975171ef2c2cd3a9481fa0896473fec684095f3
2014-04-01 10:25:59 -07:00
Narayan Kamath
d5fb782682 Bring main.mk in sync with master.
These lines were removed in aosp in commit e2d27887b
but a bad merge conflict resolution left them in master.

Subsequent changes on master started using these variables
so they're being brought back.

Change-Id: Ic8f3c295130c47eb0d66057880f9d4f70c89af94
2014-04-01 13:13:13 +01:00
Nicolas Geoffray
ed154c3ba6 Use debug versions of dex2oat explicitly.
Change-Id: Ie7c238908a5739af752a08fec1a04914026a8f96
2014-04-01 08:43:26 +01:00
Daniel Leung
625974cf2a Add intel to the vendor whitelist
Change-Id: I91d6ff72629523050b4f26c2d731cac90ef49348
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
Reviewed-by: Jovanovic, Radivoje <radivoje.jovanovic@intel.com>
Reviewed-by: Boie, Andrew P <andrew.p.boie@intel.com>
Reviewed-by: Kumar-mayernik, Nisha <nisha.kumar-mayernik@intel.com>
Reviewed-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
Tested-by: Gumbel, Matthew K <matthew.k.gumbel@intel.com>
2014-04-01 10:38:12 +08:00
Ying Wang
b34af41e57 Merge "Fix java version detection when _JAVA_OPTIONS is set." 2014-03-31 23:53:52 +00:00
Peter Ammon
bb406bf4c0 Fix java version detection when _JAVA_OPTIONS is set.
_JAVA_OPTIONS is an environment variable that
can be used to affect the behavior of java and javac.
It is currently required to get Android to build on
some configurations, where the default Java heap size
is too small. Unfortunately, if _JAVA_OPTIONS is set,
both java and javac will output its value to the console
as the first line on every invocation, including trivial
ones like java -version. This will confuse main.mk’s
version detection, which only looks at the first line of
output. Tweak the version detection to run grep before
head, so that the _JAVA_OPTIONS line is filtered by the grep.

Change-Id: I69aee52b56d27711b7d3087ec6b3ebab07ffc3af
2014-03-31 15:36:02 -07:00
Christopher Ferris
0c4870a4cd Merge "Specify -mcpu=cortex-a15 for denver CPU variants." 2014-03-31 19:06:28 +00:00