Commit Graph

10 Commits

Author SHA1 Message Date
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