summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mitch Phillips <mitchp@google.com> 2019-10-14 16:40:26 -0700
committer Mitch Phillips <mitchp@google.com> 2019-10-14 18:35:17 -0700
commit302f964aa05f3b1e29a00cbce08b5d83b480c581 (patch)
treea30fd2d2d22b1a13c90439e435640bd8fc6f98a3
parent5ffade1efbff770215d055cc36932f088e0a4d99 (diff)
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
-rw-r--r--cc/fuzz.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/cc/fuzz.go b/cc/fuzz.go
index c19fdc5b0..b8b9c7140 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -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)
})