summaryrefslogtreecommitdiff
path: root/runtime/ops/bootstrap.rs
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/ops/bootstrap.rs')
-rw-r--r--runtime/ops/bootstrap.rs11
1 files changed, 10 insertions, 1 deletions
diff --git a/runtime/ops/bootstrap.rs b/runtime/ops/bootstrap.rs
index eb9dbc6e8..c5c193ef3 100644
--- a/runtime/ops/bootstrap.rs
+++ b/runtime/ops/bootstrap.rs
@@ -42,11 +42,20 @@ pub struct SnapshotOptions {
impl Default for SnapshotOptions {
fn default() -> Self {
+ let arch = std::env::consts::ARCH;
+ let platform = std::env::consts::OS;
+ let target = match platform {
+ "macos" => format!("{}-apple-darwin", arch),
+ "linux" => format!("{}-unknown-linux-gnu", arch),
+ "windows" => format!("{}-pc-windows-msvc", arch),
+ rest => format!("{}-{}", arch, rest),
+ };
+
Self {
deno_version: "dev".to_owned(),
ts_version: "n/a".to_owned(),
v8_version: deno_core::v8_version(),
- target: std::env::consts::ARCH.to_owned(),
+ target,
}
}
}