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
diff --git a/cc/fuzz.go b/cc/fuzz.go
index c19fdc5..b8b9c71 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -148,10 +148,14 @@
// 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)
})