diff options
| author | Patrick Walton <[email protected]> | 2010-08-02 13:26:35 -0700 |
|---|---|---|
| committer | Patrick Walton <[email protected]> | 2010-08-02 13:26:35 -0700 |
| commit | 559e1e7e01cd5ecf42a0157b1a2bf0ef53ad312c (patch) | |
| tree | 63a525f03ce1e69d2dd2728fdb3b454c32b411b6 /src/boot/driver/main.ml | |
| parent | Patch up another place where the newly-expanded 'closure-ptr' implicit arg ne... (diff) | |
| download | rust-559e1e7e01cd5ecf42a0157b1a2bf0ef53ad312c.tar.xz rust-559e1e7e01cd5ecf42a0157b1a2bf0ef53ad312c.zip | |
Use a better heuristic to determine whether we're on a Mac, issue 69
Diffstat (limited to 'src/boot/driver/main.ml')
| -rw-r--r-- | src/boot/driver/main.ml | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/boot/driver/main.ml b/src/boot/driver/main.ml index 9af7ee0b..9049546c 100644 --- a/src/boot/driver/main.ml +++ b/src/boot/driver/main.ml @@ -8,11 +8,9 @@ let _ = let (targ:Common.target) = match Sys.os_type with - "Unix" -> - (* FIXME (issue #69): this is an absurd heuristic. *) - if Sys.file_exists "/System/Library" - then MacOS_x86_macho - else Linux_x86_elf + "Unix" when Unix.system "test `uname -s` = 'Darwin'" = Unix.WEXITED 0 -> + MacOS_x86_macho + | "Unix" -> Linux_x86_elf | "Win32" -> Win32_x86_pe | "Cygwin" -> Win32_x86_pe | _ -> Linux_x86_elf |