diff --git a/cc/sanitize.go b/cc/sanitize.go index cd09e6e4e..e1ac9f03f 100644 --- a/cc/sanitize.go +++ b/cc/sanitize.go @@ -1129,6 +1129,9 @@ func sanitizerRuntimeMutator(mctx android.BottomUpMutatorContext) { Bool(c.sanitize.Properties.Sanitize.Undefined) || Bool(c.sanitize.Properties.Sanitize.All_undefined) { runtimeLibrary = config.UndefinedBehaviorSanitizerRuntimeLibrary(toolchain) + if c.staticBinary() { + runtimeLibrary += ".static" + } } if runtimeLibrary != "" && (toolchain.Bionic() || c.sanitize.Properties.UbsanRuntimeDep) {