Merge "Append ".static" to ubsan runtime for static binaries" am: e2f39b038d am: c1f3f6acbc am: 8b81b2b528

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1655969

Change-Id: Iaa8cd1979d5dd6b551175a6b898922098ec2472e
This commit is contained in:
Treehugger Robot 2021-03-30 04:58:02 +00:00 committed by Automerger Merge Worker
commit 83c426a3fe
1 changed files with 3 additions and 0 deletions

View File

@ -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) {