forked from Mercury-Language/mercury
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.MacOS
90 lines (65 loc) · 3.18 KB
/
README.MacOS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
Mercury on macOS
================
This file documents the port of Mercury to Mac OS X / OS X / macOS,
i.e. the `*-apple-darwin*` configuration.
Versions of Mac OS X prior to 10.9 are not supported.
Contents
--------
* Mercury on Intel Macs
* Note for users of Xcode 11
* Deployment Target Settings
* Deep profiling on Mac OS X
Mercury on Intel Macs
----------------------
Mercury should build and install "out-of-the-box" on Intel Macs using Mac OS X
10.9 onwards.
The `asm_fast*` and `reg*` grades are only available on 64-bit Intel systems
and only when using GCC version 4.3 or later as the C compiler.
If `clang` is being used as the C compiler then the only low-level C grades
available are the `none*` grades. The high-level C, Java and C# grades
all work. The C# grades require the Mono .NET implementation.
(See README.CSharp for further details.)
If the `asm_fast.gc` grade is not available, and unless otherwise directed,
then the `hlc.gc` grade will be used as the default grade for compiling
applications.
On x86-64 machines, the default is to install 64-bit versions of the
executables and libraries in the Mercury system. On machines running versions
of MacOS up to and including 10.14, users can choose to install 32-bit versions
instead by invoking Mercury's `configure` script either with the option
--with-cc="clang -m32"
or
--with-cc="gcc -m32"
depending on their preferred compiler. In either case, every invocation
of the selected C compiler on Mercury-generated C files will specify
the `-m32` option. The reason for the limitation to 10.14 is that
32-bit executables are not supported at all from MacOS 10.15 onwards.
If, after installing Mercury, you encounter errors about missing `.mih` files,
and you have fink installed, then try removing the fink components from your
`PATH` (these usually start with `/sw`) and reinstalling.
Note for users of Xcode 11
--------------------------
Versions of Xcode 11 prior to 11.4 ship with a broken version of `clang`
that *cannot* be used to compile Mercury. The `configure` script will print
a warning if it detects that you are using the broken version.
A discussion of this issue can be found at
<https://forums.developer.apple.com/thread/121887>.
The github post
<https://github.com/Mercury-Language/mercury/issues/88#issuecomment-624329679>
describes a way that has been found to fix the problem.
Deployment Target Settings
--------------------------
By default, the Mercury compiler is configured so that the Mac OS X deployment
target (i.e. the value of the `MACOSX_DEPLOYMENT_TARGET` environment variable)
for code generated by the Mercury compiler is set to the same version as that
of the host system.
You can specify a different deployment target at configuration time using
the `configure` script's `--with-macosx-deployment-target` option.
(See the "SDK Compatibility Guide" in the Apple developer documentation
for further information about the deployment target setting.)
Deep profiling on Mac OS X
--------------------------
The Mercury deep profiler requires a local web server. To use the deep
profiler:
- select and install a web server, and
- install and enable the `mdprof_cgi` script according to the rules of that
web server.