Merge "[cc_fuzz] Statically link libcxx." am: 577d147eb9
am: 2e0229b210
Change-Id: I5ecaefa008d803c944a3a831840a9244e40f00dc
This commit is contained in:
12
cc/fuzz.go
12
cc/fuzz.go
@@ -17,6 +17,7 @@ package cc
|
|||||||
import (
|
import (
|
||||||
"android/soong/android"
|
"android/soong/android"
|
||||||
"android/soong/cc/config"
|
"android/soong/cc/config"
|
||||||
|
"github.com/google/blueprint/proptools"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
@@ -120,5 +121,16 @@ func NewFuzz(hod android.HostOrDeviceSupported) *Module {
|
|||||||
ctx.AppendProperties(&disableDarwinAndLinuxBionic)
|
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
|
return module
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user