Redirect memtag libraries to snapshot
memtag sanitizer libraries are vendor available and can be captured as snapshots. This change adds a redirection logic for memtag libraries. This is just a workaround, just like other SnapshotInfoProvider calls. In the future we need to refactor these codes. So TODO is added to remind refactoring. Bug: 178470649 Test: soong test Change-Id: Id77f1ce94255b56a68f3e1d7446a68189c45ac54
This commit is contained in:
@@ -1080,6 +1080,12 @@ func sanitizerRuntimeMutator(mctx android.BottomUpMutatorContext) {
|
||||
if Bool(c.sanitize.Properties.Sanitize.Diag.Memtag_heap) {
|
||||
noteDep = "note_memtag_heap_sync"
|
||||
}
|
||||
// If we're using snapshots, redirect to snapshot whenever possible
|
||||
// TODO(b/178470649): clean manual snapshot redirections
|
||||
snapshot := mctx.Provider(SnapshotInfoProvider).(SnapshotInfo)
|
||||
if lib, ok := snapshot.StaticLibs[noteDep]; ok {
|
||||
noteDep = lib
|
||||
}
|
||||
depTag := libraryDependencyTag{Kind: staticLibraryDependency, wholeStatic: true}
|
||||
variations := append(mctx.Target().Variations(),
|
||||
blueprint.Variation{Mutator: "link", Variation: "static"})
|
||||
|
Reference in New Issue
Block a user