Certain applications may have their system properties overlaid with the
contents overlaid for appcompat purposes. Init must initialize the
appcompat folder, same as it does the standard folder.
Bug: 291814949
Test: manual
Change-Id: I6d239e0a10a1c81a05d4121e5fc2c41da5b3dbc4
Merged-In: I0c6a0f66dc543c6e861bc86a417e4feb5ecd7789
libpropertyinfoparser is a dependency of libc, and so cannot use the
default system_shared_libs that includes libc. It's not a dependency
of musl's libc though, and it needs to use musl's libc headers,
not the bionic libc headers provided by the libc_headers module. Move
system_shared_libs and libc_headers into a target.bionic clause.
Bug: 190084016
Test: m USE_HOST_MUSL=true
Change-Id: Ie1f908c02fc69ae7d46b10e2fdb5dafbc3ad8557
None of them are necessary, and it's more intention-revealing to say
`c++2a` or whatever anyway.
Test: treehugger
Change-Id: Ie1df26499d160d6fc757d17fcb0121997bda14f9
Enable native bridge support for libbase, liblog,
libziparchive and libpropertyinfoparser.
This makes it possible to use them in binaries for translated
architectures.
Bug: http://b/77159578
Test: make
Change-Id: If67ce92288b17a052ea1e79a268e284f7d941439
This commit adds `libc_headers` to `header_libs` for
`libpropertyinfoparser`. Before this commit, `libpropertyinfoparser`
relies on `libc` that are silently added to `system_shared_libs`. This
will no longer work if the build system always respects the
`system_shared_libs` that are specified in `Android.bp`. Thus, we
should depend on `libc_headers` instead.
Bug: 123006819
Test: make checkbuild
Change-Id: I2d416c6db7f42f12ad20d98f4048753254f5e0b6
It was discovered that we were building some objects inconsistently due
to an optimization in cc_library to only build objects once and use them
for both the static and shared libraries. But static libraries didn't
get system_shared_libs set automatically, and we didn't notice that we
would have built the objects differently.
So static libraries now get the default system_shared_libs, we allow
adjusting that for static vs shared in a cc_library, and we disable the
optimization if the linked libraries are configured differently between
static and shared in a single cc_library.
This triggers dependency cycles for static libraries that libc/libdl
use, so fix those cycles here.
Test: treehugger
Change-Id: I6ec2ea45292b602d5c506560de8b8d6ae725be6f
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: Ie59155c08890e96ce1893fa3687afcf763d7aea3
Add a non-toybox version of getprop, so that we can interface with the
new C++ PropertyInfoAreaFile class to return property context
information.
Bug: 36001741
Test: Compared toolbox getprop results with toybox getprop
Change-Id: I4e90aa5b843cb5cfcbe85f05f23ae8e22729b26e
These are broken on OS X and host linux with the latest clang, so time
to disable this across the board before we hit even more unexpected
breakages.
Test: Boot bullhead
Change-Id: I405f5d96675d20f325853ee29049d80eb009bbd8
Add a non-toybox version of getprop, so that we can interface with the
new C++ PropertyInfoAreaFile class to return property context
information.
Bug: 36001741
Test: Compared toolbox getprop results with toybox getprop
Change-Id: I5f98f9e895d0620a2d9686bc0608490e7d9c3120
This doesn't seem to work. All other projects restrict sanitization,
too.
Mac build not actually tested.
Test: m
Test: linux host build still contains ubsan symbols
Change-Id: I60532a46177632320ba3b15b4a7c2d5e31ef2bfc
It is possible for a match to only contain a context and not a schema,
or vice versa and in this case, the previously matched values should
continue to be used. The serializer already handles this case by
setting the index of the match to ~0u if there is not one, so this
change simply has the parser skip these values.
Bug: 70858511
Test: unit tests, including new ones
Change-Id: Ibc65bd8d637e39f3b1ce7bcc2b88189b75173f88
Currently, we only check if the name of a given node in the trie is a
prefix match and the prefix matches array of the final node. This is
incorrect however, as the prefix matches array of intermediate nodes
may contain the prefix for a given property. This change adds that
check and test cases for this case.
Bug: 36001741
Test: new unit tests
Change-Id: I9f58ebc559f2ac591aa44df9e71205704bf18f66
Currently, whenever a new program starts, libc initializes two data
structures related to properties from the raw property_context files.
There are two problems here,
1) This takes roughly 1.2ms on a trivial program to generate contents
that could otherwise be cached.
2) One of the data structures is a descending list of prefixes, each
of which needs to be checked, whereas a trie would be more
efficient.
This change introduces two libraries,
1) libpropertycontextserializer meant to be used by property_service
to create a serialized trie containing all of the property
contexts.
2) libpropertycontextparser meant to be used by libc's property
functions to parse this serialized trie during property lookup.
This new trie also contains the ability to have exact matches instead
of prefix matches for properties, which was not possible before.
Bug: 36001741
Change-Id: I42324f04c4d995a0e055e9685d79f40393dfca51