Use a better heuristic to determine whether we're on a Mac, issue 69
This commit is contained in:
parent
e85f6ca4d3
commit
559e1e7e01
1 changed files with 3 additions and 5 deletions
|
@ -8,11 +8,9 @@ let _ =
|
||||||
|
|
||||||
let (targ:Common.target) =
|
let (targ:Common.target) =
|
||||||
match Sys.os_type with
|
match Sys.os_type with
|
||||||
"Unix" ->
|
"Unix" when Unix.system "test `uname -s` = 'Darwin'" = Unix.WEXITED 0 ->
|
||||||
(* FIXME (issue #69): this is an absurd heuristic. *)
|
MacOS_x86_macho
|
||||||
if Sys.file_exists "/System/Library"
|
| "Unix" -> Linux_x86_elf
|
||||||
then MacOS_x86_macho
|
|
||||||
else Linux_x86_elf
|
|
||||||
| "Win32" -> Win32_x86_pe
|
| "Win32" -> Win32_x86_pe
|
||||||
| "Cygwin" -> Win32_x86_pe
|
| "Cygwin" -> Win32_x86_pe
|
||||||
| _ -> Linux_x86_elf
|
| _ -> Linux_x86_elf
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue