We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09624a6 commit dfc81dfCopy full SHA for dfc81df
src/libcore/os.rs
@@ -28,7 +28,7 @@ import consts::*;
28
export close, fclose, fsync_fd, waitpid;
29
export env, getenv, setenv, fdopen, pipe;
30
export getcwd, dll_filename, self_exe_path;
31
-export exe_suffix, dll_suffix, sysname;
+export exe_suffix, dll_suffix, sysname, arch;
32
export homedir, list_dir, list_dir_path, path_is_dir, path_exists,
33
make_absolute, make_dir, remove_dir, change_dir, remove_file,
34
copy_file;
@@ -700,8 +700,14 @@ mod consts {
700
fn dll_suffix() -> str { ".dll" }
701
}
702
703
+#[cfg(target_arch = "x86")]
704
+fn arch() -> str { "x86" }
705
706
+#[cfg(target_arch = "x86_64")]
707
+fn arch() -> str { "x86_64" }
708
709
+#[cfg(target_arch = "arm")]
710
+fn arch() -> str { "arm" }
711
712
#[cfg(test)]
713
mod tests {
0 commit comments