Merge "[cc_fuzz] Statically link libcxx." am: 577d147eb9 am: 2e0229b210 am: cb3fd20ee7

am: 2188e75c90

Change-Id: I9a3f23ebc0ed9e1082c4976b7cec09b9f93618cc
This commit is contained in:
Mitch Phillips
2019-08-26 12:59:29 -07:00
committed by android-build-merger

View File

@@ -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
}