Fix lld detection if both gold and lld are found
[ghc.git] / mk / ways.mk
1 #
2 # Options for compiling in different `ways'.
3 #
4 # To configure up your own way, have a look at some of the standard ways
5 # such as profiling, and create your own set of WAY_*_OPTS defs below.
6 # After having done that, add your way string to WAYS, and after having
7 # run the configure script, the different projects will add the new way
8 # to the list of ways they support.
9 #
10
11 #
12 # Definitions of the different ways:
13 #
14 # * their name:
15 # - tag, e.g., p
16 # - description, e.g., profiling
17 # * what they mean to the driver:
18 # - WAY_p_HC_OPTS gives the list of command-line options
19 # to the driver.
20 #
21 # For consistency, the way name should be formed from the tags in the following
22 # order (the same ordering defined in DynFlags.Way),
23 #
24 # - thr: threaded
25 # - debug: debugging
26 # - p: profiled
27 # - l: eventlog
28 # - dyn: dynamically-linked
29
30 #
31 # The ways currently defined.
32 #
33 ALL_WAYS=v l debug dyn thr thr_l p_dyn p debug_dyn thr_dyn thr_p_dyn thr_debug_dyn thr_debug debug_p thr_debug_p l_dyn thr_l_dyn thr_p
34
35 #
36 # The following ways currently are treated specially,
37 # as the driver script treats these guys specially and needs to carefully be told
38 # about the options for these. Hence, we hide the required command line options
39 # for these in the driver, as this is the only place they are needed.
40 #
41 # If you want to add to these default options, fill in the variables below:
42
43 # Way 'v':
44 WAY_v_NAME=vanilla
45 WAY_v_HC_OPTS= -static
46
47 # Way 'p':
48 WAY_p_NAME=profiling
49 WAY_p_HC_OPTS= -static -prof -eventlog
50
51 # Way 'l':
52 WAY_l_NAME=event logging
53 WAY_l_HC_OPTS= -static -eventlog
54
55 #
56 # These ways apply to the RTS only:
57 #
58
59 # Way 'thr':
60 WAY_thr_NAME=threaded
61 WAY_thr_HC_OPTS= -static -optc-DTHREADED_RTS
62
63 # Way 'thr_p':
64 WAY_thr_p_NAME=threaded profiling
65 WAY_thr_p_HC_OPTS= -static -prof -eventlog -optc-DTHREADED_RTS
66
67 # Way 'thr_l':
68 WAY_thr_l_NAME=threaded event logging
69 WAY_thr_l_HC_OPTS= -static -optc-DTHREADED_RTS -eventlog
70
71 # Way 'debug':
72 WAY_debug_NAME=debug
73 WAY_debug_HC_OPTS= -static -optc-DDEBUG -ticky -DTICKY_TICKY -eventlog
74
75 # Way 'debug_p':
76 WAY_debug_p_NAME=debug profiled
77 WAY_debug_p_HC_OPTS= -static -optc-DDEBUG -prof -eventlog
78
79 # Way 'p':
80 WAY_p_NAME=profiling
81 WAY_p_HC_OPTS= -static -prof -eventlog
82
83 # Way 'thr_debug':
84 WAY_thr_debug_NAME=threaded debug
85 WAY_thr_debug_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -eventlog
86
87 # Way 'thr_debug_p':
88 WAY_thr_debug_p_NAME=threaded debug profiling event logging
89 WAY_thr_debug_p_HC_OPTS= -static -optc-DTHREADED_RTS -optc-DDEBUG -prof -eventlog
90
91 # Way 'dyn': build dynamic shared libraries
92 WAY_dyn_NAME=dyn
93 WAY_dyn_HC_OPTS=-fPIC -dynamic
94
95 # Way 'p_dyn':
96 WAY_p_dyn_NAME=p_dyn
97 WAY_p_dyn_HC_OPTS=-fPIC -dynamic -prof -eventlog
98
99 # Way 'thr_p_dyn':
100 WAY_thr_p_dyn_NAME=thr_p_dyn
101 WAY_thr_p_dyn_HC_OPTS=-fPIC -dynamic -prof -eventlog -optc-DTHREADED_RTS
102
103 # Way 'thr_dyn':
104 WAY_thr_dyn_NAME=thr_dyn
105 WAY_thr_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS
106
107 # Way 'thr_debug_dyn':
108 WAY_thr_debug_dyn_NAME=thr_debug_dyn
109 WAY_thr_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DTHREADED_RTS -optc-DDEBUG -eventlog
110
111 # Way 'debug_dyn':
112 WAY_debug_dyn_NAME=debug_dyn
113 WAY_debug_dyn_HC_OPTS=-fPIC -dynamic -optc-DDEBUG -ticky -DTICKY_TICKY -eventlog
114
115 # Way 'l_dyn':
116 WAY_l_dyn_NAME=event logging dynamic
117 WAY_l_dyn_HC_OPTS= -fPIC -dynamic -eventlog
118
119 # Way 'thr_l_dyn':
120 WAY_thr_l_dyn_NAME=threaded event logging dynamic
121 WAY_thr_l_dyn_HC_OPTS= -fPIC -dynamic -optc-DTHREADED_RTS -eventlog