Do not link libc++.so statically on device.

If fuzzer coverage sanitized shared libraries are not deployed - we shouldn't
break users during dynamic link time. I need to think more about how we
should solve this problem in earnest, but for now let's just disable
static linkage of libc++ on device.

Bug: 142671952
Test: Cherrypick ag/9550833 and ag/9544155, make and run the fuzz target
there.

Change-Id: I39dfd6ba314e7a610ef3f0b30f35383a5e3a1e4b
This commit is contained in:
Mitch Phillips
2019-10-14 16:40:26 -07:00
parent 5ffade1efb
commit 302f964aa0

View File

@@ -148,10 +148,14 @@ func NewFuzz(hod android.HostOrDeviceSupported) *Module {
// include the STL.
android.AddLoadHook(module, func(ctx android.LoadHookContext) {
staticStlLinkage := struct {
Stl *string
Target struct {
Linux_glibc struct {
Stl *string
}
}
}{}
staticStlLinkage.Stl = proptools.StringPtr("libc++_static")
staticStlLinkage.Target.Linux_glibc.Stl = proptools.StringPtr("libc++_static")
ctx.AppendProperties(&staticStlLinkage)
})