summaryrefslogtreecommitdiff
path: root/rust/snapshot_utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'rust/snapshot_utils.go')
-rw-r--r--rust/snapshot_utils.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/rust/snapshot_utils.go b/rust/snapshot_utils.go
index 9d5154ce2..bd7ca7f68 100644
--- a/rust/snapshot_utils.go
+++ b/rust/snapshot_utils.go
@@ -42,9 +42,8 @@ func (mod *Module) ExcludeFromRecoverySnapshot() bool {
func (mod *Module) IsSnapshotLibrary() bool {
if lib, ok := mod.compiler.(libraryInterface); ok {
- // Rust-native dylibs and rlibs are not snapshot supported yet, so only
- // return true if this module produces a C shared or static library.
- return lib.shared() || lib.static()
+ // Rust-native dylibs are not snapshot supported yet. Only snapshot the rlib-std variants of rlibs.
+ return lib.shared() || lib.static() || (lib.rlib() && lib.rlibStd())
}
return false
}