Commit Graph

19 Commits

Author SHA1 Message Date
Jiyong Park
bfb1424a25 Mark as recovery_available: true
Libraries that are direct or indirect dependencies of modules installed
to recovery partition (e.g. toybox) are marked as recovery_available:
true. This allows a recovery variant of the lib is created when it is
depended by other recovery or recovery_available modules.

Bug: 67916654
Bug: 64960723
Test: m -j
Change-Id: I3dbc481be7ec367530adb57b1f4c92ce4b0db31a
2018-04-27 21:47:53 +09:00
Dan Albert
80bd2e4b23 Adapt to upstream changes.
Test: mma
Test: ./run_tests.py --bitness 64
Bug: None
Change-Id: I2f181c661253dffad5325c92c5fd4c05e741850f
2018-02-08 15:46:30 -08:00
Goran Jakovljevic
98a90189db Revert "Fix mips and mips64 builds."
This reverts commit b5b70be878.

If __unix__ is defined on mips/mips64 (other CL under the same topic),
we will avoid warnings such as:

  * external/libcxx/src/thread.cpp:105:9: error: hardware_concurrency
    not yet implemented

Test: successful build and boot aosp_mips-eng
Test: successful build and boot aosp_mips64-eng
2017-10-18 16:41:58 +02:00
Stephen Hines
b5b70be878 Fix mips and mips64 builds.
MIPS triggers some warnings in libc++ such as:
external/libcxx/src/thread.cpp:105:9: error: hardware_concurrency not yet implemented [-Werror,-W#warnings]

Test: external/clang/build.py
Change-Id: I5ccb4ffe902e29cf74de220f9610da13b1070dc1
2017-10-04 23:29:28 -07:00
Dan Willemsen
8204da4a16 Rename target.linux[_x86[_64]] to target.linux_glibc[_x86[_64]]
In the future, target.linux will apply to all targets running a linux kernel
(android, linux_glibc, linux_bionic). So move all current users to the specific
linux_glibc.

There will be another cleanup pass later that will move some instances back to
target.linux if the properties should be shared with target.android and
target.linux_bionic, but target.linux needs to be removed first.

Test: out/soong/build.ninja identical before/after
Change-Id: Id07a511f47db522d27d18ea906bc086cf2aa51e4
Exempt-From-Owner-Approval: build system cleanup
2017-10-02 10:41:09 -07:00
Chih-Hung Hsieh
c24221d53f Use -Werror in external/libcxx
Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I493445988aecae2cafcc50de23d10bf6dea43b3a
2017-09-29 09:03:46 -07:00
Dan Willemsen
37cf022706 Remove default libraries
libdl is part of system_shared_libs now. -ldl -lpthread -lm are now defaults
for host_ldlibs on Linux and Darwin. -lrt is a default for host_ldlibs on
Linux.

Test: m host
Change-Id: I296fe8b93fdc8edd623381a3983ba26534b45af2
Exempt-From-Owner-Approval: build system cleanup
2017-09-28 17:31:50 -07:00
Lennart Wieboldt
0f0034c24d Remove clang: true
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang

Change-Id: I4d251ac8b0365165653351e254991d4064c74dc4
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-09-10 11:45:34 +02:00
Justin Yun
6e22fc8c73 Mark the module as VNDK or VNDK-SP in Android.bp
As a VNDK/VNDK-SP module, Android.bp must have 'vndk' tag as well
as 'vendor_available: true'.

For a VNDK module, the 'vndk' tag has 'enabled: true'.
It will be installed system/lib(64)/vndk as a vendor variant.

For a VNDK-SP module, the 'vndk' tag has
'support_system_process: true' as well as 'enabled: true'.
It will be installed system/lib(64)/vndk-sp as a vendor variant.

Bug: 63866913
Test: build and boot with BOARD_VNDK_VERSION=current
Merged-In: I8df3b9ec1a867fdbaac8cf348da4cfd56433435b
Change-Id: I8df3b9ec1a867fdbaac8cf348da4cfd56433435b
(cherry picked from commit 82c0df65eb)
2017-08-23 18:02:38 +09:00
Dan Willemsen
4cef24ee3c Mark as vendor_available
By setting vendor_available, the following may become true:

* a prebuilt library from this release may be used at runtime by
  in a later releasse (by vendor code compiled against this release).
  so this library shouldn't depend on runtime state that may change
  in the future.
* this library may be loaded twice into a single process (potentially
  an old version and a newer version). The symbols will be isolated
  using linker namespaces, but this may break assumptions about 1
  library in 1 process (your singletons will run twice).

Background:

This means that these modules may be built and installed twice --
once for the system partition and once for the vendor partition. The
system version will build just like today, and will be used by the
framework components on /system. The vendor version will build
against a reduced set of exports and libraries -- similar to, but
separate from, the NDK. This means that all your dependencies must
also mark vendor_available.

At runtime, /system binaries will load libraries from /system/lib*,
while /vendor binaries will load libraries from /vendor/lib*. There
are some exceptions in both directions -- bionic(libc,etc) and liblog
are always loaded from /system. And SP-HALs (OpenGL, etc) may load
/vendor code into /system processes, but the dependencies of those
libraries will load from /vendor until it reaches a library that's
always on /system. In the SP-HAL case, if both framework and vendor
libraries depend on a library of the same name, both versions will be
loaded, but they will be isolated from each other.

It's possible to compile differently -- reducing your source files,
exporting different include directories, etc. For details see:

https://android-review.googlesource.com/368372

None of this is enabled unless the device opts into the system/vendor
split with BOARD_VNDK_VERSION := current.

Bug: 36426473
Bug: 36079834
Test: Android-aosp_arm.mk is the same before/after
Test: build.ninja is the same before/after
Test: build-aosp_arm.ninja is the same before/after
Test: attempt to compile with BOARD_VNDK_VERSION := current
Change-Id: I5aa9e3463c53a2c13110d6fffb61a2bbc09892f2
2017-04-10 18:14:29 -07:00
Dan Albert
c0ecf33175 Update Android.bp for upstream changes.
Add a new define and a new source file.

Test: mm
Bug: http://b/34740564
Change-Id: I2a924e9f7e8d4d007b7f1119216b85716b97bb71
2017-01-27 16:40:33 -08:00
Dan Willemsen
eab4a7b5f1 Enable libc++ on host bionic
Bug: 31559095
Test: out/soong/build.ninja is identical before/after
Test: Test linux_bionic compile
Change-Id: I01bfee1fd69c2757d541e1c8ffdfa15bcfa846a9
2016-11-28 21:38:32 -08:00
Colin Cross
3b4ee2622b Fix linking libc++ on mac
Darwin seems to have trouble with weak symbols, adding
-Wl,-undefined,dynamic_lookup moves the problem to runtime where it
seems to work.

Test: aidl-cpp builds and starts
Change-Id: Ia8553abd5a9b61ed65dd4b064e57d30ad2418263
2016-11-18 11:32:11 -08:00
Dan Austin
1418e4163d Add compile time define that was missing.
There used to be a check for `__has_include(<cxxabi.h>)`, but it
was removed because it is a clang extension. This adds
-DLIBCXX_BUILDING_LIBCXXABI to the mk and bp files to fix this.

Change-Id: Ife2f93ace8c2766c0140fba88bf74a941ed8e57e
2016-05-24 16:24:42 -07:00
Colin Cross
d605181929 Reenable libc++ host dynamic lib
prebuilts/sdk/tools/.../libc++.so no longer gets installed, so it
doesn't conflict with this definition.

Change-Id: I832aca3898c47ad97b29222c2728cfe2173d56df
2015-12-15 16:08:50 -08:00
Dan Willemsen
e368a1fd04 soong: Use new linker file properties
So that dependencies are set up properly

Change-Id: I027eb0f69d85a8afb40b0bc30719ab47ea6c8874
2015-12-04 15:51:10 -08:00
Colin Cross
47a9376d51 Disable host libcxx.so for apps builds
Change-Id: Ib176923464f1f8c5f414cc5b869c60c3561484a1
2015-12-01 16:32:21 -08:00
Colin Cross
286a75e86e libcxx: Update Android.bp to match Android.mk
Change-Id: Iffe0b0c13a23d15a6cc2c7805fc4f99477e230a4
2015-11-19 14:33:56 -08:00
Dan Willemsen
00e6a4feec Add Android.bp for libc++
Change-Id: I3986c5d28cf5f9e3c6a5aa81862943359f7ed5f6
2015-09-16 14:46:10 -07:00