summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2019-08-23 21:09:52 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-08-23 21:09:52 +0000
commit577d147eb9261defa00d0bb289243e72cfbc820a (patch)
treed7908515e03decdd1b3f721c702a6a1ed9deb149
parent95515641e72af273ffc652b8d530085aefc66aac (diff)
parentd0bd16d9d107a94631c925119e1a091087570951 (diff)
Merge "[cc_fuzz] Statically link libcxx."
-rw-r--r--cc/fuzz.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/cc/fuzz.go b/cc/fuzz.go
index c1754b2da..d44c02de6 100644
--- a/cc/fuzz.go
+++ b/cc/fuzz.go
@@ -17,6 +17,7 @@ package cc
import (
"android/soong/android"
"android/soong/cc/config"
+ "github.com/google/blueprint/proptools"
)
func init() {
@@ -120,5 +121,16 @@ func NewFuzz(hod android.HostOrDeviceSupported) *Module {
ctx.AppendProperties(&disableDarwinAndLinuxBionic)
})
+ // Statically link the STL. This allows fuzz target deployment to not have to
+ // include the STL.
+ android.AddLoadHook(module, func(ctx android.LoadHookContext) {
+ staticStlLinkage := struct {
+ Stl *string
+ }{}
+
+ staticStlLinkage.Stl = proptools.StringPtr("libc++_static")
+ ctx.AppendProperties(&staticStlLinkage)
+ })
+
return module
}