Docs: fix links to ghc-flags
[ghc.git] / utils / mkUserGuidePart / Options / Linking.hs
1 module Options.Linking where
2
3 import Types
4
5 linkingOptions :: [Flag]
6 linkingOptions =
7 [ flag { flagName = "-shared"
8 , flagDescription =
9 "Generate a shared library (as opposed to an executable)"
10 , flagType = DynamicFlag
11 }
12 , flag { flagName = "-staticlib"
13 , flagDescription =
14 "On Darwin/OS X/iOS only, generate a standalone static library " ++
15 "(as opposed to an executable). This is the usual way to " ++
16 "compile for iOS."
17 , flagType = DynamicFlag
18 }
19 , flag { flagName = "-fPIC"
20 , flagDescription =
21 "Generate position-independent code (where available)"
22 , flagType = DynamicFlag
23 }
24 , flag { flagName = "-dynload"
25 , flagDescription =
26 "Selects one of a number of modes for finding shared libraries at runtime."
27 , flagType = DynamicFlag
28 }
29 , flag { flagName = "-framework⟨name⟩"
30 , flagDescription =
31 "On Darwin/OS X/iOS only, link in the framework ⟨name⟩. This " ++
32 "option corresponds to the ``-framework`` option for Apple's Linker."
33 , flagType = DynamicFlag
34 }
35 , flag { flagName = "-framework-path⟨name⟩"
36 , flagDescription =
37 "On Darwin/OS X/iOS only, add ⟨dir⟩ to the list of directories " ++
38 "searched for frameworks. This option corresponds to the ``-F`` "++
39 "option for Apple's Linker."
40 , flagType = DynamicFlag
41 }
42 , flag { flagName = "-l⟨lib⟩"
43 , flagDescription = "Link in library ⟨lib⟩"
44 , flagType = DynamicFlag
45 }
46 , flag { flagName = "-L⟨dir⟩"
47 , flagDescription =
48 "Add ⟨dir⟩ to the list of directories searched for libraries"
49 , flagType = DynamicFlag
50 }
51 , flag { flagName = "-main-is"
52 , flagDescription = "Set main module and function"
53 , flagType = DynamicFlag
54 }
55 , flag { flagName = "--mk-dll"
56 , flagDescription = "DLL-creation mode (Windows only)"
57 , flagType = DynamicFlag
58 }
59 , flag { flagName = "-no-hs-main"
60 , flagDescription = "Don't assume this program contains ``main``"
61 , flagType = DynamicFlag
62 }
63 , flag { flagName = "-rtsopts,-rtsopts={none,some,all}"
64 , flagDescription =
65 "Control whether the RTS behaviour can be tweaked via command-line"++
66 "flags and the ``GHCRTS`` environment variable. Using ``none`` " ++
67 "means no RTS flags can be given; ``some`` means only a minimum " ++
68 "of safe options can be given (the default), and ``all`` (or no " ++
69 "argument at all) means that all RTS flags are permitted."
70 , flagType = DynamicFlag
71 }
72 , flag { flagName = "-with-rtsopts=opts"
73 , flagDescription = "Set the default RTS options to ⟨opts⟩."
74 , flagType = DynamicFlag
75 }
76 , flag { flagName = "-no-rtsopts-suggestions"
77 , flagDescription =
78 "Don't print RTS suggestions about linking with :ghc-flag:`-rtsopts`."
79 , flagType = DynamicFlag
80 }
81 , flag { flagName = "-no-link"
82 , flagDescription = "Omit linking"
83 , flagType = DynamicFlag
84 }
85 , flag { flagName = "-split-objs"
86 , flagDescription = "Split objects (for libraries)"
87 , flagType = DynamicFlag
88 }
89 , flag { flagName = "-split-sections"
90 , flagDescription = "Split sections for link-time dead-code stripping"
91 , flagType = DynamicFlag
92 }
93 , flag { flagName = "-static"
94 , flagDescription = "Use static Haskell libraries"
95 , flagType = DynamicFlag
96 }
97 , flag { flagName = "-threaded"
98 , flagDescription = "Use the threaded runtime"
99 , flagType = DynamicFlag
100 }
101 , flag { flagName = "-debug"
102 , flagDescription = "Use the debugging runtime"
103 , flagType = DynamicFlag
104 }
105 , flag { flagName = "-ticky"
106 , flagDescription =
107 "For linking, this simply implies :ghc-flag:`-debug`; "++
108 "see :ref:`ticky-ticky`."
109 , flagType = DynamicFlag
110 }
111 , flag { flagName = "-eventlog"
112 , flagDescription = "Enable runtime event tracing"
113 , flagType = DynamicFlag
114 }
115 , flag { flagName = "-fno-gen-manifest"
116 , flagDescription = "Do not generate a manifest file (Windows only)"
117 , flagType = DynamicFlag
118 }
119 , flag { flagName = "-fno-embed-manifest"
120 , flagDescription =
121 "Do not embed the manifest in the executable (Windows only)"
122 , flagType = DynamicFlag
123 }
124 , flag { flagName = "-fno-shared-implib"
125 , flagDescription =
126 "Don't generate an import library for a DLL (Windows only)"
127 , flagType = DynamicFlag
128 }
129 , flag { flagName = "-dylib-install-name ⟨path⟩"
130 , flagDescription =
131 "Set the install name (via ``-install_name`` passed to Apple's " ++
132 "linker), specifying the full install path of the library file. " ++
133 "Any libraries or executables that link with it later will pick " ++
134 "up that path as their runtime search location for it. " ++
135 "(Darwin/OS X only)"
136 , flagType = DynamicFlag
137 }
138 , flag { flagName = "-rdynamic"
139 , flagDescription =
140 "This instructs the linker to add all symbols, not only used " ++
141 "ones, to the dynamic symbol table. Currently Linux and " ++
142 "Windows/MinGW32 only. This is equivalent to using " ++
143 "``-optl -rdynamic`` on Linux, and ``-optl -export-all-symbols`` " ++
144 "on Windows."
145 , flagType = DynamicFlag
146 }
147 ]