Traditionally this has come from android/api-level.h, but with the
libc headers unified it must be set by the build system since we don't
have per-API level copies of that header now.
Test: make checkbuild with other libc ndk_library patches
Change-Id: Idf6cbba131f065b048b1b412e992c55e3d17e701
Only projects in LOCAL_CLANG_EXCEPTION_PROJECTS can set LOCAL_CLANG to false.
Add external/gentoo/integration to this white list.
Bug: 30575506
Change-Id: Icd508686bc2eb8b9d400200166df80115af20da1
Test: build and find new warning in build.log
Any NDK shared libraries not in LOCAL_SYSTEM_SHARED_LIBRARIES weren't
being pulled from the generated libs before since we were only
filtering my_system_shared_libraries and even if we had filtered
my_shared_libraries they would have been rewritten to my_ldlibs.
* Filter my_shared_libraries for NDK generated libs as well.
* Stop rewriting NDK LOCAL_SHARED_LIBRARIES to my_ldlibs. Instead,
rewrite in the opposite direction just like we do for the platform.
* Move shared libs/ldlibs rewriting to before we filter NDK
libraries out of shared libs/system shared libs.
Test: make checkbuild
Bug: http://b/27533932
Change-Id: If1860d9638de77089a46884f406766edaf362216
* LOCAL_CLANG_EXCEPTION_PROJECTS is the list of project prefixes.
* New warning message is detected by warn.py as high severity.
Bug: 30575506
Change-Id: I87a38b2ba6bab1d2e5e7a9d5ec9557f0e609727c
Test: build and find new warning in build.log
AUX is a new class, similar to TARGET
While TARGET defines toolchain for Application Processors
AUX is defining toolchains for arbitrary utility cores (DSPs, GPUs,
MCUs, etc). This allows building of non-android sources as part
of Android tree and avoid using prebuilts if source code is avaliable
Bug: 29635686
Change-Id: Ie755ea054b16c3e86369f5fb2ba6eb0b384af77f
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
introduce LOCAL_NO_LIBCOMPILER_RT
embedded targets do not necessarily want to have it
Bug: 29635686
Change-Id: Ieb04f7ea7237ae01a067dedfa2fb13571e9a789c
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
When overriding toolchain with LOCAL_CC, LOCAL_CXX
build system shall not assume that this custom toolchain
is CLANG.
Bug: 29635686
Change-Id: I9712d098216740c4ff20bd2a4749f489af85b50e
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
on some toolchains and architectures building non-PIC
code renders more efficient assembly
Bug: 29635686
Change-Id: I6274f40d24e1bb43f03b45c60b5487abed02b7fc
Signed-off-by: Alexey Polyudov <apolyudov@google.com>
The list of libraries is currently empty. Will add migrated libraries
in a follow up patch.
Test: Still builds.
Bug: http://b/27533932
Change-Id: Ibd9750620ca2ae86fe888a8a993bd26493bc1c8a
Split the variables that contain header directories into ones that
should be prefixed with -isystem and ones that should be prefixed with
-I in preparation for moving some headers from -isystem to -I.
Add $(wildcard) around SRC_HEADERS to match the soong behavior, and move
users of SRC_HEADERS from config.mk to binary.mk so that the exported
soong value is present.
Test: no changes to build.ninja compile rules
Change-Id: Iadecbbf4351a01e53cb57e721d31f4f836bb82d9
Refactor includes in transform-*-to-o to simplify future changes to the
default include paths.
Test: whitespace-only changes to the compile rules in build.ninja
Change-Id: I766af1f22a4838d933691b6df37530db3ba4e21d
All instances of this have been removed from the downstream trees. The
APK->JNI_SHARED_LIBRARY and Java->Java checks remain as warnings.
Change-Id: I3eaee284500deee0f26a4f9cdd96497e99ec533e
All instances have disappeared from the build server, so switch this to
error before more turn up.
Change-Id: Iac07526a6e77ebf33733033249f2a108aae3fa7d
Modules built against the NDK should only link against modules also
built against the NDK (or link to the NDK prebuilts). This patch
attempts to catch these cases, and prints a large warning when this is
violated. Once the tree is cleaned up, this will change to an error.
Change-Id: Ib6ffcc38d9161abdbe45a58af26ba429fb6f1876
LOCAL_LDLIBS was the only correct way to use NDK libraries, but few used
it correctly. It also often got confused with LOCAL_LDFLAGS, so move the
flags to the correct variable.
For binaries that weren't using the NDK (empty LOCAL_SDK_VERSION), it
was never valid to use LOCAL_LDLIBS, as dependencies would not be
properly set up, and could lead to random build failures. So convert any
-l linker flags to using LOCAL_SHARED_LIBRARIES automatically.
For binaries built using the NDK (LOCAL_SDK_VERSION set), they were
required to use LOCAL_LDLIBS for prebuilt NDK libraries, otherwise they
would get headers and dependencies to the platform versions. Any
non-prebuilt LOCAL_LDLIBS would miss dependencies. So move the NDK
prebuilt libraries to LDLIBS from SHARED_LIBRARIES, and move everything
else to SHARED_LIBRARIES.
So now, for device modules, LOCAL_SHARED_LIBRARIES should always be
used, and we'll do the right thing. LOCAL_LDLIBS should only be used for
host libraries from the system.
Change-Id: Ide34c7afdcfb6507a378d45a42471729e489a9e0
To make the build hermetic, all include files should be located within
the source tree (or generated as output).
There was an Android.mk that was adding /usr/include to its include
path.
Change-Id: I4c40b908314239c8239c7835d592e409248a3150
Host native tests have been getting installed into
out/host/linux-x86/bin/..., but this pollutes the bin directory with a
lot of poorly named tests. Also, to support 32-bit and 64-bit tests, we
need to have different names with different suffixes. This causes
problems when tests expect to be named something specific (like gtest).
It's also convenient to store test data next to the test itself.
So with this change, native tests will be installed in
out/host/linux-x86/nativetest[64]/$(LOCAL_MODULE)/$(LOCAL_MODULE_STEM)
just like target tests get installed into /data/nativetest[64].
Implement this using a new NATIVE_TESTS class, which is like
EXECUTABLES, but sets up the install path differently, and configures
the rpath to load shared libraries with the proper relative path.
LOCAL_MODULE_RELATIVE_PATH can be used to control the directory name, it
will default to $(LOCAL_MODULE). This way multiple related tests can be
grouped together.
Target native tests also use NATIVE_TESTS now, but nothing should change
other than LOCAL_MODULE_RELATIVE_PATH can be used.
Change-Id: I535e42b1a6b21c5b8d6a580aa2f944d2be35e27d