Make libdl.so be loaded after libc.so

Make sure that libdl is always after libc on the command line.
Simplifies the logic to always support system_shared_libs for
sdk and vndk builds.

For backwards compatibility without updating lots of Android.bp
files, allow libdl to be listed in shared_libs as long as it
is also in system_shared_libs or libc is not in system_shared_libs.

Remove all the places that libdl is added as a dependency, since
it will always be present unless explicitly removed now.

Bug: 62815515
Test: m -j checkbuild
Change-Id: I0233178ffea87a2f0b82190746022476304a68e2
This commit is contained in:
Colin Cross
2017-08-18 16:52:25 -07:00
committed by Justin Yun
parent 0b062130dc
commit ef88ae2369
3 changed files with 25 additions and 38 deletions

View File

@@ -264,9 +264,6 @@ func (sanitize *sanitize) deps(ctx BaseModuleContext, deps Deps) Deps {
if Bool(sanitize.Properties.Sanitize.Address) {
deps.StaticLibs = append(deps.StaticLibs, asanLibs...)
}
if Bool(sanitize.Properties.Sanitize.Address) || Bool(sanitize.Properties.Sanitize.Thread) {
deps.SharedLibs = append(deps.SharedLibs, "libdl")
}
}
return deps