Commit graph

13 commits

Author SHA1 Message Date
dimitry
0726be3d62 Enable native_bridge_support for libsync
Android build system added support for building translated binaries
used on natively bridged targets (arm on x86 for example).

However in order to avoid building unnecessary binaries and libraries
for such architectures most modules do not support native bridge by default.

All needed modules have to explicitly indicate if they may be used as part
of translated binary build.

This change enabled native bridge support for libsync because it is a
public library.

Bug: http://b/77159578
Test: make
Change-Id: I993384469fa2b011a15a2ecb1fd2162184c74a47
2019-05-15 12:40:33 +02:00
Tao Bao
f32d3df46f Merge libsync_recovery rules into libsync.
Statically linking against libsync is no longer a concern, since libsync
has supported the modern sync ABI (which is frozen upstream) after the
recent cleanup works.

Test: `m dist` with aosp_taimen-userdebug
Change-Id: Ic162bc7ff7c9dd306658d11d4b71e2d18730a2ee
2018-08-07 11:00:50 -07:00
Jerry Zhang
9b66330375 Make libadf, libsync_recovery recovery_available.
Bug: 110380063
Test: `m dist` with aosp_taimen-userdebug
Change-Id: Ie3543ff89b6b4f0de04eff0f85f8001f4b27d86a
2018-08-07 10:53:07 -07:00
Jesse Hall
2576a439e6 Remove obsolete sync_test.c
Tests in this file depends on long out-of-date behavior of the sync
api. More current tests are in tests/sync_test.cpp.

Test: quis custodiet ipsos custodes?
Change-Id: Ia0a0970dde17c1ae4e1d79fac1a9fe3b54e8fcd6
2018-05-23 16:45:48 -07:00
Jiyong Park
b87f884b99 Mark libsync as LL-NDK
libsync is used both by platform (e.g. libui.so) and by same-process
HALs (e.g. android.hardware.graphics.mapper@2.0-impl.so). Therefore it
is eligible for either VNDK-SP or LL-NDK. Among the two choices, LL-NDK
was selected because it is already an NDK and is just a thin wrapper
around a few kernel ioctls.

However, since libui (which is a vendor_available:true library) is using
more symbols that are not available to NDK clients, the extra symbols
are exposed as # vndk tag so that they are only available to VNDK
clients, but not to NDK clients.

Bug: 63866913
Test: BOARD_VNDK_VERSION=current m -j successful (2017 pixel)
Test: the built image is bootable
Merged-In: I60f883c049bd9b4562e6ce34d34ead47ba28af5f
Change-Id: I60f883c049bd9b4562e6ce34d34ead47ba28af5f
(cherry picked from commit 058e0919f6)
2017-09-15 00:33:52 +00:00
Lennart Wieboldt
f7b315c985 Merge "Remove LOCAL_CLANG and clang: true"
am: 80ec81cf4b

Change-Id: Ia7f79d8e25ee9870fe44d198568d0e5dabdff811
2017-07-25 22:28:56 +00:00
Lennart Wieboldt
cd15fc7ba8 Remove LOCAL_CLANG and clang: true
clang is the default compiler since Android nougat

Test: mma & verified it´s still build with clang
Change-Id: I34adaeef2f6558a09f26027271222bad94780507
Signed-off-by: Lennart Wieboldt <lennart.1997@gmx.de>
2017-07-25 14:29:50 +02:00
Steven Moreland
9990de1f64 libsync: 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: 33241851
Test: build and flash internal marlin
Test: m -j libsync
Test: build with BOARD_VNDK_VERSION := current
(cherry picked from commit d0b26edf30)
Merged-In: I5b23d2c1f41b842e5a9b7ea257921133b80c3f98
Change-Id: I5b23d2c1f41b842e5a9b7ea257921133b80c3f98
2017-04-19 10:32:51 -07:00
Steven Moreland
d0b26edf30 libsync: 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: 33241851
Test: build and flash internal marlin
Test: m -j libsync
Test: build with BOARD_VNDK_VERSION := current
Change-Id: I5b23d2c1f41b842e5a9b7ea257921133b80c3f98
2017-04-13 23:28:39 -07:00
Steven Moreland
db9b260096 Remove .(ll)ndk suffix from (ll)ndk_library
Soong handles these automatically now.

Bug: 33241851
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
Change-Id: Ia039812817495c00e450eec7292447d5e8f93adb
2017-04-10 12:58:03 -07:00
Jesse Hall
081806e5f2 sync: Add NDK sync.h and libsync
The new header provides an updated interface to libsync appropriate
for the NDK. Clients use existing syscalls where possible (e.g. poll()
instead of sync_wait()), and the remaining functions return structures
used in mainline Linux kernels rather than the Android staging sync
framework.

Over time, framework clients will be migrated to using the NDK
interface, which will eventually replace the current internal
interface. The only difference is the header will be named
<android/sync.h> in the NDK and <sync/sync.h> internally.

Bug: 35138793
Test: sync-unit-tests on bullhead
Change-Id: Ieb3649b80565393e26b604416158438d32c2a256
2017-02-23 18:44:50 -08:00
Elliott Hughes
36e0d390a2 Rely on the platform -std default.
Bug: http://b/32019064
Test: builds
Change-Id: I18a1d816d63b64601485045070851f32d44e85eb
2016-10-10 14:31:12 -07:00
Dan Willemsen
194edf772e Convert to Android.bp
See build/soong/README.md for more information.

I tested the following tests on a Nexus9 and linux host, and they
continued to pass:

/data/nativetest{,64}/bootstat_tests/bootstat_tests
out/host/linux-x86/bin/nativetest{,64}/bootstat_tests/bootstat_tests
/data/nativetest64/memunreachable_test/memunreachable_test
out/host/linux-x86/bin/nativetest{,64}/memunreachable_test/memunreachable_test

These continue to fail just like before this change:

/data/nativetest{,64}/sync_test/sync_test (was /system/bin/sync_test)
/data/nativetest{,64}/sync-unit-test/sync-unit-test
/data/nativetest/memunreachable_test/memunreachable_test

Test: See above
Change-Id: I691e564e0cf008dd363e3746223b153d712e024d
2016-08-26 16:19:21 -07:00