Add ability to produce crash dumps on Windows
[ghc.git] / rts / package.conf.in
1 /* The RTS is just another package! */
2
3 #include "ghcconfig.h"
4 #include "rts/Config.h"
5 #include "MachDeps.h"
6
7 name:           rts
8 version:        1.0
9 id:             rts
10 key:            rts
11 license:        BSD3
12 maintainer:     glasgow-haskell-users@haskell.org
13 exposed:        True
14
15 exposed-modules:
16 hidden-modules:
17
18 import-dirs:
19
20 #if defined(INSTALLING)
21 library-dirs:           LIB_DIR"/rts" FFI_LIB_DIR
22 #else /* !INSTALLING */
23 library-dirs:           TOP"/rts/dist/build" FFI_LIB_DIR
24 #endif
25
26 hs-libraries:   "HSrts" FFI_LIB
27
28 extra-libraries:
29 #if defined(HAVE_LIBM)
30                                 "m"             /* for ldexp() */
31 #endif
32 #if defined(HAVE_LIBRT)
33                               , "rt"
34 #endif
35 #if defined(HAVE_LIBDL)
36                               , "dl"
37 #endif
38 #if defined(HAVE_LIBFFI)
39                               , "ffi"
40 #endif
41 #if HAVE_LIBNUMA
42                               , "numa"
43 #endif
44 #if defined(mingw32_HOST_OS)
45                               ,"wsock32"    /* for the linker */
46                               ,"gdi32"      /* for the linker */
47                               ,"winmm"      /* for the linker */
48                               ,"Dbghelp"    /* for crash dump */
49 #endif
50 #if NEED_PTHREAD_LIB
51                               , "pthread"   /* for pthread_getthreadid_np, pthread_create, etc. */
52 #endif
53 #if defined(DEBUG) && defined(HAVE_LIBBFD)
54                               ,"bfd", "iberty"  /* for debugging */
55 #endif
56 #if defined(HAVE_LIBMINGWEX)
57 # ifndef INSTALLING                             /* Bundled Mingw is behind */
58                               ,"mingwex"
59 # endif
60 #endif
61 #if USE_LIBDW
62                              , "elf"
63                              , "dw"             /* for backtraces */
64 #endif
65
66 #if defined(INSTALLING)
67 include-dirs:           INCLUDE_DIR FFI_INCLUDE_DIR
68 #else /* !INSTALLING */
69 include-dirs:           TOP"/rts/dist/build" TOP"/includes" TOP"/includes/dist-derivedconstants/header" FFI_INCLUDE_DIR
70 #endif
71
72 includes:               Stg.h
73 hugs-options:
74 cc-options:
75
76 ld-options:
77 #if defined(LEADING_UNDERSCORE)
78
79            "-Wl,-u,_base_GHCziTopHandler_runIO_closure"
80          , "-Wl,-u,_base_GHCziTopHandler_runNonIO_closure"
81
82          , "-Wl,-u,_ghczmprim_GHCziTuple_Z0T_closure"
83          , "-Wl,-u,_ghczmprim_GHCziTypes_True_closure"
84          , "-Wl,-u,_ghczmprim_GHCziTypes_False_closure"
85          , "-Wl,-u,_base_GHCziPack_unpackCString_closure"
86          , "-Wl,-u,_base_GHCziWeak_runFinalizzerBatch_closure"
87          , "-Wl,-u,_base_GHCziIOziException_stackOverflow_closure"
88          , "-Wl,-u,_base_GHCziIOziException_heapOverflow_closure"
89          , "-Wl,-u,_base_GHCziIOziException_allocationLimitExceeded_closure"
90          , "-Wl,-u,_base_GHCziIOziException_blockedIndefinitelyOnMVar_closure"
91          , "-Wl,-u,_base_GHCziIOziException_blockedIndefinitelyOnSTM_closure"
92          , "-Wl,-u,_base_GHCziIOziException_cannotCompactFunction_closure"
93          , "-Wl,-u,_base_GHCziIOziException_cannotCompactPinned_closure"
94          , "-Wl,-u,_base_GHCziIOziException_cannotCompactMutable_closure"
95          , "-Wl,-u,_base_ControlziExceptionziBase_nonTermination_closure"
96          , "-Wl,-u,_base_ControlziExceptionziBase_nestedAtomically_closure"
97          , "-Wl,-u,_base_GHCziEventziThread_blockedOnBadFD_closure"
98          , "-Wl,-u,_base_GHCziConcziSync_runSparks_closure"
99          , "-Wl,-u,_base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
100          , "-Wl,-u,_base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
101          , "-Wl,-u,_base_GHCziConcziSignal_runHandlersPtr_closure"
102          , "-Wl,-u,_base_GHCziTopHandler_flushStdHandles_closure"
103          , "-Wl,-u,_base_GHCziTopHandler_runMainIO_closure"
104          , "-Wl,-u,_ghczmprim_GHCziTypes_Czh_con_info"
105          , "-Wl,-u,_ghczmprim_GHCziTypes_Izh_con_info"
106          , "-Wl,-u,_ghczmprim_GHCziTypes_Fzh_con_info"
107          , "-Wl,-u,_ghczmprim_GHCziTypes_Dzh_con_info"
108          , "-Wl,-u,_ghczmprim_GHCziTypes_Wzh_con_info"
109          , "-Wl,-u,_base_GHCziPtr_Ptr_con_info"
110          , "-Wl,-u,_base_GHCziPtr_FunPtr_con_info"
111          , "-Wl,-u,_base_GHCziInt_I8zh_con_info"
112          , "-Wl,-u,_base_GHCziInt_I16zh_con_info"
113          , "-Wl,-u,_base_GHCziInt_I32zh_con_info"
114          , "-Wl,-u,_base_GHCziInt_I64zh_con_info"
115          , "-Wl,-u,_base_GHCziWord_W8zh_con_info"
116          , "-Wl,-u,_base_GHCziWord_W16zh_con_info"
117          , "-Wl,-u,_base_GHCziWord_W32zh_con_info"
118          , "-Wl,-u,_base_GHCziWord_W64zh_con_info"
119          , "-Wl,-u,_base_GHCziStable_StablePtr_con_info"
120
121          , "-Wl,-u,_hs_atomic_add8"
122          , "-Wl,-u,_hs_atomic_add16"
123          , "-Wl,-u,_hs_atomic_add32"
124 #if WORD_SIZE_IN_BITS == 64
125          , "-Wl,-u,_hs_atomic_add64"
126 #endif
127          , "-Wl,-u,_hs_atomic_sub8"
128          , "-Wl,-u,_hs_atomic_sub16"
129          , "-Wl,-u,_hs_atomic_sub32"
130 #if WORD_SIZE_IN_BITS == 64
131          , "-Wl,-u,_hs_atomic_sub64"
132 #endif
133          , "-Wl,-u,_hs_atomic_and8"
134          , "-Wl,-u,_hs_atomic_and16"
135          , "-Wl,-u,_hs_atomic_and32"
136 #if WORD_SIZE_IN_BITS == 64
137          , "-Wl,-u,_hs_atomic_and64"
138 #endif
139          , "-Wl,-u,_hs_atomic_nand8"
140          , "-Wl,-u,_hs_atomic_nand16"
141          , "-Wl,-u,_hs_atomic_nand32"
142 #if WORD_SIZE_IN_BITS == 64
143          , "-Wl,-u,_hs_atomic_nand64"
144 #endif
145          , "-Wl,-u,_hs_atomic_or8"
146          , "-Wl,-u,_hs_atomic_or16"
147          , "-Wl,-u,_hs_atomic_or32"
148 #if WORD_SIZE_IN_BITS == 64
149          , "-Wl,-u,_hs_atomic_or64"
150 #endif
151          , "-Wl,-u,_hs_atomic_xor8"
152          , "-Wl,-u,_hs_atomic_xor16"
153          , "-Wl,-u,_hs_atomic_xor32"
154 #if WORD_SIZE_IN_BITS == 64
155          , "-Wl,-u,_hs_atomic_xor64"
156 #endif
157          , "-Wl,-u,_hs_cmpxchg8"
158          , "-Wl,-u,_hs_cmpxchg16"
159          , "-Wl,-u,_hs_cmpxchg32"
160 #if WORD_SIZE_IN_BITS == 64
161          , "-Wl,-u,_hs_cmpxchg64"
162 #endif
163          , "-Wl,-u,_hs_atomicread8"
164          , "-Wl,-u,_hs_atomicread16"
165          , "-Wl,-u,_hs_atomicread32"
166 #if WORD_SIZE_IN_BITS == 64
167          , "-Wl,-u,_hs_atomicread64"
168 #endif
169          , "-Wl,-u,_hs_atomicwrite8"
170          , "-Wl,-u,_hs_atomicwrite16"
171          , "-Wl,-u,_hs_atomicwrite32"
172 #if WORD_SIZE_IN_BITS == 64
173          , "-Wl,-u,_hs_atomicwrite64"
174 #endif
175 #else
176            "-Wl,-u,base_GHCziTopHandler_runIO_closure"
177          , "-Wl,-u,base_GHCziTopHandler_runNonIO_closure"
178
179          , "-Wl,-u,ghczmprim_GHCziTuple_Z0T_closure"
180          , "-Wl,-u,ghczmprim_GHCziTypes_True_closure"
181          , "-Wl,-u,ghczmprim_GHCziTypes_False_closure"
182          , "-Wl,-u,base_GHCziPack_unpackCString_closure"
183          , "-Wl,-u,base_GHCziWeak_runFinalizzerBatch_closure"
184          , "-Wl,-u,base_GHCziIOziException_stackOverflow_closure"
185          , "-Wl,-u,base_GHCziIOziException_heapOverflow_closure"
186          , "-Wl,-u,base_GHCziIOziException_allocationLimitExceeded_closure"
187          , "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnMVar_closure"
188          , "-Wl,-u,base_GHCziIOziException_blockedIndefinitelyOnSTM_closure"
189          , "-Wl,-u,base_GHCziIOziException_cannotCompactFunction_closure"
190          , "-Wl,-u,base_GHCziIOziException_cannotCompactPinned_closure"
191          , "-Wl,-u,base_GHCziIOziException_cannotCompactMutable_closure"
192          , "-Wl,-u,base_ControlziExceptionziBase_nonTermination_closure"
193          , "-Wl,-u,base_ControlziExceptionziBase_nestedAtomically_closure"
194          , "-Wl,-u,base_GHCziEventziThread_blockedOnBadFD_closure"
195          , "-Wl,-u,base_GHCziConcziSync_runSparks_closure"
196          , "-Wl,-u,base_GHCziConcziIO_ensureIOManagerIsRunning_closure"
197          , "-Wl,-u,base_GHCziConcziIO_ioManagerCapabilitiesChanged_closure"
198          , "-Wl,-u,base_GHCziConcziSignal_runHandlersPtr_closure"
199          , "-Wl,-u,base_GHCziTopHandler_flushStdHandles_closure"
200          , "-Wl,-u,base_GHCziTopHandler_runMainIO_closure"
201          , "-Wl,-u,ghczmprim_GHCziTypes_Czh_con_info"
202          , "-Wl,-u,ghczmprim_GHCziTypes_Izh_con_info"
203          , "-Wl,-u,ghczmprim_GHCziTypes_Fzh_con_info"
204          , "-Wl,-u,ghczmprim_GHCziTypes_Dzh_con_info"
205          , "-Wl,-u,ghczmprim_GHCziTypes_Wzh_con_info"
206          , "-Wl,-u,base_GHCziPtr_Ptr_con_info"
207          , "-Wl,-u,base_GHCziPtr_FunPtr_con_info"
208          , "-Wl,-u,base_GHCziInt_I8zh_con_info"
209          , "-Wl,-u,base_GHCziInt_I16zh_con_info"
210          , "-Wl,-u,base_GHCziInt_I32zh_con_info"
211          , "-Wl,-u,base_GHCziInt_I64zh_con_info"
212          , "-Wl,-u,base_GHCziWord_W8zh_con_info"
213          , "-Wl,-u,base_GHCziWord_W16zh_con_info"
214          , "-Wl,-u,base_GHCziWord_W32zh_con_info"
215          , "-Wl,-u,base_GHCziWord_W64zh_con_info"
216          , "-Wl,-u,base_GHCziStable_StablePtr_con_info"
217
218          , "-Wl,-u,hs_atomic_add8"
219          , "-Wl,-u,hs_atomic_add16"
220          , "-Wl,-u,hs_atomic_add32"
221 #if WORD_SIZE_IN_BITS == 64
222          , "-Wl,-u,hs_atomic_add64"
223 #endif
224          , "-Wl,-u,hs_atomic_sub8"
225          , "-Wl,-u,hs_atomic_sub16"
226          , "-Wl,-u,hs_atomic_sub32"
227 #if WORD_SIZE_IN_BITS == 64
228          , "-Wl,-u,hs_atomic_sub64"
229 #endif
230          , "-Wl,-u,hs_atomic_and8"
231          , "-Wl,-u,hs_atomic_and16"
232          , "-Wl,-u,hs_atomic_and32"
233 #if WORD_SIZE_IN_BITS == 64
234          , "-Wl,-u,hs_atomic_and64"
235 #endif
236          , "-Wl,-u,hs_atomic_nand8"
237          , "-Wl,-u,hs_atomic_nand16"
238          , "-Wl,-u,hs_atomic_nand32"
239 #if WORD_SIZE_IN_BITS == 64
240          , "-Wl,-u,hs_atomic_nand64"
241 #endif
242          , "-Wl,-u,hs_atomic_or8"
243          , "-Wl,-u,hs_atomic_or16"
244          , "-Wl,-u,hs_atomic_or32"
245 #if WORD_SIZE_IN_BITS == 64
246          , "-Wl,-u,hs_atomic_or64"
247 #endif
248          , "-Wl,-u,hs_atomic_xor8"
249          , "-Wl,-u,hs_atomic_xor16"
250          , "-Wl,-u,hs_atomic_xor32"
251 #if WORD_SIZE_IN_BITS == 64
252          , "-Wl,-u,hs_atomic_xor64"
253 #endif
254          , "-Wl,-u,hs_cmpxchg8"
255          , "-Wl,-u,hs_cmpxchg16"
256          , "-Wl,-u,hs_cmpxchg32"
257 #if WORD_SIZE_IN_BITS == 64
258          , "-Wl,-u,hs_cmpxchg64"
259 #endif
260          , "-Wl,-u,hs_atomicread8"
261          , "-Wl,-u,hs_atomicread16"
262          , "-Wl,-u,hs_atomicread32"
263 #if WORD_SIZE_IN_BITS == 64
264          , "-Wl,-u,hs_atomicread64"
265 #endif
266          , "-Wl,-u,hs_atomicwrite8"
267          , "-Wl,-u,hs_atomicwrite16"
268          , "-Wl,-u,hs_atomicwrite32"
269 #if WORD_SIZE_IN_BITS == 64
270          , "-Wl,-u,hs_atomicwrite64"
271 #endif
272 #endif
273
274 /*  Pick up static libraries in preference over dynamic if in earlier search
275  *  path.  This is important to use the static gmp in preference on Mac OS.
276  *  The used option is specific to the Darwin linker.
277  */
278 #if defined(darwin_HOST_OS)
279          , "-Wl,-search_paths_first"
280 #endif
281
282 #if defined(darwin_HOST_OS) && !defined(x86_64_HOST_ARCH)
283          , "-read_only_relocs", "warning"
284 #endif
285
286 framework-dirs:
287
288 haddock-interfaces:
289 haddock-html: