diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2019-09-07 01:57:15 +0900 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-09-06 12:57:15 -0400 |
commit | 595b4daa77771458457e178b6b590a044cd41ad0 (patch) | |
tree | d8b19636e4795bcb11ba5c45982d32334da60115 /cli/ops/os.rs | |
parent | ca000392857b4c79a3609ddbc20073222498998b (diff) |
Remove replacements hack in deno_typescript (#2864)
Diffstat (limited to 'cli/ops/os.rs')
-rw-r--r-- | cli/ops/os.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/cli/ops/os.rs b/cli/ops/os.rs index d644d893b..61484ca41 100644 --- a/cli/ops/os.rs +++ b/cli/ops/os.rs @@ -11,6 +11,16 @@ use std::collections::HashMap; use std::env; use url::Url; +/// BUILD_OS and BUILD_ARCH match the values in Deno.build. See js/build.ts. +#[cfg(target_os = "macos")] +static BUILD_OS: &str = "mac"; +#[cfg(target_os = "linux")] +static BUILD_OS: &str = "linux"; +#[cfg(target_os = "windows")] +static BUILD_OS: &str = "win"; +#[cfg(target_arch = "x86_64")] +static BUILD_ARCH: &str = "x64"; + pub fn op_start( state: &ThreadSafeState, _args: Value, @@ -31,6 +41,8 @@ pub fn op_start( "tsVersion": version::typescript(), "noColor": !ansi::use_color(), "xevalDelim": state.flags.xeval_delim.clone(), + "os": BUILD_OS, + "arch": BUILD_ARCH, }))) } |