Required for getting ART with valgrind on device working since
valgrind maps things in the 0x60000000 address range.
Bug: 13323732
Change-Id: I05efdbf3fe5acd1418e1d4ced5844154fb4c5d37
- external/chromium now compiles
- stagefright codecs now compile.
- frameworks/base now compiles.
Change-Id: I1226b79cd3e0b5e2fd786bb506e022b47fe5e264
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
Now we have enabled arm64 clang.
This change remvoed arm64 clang build warning and cleaned the
arm64 unknow c flags.
Change-Id: Ia583a78c6d364e603ff09df423aa34a6e03d0b9b
This isn't the same as chromium_org (which is used by the
webview). This is a 3 year old snapshot of the net stack which
compiles under 64 bit. It's currently used on aosp master by
libstagefright_chromium_http.
This project can be removed if the changes that remove the
chromium dependency are cherry-picked to aosp/master.
Change-Id: I5d0f9ed03ea9842b47d980d77ea32bc7a3f6998f
Previously HOST_TOOLCHAIN_PREFIX can't accept toolchain in arch-os-*-gcc
format. Fix it so we can try out new host toolchain, eg.
HOST_TOOLCHAIN_PREFIX=prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/bin/x86_64-linux- make
Change-Id: Ic1092593036c41d5471e788654fb4e0991dd7e40
Depending on the file extension of the generated C++ file,
bison will generate a #include of a .h or .hpp. So both files
must be kept in the generated directory.
Change-Id: Id0aac7f407bdc69c7f5012c0d021761b0fceb427
Analyzer needed by WITH_STATIC_ANALYZER and WITH_SYNTAX_CHECK is
moved from prebuilts/clang/{linux-x86,darwin-x86}/host/3.3 to
prebuilts/misc/{linux-x86,darwin-x86}/analyzer
See https://android-review.googlesource.com/#/c/83852/
BUG=13243591
Usage:
"WITH_SYNTAX_CHECK=1 make ..." instructs build system to invoke "clang -fsyntax-only"
to utilize clang's better diagnostics before calling LOCAL_CC/LOCAL_CXX for code generation.
The compilation time is slightly longer, and the generated object file should be the same as
w/o WITH_SYNTAX_CHECK
"WITH_STATIC_ANALYZER=1 m/mm/mmm/mma/mmma ..." instructs build system to run static
analyzer via "clang --analyze" on a successful build. If analyzer finds any issue, instruction
to open report is displayed. See http://clang-analyzer.llvm.org/scan-build.html for details.
WITH_STATIC_ANALYZER trumps WITH_SYNTAX_CHECK if both exist. Project use lots of GCC extensions
(eg. nested function) not supported by clang may opt out by adding LOCAL_NO_STATIC_ANALYZER:=true
Change-Id: Ib3dda3ffb0fd3aaf2eadec867a966d1dd2868fb1
- external/skia now builds on arm64, frameworks/base/libs/hwui
depends on it.
- external/bluetooth/bluedroid builds on 64 bit, though there
isn't any obvious way to test it without real hardware.
- frameworks/ml now builds, as does external/srec
- frameworks/opt, frameworks/ex and frameworks/wilhelm don't
build because of their dependency on frameworks/av.
frameworks/av should probably be dropped out of the blacklist
and replaced by individual markers on targets that we want
for 64 bit (we don't want all of them for arm64).
Change-Id: I9735108840fcba21ac8918bedf0d6de8989de086
This is until aosp gets the latest libpcap+tcpdump currently only on internal.
This reverts commit 5c68e265ac.
Change-Id: If6a990c72cb3a8d699cf0881f7d5fb8b725fdf2e
Include apps that appear under /system/priv-app
to also be included with the zip of all the apps.
Change-Id: If4687cf4c471877f11d78b68bad96f1842e49d87
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
Also we don't need to include module_arch_supported.mk again, if we are
currently substituting the source build with LOCAL_PREBUILT_MODULE_FILE.
Change-Id: I444b0397d74c3153b398a050b762e49418062a86
We'll probably remove external/oprofile soon, but this gets us closer
to being able to turn on an x86_64 continuous build in the meantime.
Change-Id: Ic1d5331d41dafee9ffed222dc332afed2d4ae356
So a library can export the proto's include path that can be used with
both archs in multilib build.
Change-Id: Ia0f92f0b40e39dc3fa426c69c52139a0a8f04077
For host executables and shared libraries, the global LDFLAGS were being
inserted into the linker command line after the module-specific ones,
making it impossible to override the default settings. Change the order
to match target linker invocations.
Change-Id: Icd5f6f83df9f27a5be97ddb197ee245c1ab8c2be
This makes sure copy_headers.mk only be included onces, no matter
it's for the 1st arch or the 2nd arch.
Change-Id: I80a558fbdb52861f176bd27a21c302069a5cc3ce
It seems the code was meant to add the toolchain to ANDROID_BUILD_PATHS
and then export to PATH by lunch.
But now we export the toolchain to PATH explicitly in envsetup.sh and
the code is unnecessary.
This reduces the places to change when we upgrade the gcc version.
It also fixed the bug that the mips toolchain was always exported
regardless of the target arch.
Change-Id: Iee3b895b4c4e0df8971c27c01b9ecbd591848b12
Fix several wrongly configured tests that were either
looking for tests in the wrong jar (apache-harmony-tests
instead of core-tests) or using the wrong prefix.
Also, this change creates subsets of the harmony tests based
on subpackage names (java.net, java.io, java.nio etc.) instead
of the earlier harmony groupings.
Change-Id: Iea0e20d23512611d1aac92b2f8219031b6396c77
Prebuilts often support only a single architecture, allow them to
use LOCAL_MODULE_TARGET_ARCH to specify it.
Change-Id: I2514f66f682ef267bbf1a1ab78510faff0a18b64
The LOCAL_*_$(TARGET_ARCH) variables don't make sense for host
modules, only append use them for target modules.
Also complete the list of LOCAL_*_arch and LOCAL_*_32/64 to be
consistent.
Change-Id: I00c83e5c4e08ed9a844f9f99a79ce4bcc3f0bf11
combo/TARGET_x86*.mk mistakenly added TARGET_GLOBAL_CFLAGS to their
linker command lines. This results in clang builds not working properly,
since they strip some unknown flags from TARGET_GLOBAL_CFLAGS.
Change-Id: I60a1ff5df70305323134435e4ae107ea7acfe8ea
Add four new variables for module makefiles:
LOCAL_MODULE_TARGET_ARCH specifies that a module is only supported for
one or more architectures. Any architecture not in the list will be
not attempt to build the module. The expected use case is prebuilts
that are only suitable for a single architecture, or modules like llvm
that need per-architecture support.
LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH specifies that a module cannot be
built for one or more architectures.
LOCAL_MODULE_TARGET_ARCH_WARN and LOCAL_MODULE_UNSUPPORTED_TARGET_ARCH_WARN
are the same, but warn that the arch is not supported, which is useful
for modules that are critical but not yet working.
The logic for whether or not to build an architecture is fairly
complicated, so this patch consolidates it into module_arch_supported.mk
Change-Id: I120caf4a375f484e1fd6017b60c2f53882ae01e6
-- Added TARGET_PREFER_32_BIT, which sets LOCAL_32_BIT_ONLY for an
executable, if LOCAL_NO_2ND_ARCH is not true.
Name resolving in 64-bit multilib build:
-- Name resolving in PRODUCT_PACKAGES:
foo:32 resolves to foo_32;
foo:64 resolves to foo;
foo resolves to both foo and foo_32 (if foo_32 is defined).
-- Name resolving for LOCAL_REQUIRED_MODULES:
If a module is built for 2nd arch, its required module resolves to
32-bit variant, if it exits;
Otherwise for executable and shared library, a required module
resolves to the default 64-bit variant; for other module classes,
required module foo resolves to both foo and foo_32 (if foo_32 is
defined)
Bug: 12898862
Change-Id: I5fda1a77f58814097b10b5ad2743ee25adfaecc4
1. Following the setup of gcc in build/core/combo/,
we added the [HOST|TARGET]_<arch>.mk clang config files,
and load only the configs needed by the current product.
2. Added support for the 2nd arch.
Change-Id: I2a383418a9688a050b39492f8e489d40eeeb5f2d
I don't think we can realistically turn this on for 32-bit builds any
time soon.
Also, fix the arm64 stack-protector hack.
Change-Id: Ie1e7c875bbc06fb21bb372b8ca99879a23ef53d4
Users of ARCH_ARM_* defines don't care about first vs. second arch,
set ARCH_ARM_* regardless of which arch is arm.
Change-Id: I2ae83ec5c3f839ff91a0e352c95d76ec2cbd5dc5
2ND_TARGET_DEPENDENCIES_ON_SHARED_LIBRARIES was not set,
which was causing the later += to act like = instead of
:=, and the dependencies would disappear as soon as
LOCAL_MODULE was cleared.
Change-Id: Idea291524fc06377deafec62f37d20eaa7f93bca
For whatever reason, two modules may have the same file as their
installed module. In that case circular dependency is created if the two
modules have requited-by relation.
Change-Id: I15ed271ca3f3c343e4662182ded5ccc63d6c42cc
Support the following new variables based on whether the current multilib
target is 32 bit or 64 bit:
LOCAL_CFLAGS_32
LOCAL_CFLAGS_64
LOCAL_LDFLAGS_32
LOCAL_LDFLAGS_64
LOCAL_ASFLAGS_32
LOCAL_ASFLAGS_64
LOCAL_C_INCLUDES_32
LOCAL_C_INCLUDES_64
Change-Id: Ia868d56dff114be301bf8297eec768675f186927
Host gtests that don't use pthreads themselves need to be linked
against libpthread because gtest itself uses pthreads to ensure
thread-safety. (It can't know in advance whether the code under
test is going to spin up threads, so it has to be pessimistic.)
Change-Id: I14fb1098c163d7fe6ae9a9a0314acead4ec9383d
arm and arm64 have distinct headers, but mips and mip64, and x86 and x86_64
use headers that work for both widths. So where arm/arm64 need to handle the
second architecture case specially, all we need to do for the others is
hard-code the name. (x86_64.mk already hard-codes x86; we need to change
x86.mk for the case where we're building the 32-bit binaries for a mixed
system. mips64.mk doesn't exist yet, but when it does, it'll hard-code
just plain "mips" too.)
Change-Id: Ia6b9f77b4eb2c78729b454045875c409e0ea8197
To ease the transition between toolchains, allow a target to specify
a list of cflags that the toolchain does not support. These will be
filtered out of the cflags provided by the module.
Add TARGET_GLOBAL_UNSUPPORTED_CFLAGS := -fstack-protector for the
aarch64 toolchain, it does not yet suport -fstack-protector.
Change-Id: I168d0c6f131326fad305ec86fad46e6a3e03295a
This should never have been on the default include path.
The NDK statically links its own libthread_db, so I'm removing
bionic's unused copy from devices.
Bug: 11882807
Change-Id: I49a67fe0902cc4bc178360f6c993959774d74e3a
Allow modules to generate source into $OUT/gen, which will then
be copied into $OUT/obj and $OUT/obj_$(TARGET_2ND_ARCH) as
necessary. This allows a single build rule invocation that includes
generated source to build for the first and second architectures.
Modules will need to change calls to local-intermediates-dir into
local-generated-sources-dir.
Change-Id: I62504bad9454b3d9fde7b84ab9f0a487a2ecf0bf
Using LOCAL_MODULE_PATH in a shared library module while building a
multiarch target will cause build rules for both architectures to install
into the same path. Warn and suggest LOCAL_MODULE_RELATIVE_PATH.
Change-Id: I16208ccada6d43a26a342af35096f49d8df26e81
Most users of LOCAL_MODULE_PATH are setting a subdirectory of the
normal install path, for example to install HALs into system/lib/hw.
This is problematic for multiarch builds, where the install location
depends on the arch. Allow modules to specify LOCAL_MODULE_RELATIVE_PATH.
HALs will generally use:
LOCAL_MODULE_RELATIVE_PATH := hw
Change-Id: I4e4ceec61d026bbe74ba604554c06104bde42e5e
We have no rigorous way to detect whether the code referenced for this
mechanism changes in between builds. So declare this as a phony target
so that it is rebuilt every time.
Change-Id: Ie1670d96895719d406e7b0defd53ba3cd224dd83
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Print the name of the module that is providing an unhandled install
path.
Change-Id: I0e8b02f01de1dde715f0985034ad943f793218ba
Conflicts:
core/base_rules.mk
Set arm_objects_mode and normal_objects_mode when building a
module for arm when it is the 2nd arch.
Change-Id: I5f7df519b6e1dde6cbf92d106681f07a58e1f1f2
Compiling for arm requires using the arm kernel headers and not
the aarch64 kernel headers. Add $(combo_2nd_arch_prefix) to get
asm-$(TARGET_2ND_ARCH) when arm is the 2nd arch.
Change-Id: I15270d0ef35e48c034bf4d0d5e35b76f67b2a8e1
With those variables, you can set up different values for TARGET_ARCH
and TARGET_2ND_ARCH.
Also fixed a couple of variables.
Bug: 11654773
Change-Id: I4c7684a562cd5877d18f67d4f848b8df07d0103b
Conflicts:
core/base_rules.mk
By default, an executable is built for TARGET_ARCH.
To build it for TARGET_2ND_ARCH in a 64bit product, use:
LOCAL_32BIT_ONLY := true
To skip a module for TARGET_2ND_ARCH, use:
LOCAL_NO_2ND_ARCH := true
Bug: 11654773
Change-Id: Ieb293d25b21024bfe1b554044df338e064ac7b46
The rules for the 2nd arch are set up in the second inclusion
of shared_library_internal.mk.
Intermediate fils of libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/SHARED_LIBRARIES/libfoo_intermediates/
and the built libfoo.so will be in
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/lib.
Bug: 11654773
Change-Id: I58bbe5a05a65f63bce6279131552f3792000716e
The rules for the 2nd arch are set up in the second inclusion
of static_library_internal.mk.
libfoo of the 2nd arch will be built into
$(PRODUCT_OUT)/obj_$(TARGET_2ND_ARCH)/libfoo_intermediates/libfoo.a.
Bug: 11654773
Change-Id: I1d92733968fc442e9225b4df5bd1b551a81d89f7
This is the first step to build 32-bit libraries in a 64-bit product.
It will work like this:
1) In the product's BoardConfig.mk, define:
TARGET_2ND_ARCH, TARGET_2ND_ARCH_VARIANT, TARGET_2ND_CPU_VARIANT.
The build system uses those variables to set up an additional compiler
environment for the second arch.
2) When parsing Android.mks, the build system sets up rules to build a
module for both the 1st arch and the 2nd arch, unless it's explicitly
asked to skip so.
Android.mk will be adapted if there is additional rule of generating
source files.
The build system will accept arch-specific LOCAL_ variables, such as
LOCAL_CFLAGS_arm, LOCAL_CFLAGS_armv7-a-neon, LOCAL_CFLAGS_cortex-a15,
LOCAL_CFLAGS_aarch64 etc. Modules use such variables to set up build for
various archs at the same time.
3) Install binary of the 2nd arch by adding "<module_name>:32" to
PRODUCT_PACKAGES. All 2nd-arch libraries linked in by "<module_name>:32"
will be installed automatically.
Bug: 11654773
Change-Id: I2df63cd5463a07bf5358bee2a109f8fb9590fe30
Conflicts:
core/combo/TARGET_linux-arm.mk
PRODUCT_COPY_FILES entries can include the src:dest:owner
syntax versus src:dest. This causes the filter to miss
certain cases. Instead use the word-colon function to
grab the dest regardless of syntax.
Change-Id: I1f4e57a236c1db148bada0cfe5bd1e87bb1194d6
Signed-off-by: rpcraig <rpcraig@tycho.ncsc.mil>
/system/lib always contains 32-bit libraries, and /system/lib64 (if
present) always contains 64-bit libraries.
Move things around a little bit, so TARGET_ARCH can be used to define
the build paths.
Bug: 11654773
Change-Id: I2edd91e162c7a20d7719d7bae15e5fa6c2a5b498
This makes it easier for OEMs to extend the PRODUCT_BOOT_JARS in their
product configuration files.
Change-Id: I5feca2f808b1914c275f28c7a4c38cca2ba6851f
Because a library or app can be built from mere static libraries,
or generated java files. For example, framework is built from only
static library framework-base but without LOCAL_SRC_FILES.
Also added framework2 to PRODUCT_PACKAGES.
Previously framework2.jar was installed by dependency explicitly
established in frameworks/base/Android.mk. That's not enough for the
.odex file.
This fixed the boot failure reported in bug 12382916.
Bug: 12382916
Change-Id: If1a70261ab2bb7fef77cf7b7b995bdc029be0fc3
_LARGEFILE_SOURCE should never be defined with bionic.
_FILE_OFFSET_BITS should be 64 on 64-bit architectures.
Change-Id: I7acf6b39a3af7782d5d7ad00f709593d96fa8522
Also this fixes the LOCAL_UNSTRIPPED_PATH if the module is installed to
the vendor dir via LOCAL_PROPRIETARY_MODULE.
Bug: 11289169
Change-Id: Ib07e5761411210963076487fe0e148c259e1e082
All thumb code compiles with -fno-strict-aliasing. Let's not make aarch64
porting any more difficult than it needs to be.
Change-Id: I94874df1217b69532c328d7c86c9961631ebde8a
Compile all host programs for Android with -fPIE and -pie. This
enables PIE (Position Independent Executables), which helps
protect these applications from exploitation due to memory
management bugs.
Note: PIE *static* executables are not supported at this time. darwin
and windows are also not supported.
Change-Id: I67c1be297711ea23064c349f97ebd02eef3eff09
Once the aarch64 toolchain is refreshed this will be removed.
Also removed some CFLAG duplications.
Change-Id: I42fd86931263af82042ea696196fb25e948fe9cb
Add -Wa,--noexecstack and -Wl,-z,noexecstack as default
flags when compiling host-side applications. This enables
NX protections, which prevent code from executing on the
stack or heap. NX protections make exploiting memory
corruption issues more challenging and is an important
security feature.
Change-Id: Iae580abe887e01f9029ec2a4e0fc0aae496724a4
- Separate SDK checking from version checking and
make messages clearer.
- Add explicit source & target versions for javac to
make things clearer.
- Rename flag from EXPERIMENTAL_USE_JAVA7_OPENJDK to
EXPERIMENTAL_USE_JAVA7.
- Allow Oracle JDK 1.7 to be used on Mac OS, since there's
no official OpenJDK support for that platform.
Change-Id: I454d2c917ed78f03ec7559a99659fefe7e7d50f3
find-files-in-subdirs uses utility find to find given files in the given
subdirs. This function uses $(1), instead of LOCAL_PATH as the base.
Change-Id: Ib76631c97acd257d651a580cbad767606874f5d0
This enables the .so libraries to be built for apps using the
RenderScript support library. Traditionally, we trim these .so
files from full platform builds.
Change-Id: I6f8e9b8d2b671338d3d5a5ac0bfcc60fd448688b