aboutsummaryrefslogtreecommitdiff
path: root/rust/private/utils.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'rust/private/utils.bzl')
-rw-r--r--rust/private/utils.bzl12
1 files changed, 12 insertions, 0 deletions
diff --git a/rust/private/utils.bzl b/rust/private/utils.bzl
index 783aa222..06a3d334 100644
--- a/rust/private/utils.bzl
+++ b/rust/private/utils.bzl
@@ -879,3 +879,15 @@ def generate_output_diagnostics(ctx, sibling, require_process_wrapper = True):
sibling.basename + ".rustc-output",
sibling = sibling,
)
+
+def is_std_dylib(file):
+ """Whether the file is a dylib crate for std
+
+ """
+ basename = file.basename
+ return (
+ # for linux and darwin
+ basename.startswith("libstd-") and (basename.endswith(".so") or basename.endswith(".dylib")) or
+ # for windows
+ basename.startswith("std-") and basename.endswith(".dll")
+ )