-
Notifications
You must be signed in to change notification settings - Fork 2
/
buildGhcVariants-win.sh
159 lines (144 loc) · 4.93 KB
/
buildGhcVariants-win.sh
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
#!/usr/bin/env bash
#Build 5 variants of GHC in folder $TREE_DIR
#All five builds will run in parallel.
TREE_DIR=~/trees
THREADS="-j2" # Use "-j2" if you have 8+ cores
mkdir -p ${TREE_DIR}
git clone --recursive git://git.haskell.org/ghc.git ${TREE_DIR}/head
cd ${TREE_DIR}/head
git checkout fce07c99fa6528e95892604edb73fb975d6a01fc
git submodule update --init --recursive
git clean -fd
echo 'SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O2
GhcStage2HcOpts = -O2
GhcLibHcOpts = -O2
GhcRtsHcOpts = -O2
BUILD_PROF_LIBS = NO
SplitObjs = NO
SplitSections = NO
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
BUILD_MAN = NO
' >> mk/build.mk
./boot
./configure --enable-tarballs-autodownload
make ${THREADS} &
git clone --recursive git://git.haskell.org/ghc.git ${TREE_DIR}/vanilla
cd ${TREE_DIR}/vanilla
git remote add vanilla https://github.com/AndreasPK/ghc.git
git fetch vanilla
git checkout vanilla/layoutOpt
git submodule update --init --recursive
git clean -fd
echo 'SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O2
GhcStage2HcOpts = -O2 -fno-new-blocklayout -fvanilla-blocklayout
GhcLibHcOpts = -O2 -fno-new-blocklayout -fvanilla-blocklayout
GhcRtsHcOpts = -O2 -fno-new-blocklayout -fvanilla-blocklayout
BUILD_PROF_LIBS = NO
SplitObjs = NO
SplitSections = NO
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
BUILD_MAN = NO
' >> mk/build.mk
./boot
./configure --enable-tarballs-autodownload
make ${THREADS} &
git clone --recursive git://git.haskell.org/ghc.git ${TREE_DIR}/adjusted
cd ${TREE_DIR}/adjusted
git remote add adjusted https://github.com/AndreasPK/ghc.git
git fetch adjusted
git checkout adjusted/layoutOpt
git submodule update --init --recursive
git clean -fd
echo 'SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O2
GhcStage2HcOpts = -O2 -fno-new-blocklayout -fno-vanilla-blocklayout
GhcLibHcOpts = -O2 -fno-new-blocklayout -fno-vanilla-blocklayout
GhcRtsHcOpts = -O2 -fno-new-blocklayout -fno-vanilla-blocklayout
BUILD_PROF_LIBS = NO
SplitObjs = NO
SplitSections = NO
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
BUILD_MAN = NO
' >> mk/build.mk
./boot
./configure --enable-tarballs-autodownload
make ${THREADS} &
git clone --recursive git://git.haskell.org/ghc.git ${TREE_DIR}/allCalls
cd ${TREE_DIR}/allCalls
git remote add allCalls https://github.com/AndreasPK/ghc.git
git fetch allCalls
git checkout allCalls/layoutOpt
git submodule update --init --recursive
git clean -fd
echo 'SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O2
GhcStage2HcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=310
GhcLibHcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=310
GhcRtsHcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=310
BUILD_PROF_LIBS = NO
SplitObjs = NO
SplitSections = NO
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
BUILD_MAN = NO
' >> mk/build.mk
./boot
./configure --enable-tarballs-autodownload
make ${THREADS} &
git clone --recursive git://git.haskell.org/ghc.git ${TREE_DIR}/someCalls
cd ${TREE_DIR}/someCalls
git remote add someCalls https://github.com/AndreasPK/ghc.git
git fetch someCalls
git checkout someCalls/layoutOpt
git submodule update --init --recursive
git clean -fd
echo 'SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O2
GhcStage2HcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=300
GhcLibHcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=300
GhcRtsHcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=300
BUILD_PROF_LIBS = NO
SplitObjs = NO
SplitSections = NO
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
BUILD_MAN = NO
' >> mk/build.mk
./boot
./configure --enable-tarballs-autodownload
make ${THREADS} &
git clone --recursive git://git.haskell.org/ghc.git ${TREE_DIR}/noCalls
cd ${TREE_DIR}/noCalls
git remote add noCalls https://github.com/AndreasPK/ghc.git
git fetch noCalls
git checkout noCalls/layoutOpt
git submodule update --init --recursive
git clean -fd
echo 'SRC_HC_OPTS = -O -H64m
GhcStage1HcOpts = -O2
GhcStage2HcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=-3000
GhcLibHcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=-3000
GhcRtsHcOpts = -O2 -fnew-blocklayout -fvanilla-blocklayout -fcfg-weights=callWeight=-3000
BUILD_PROF_LIBS = NO
SplitObjs = NO
SplitSections = NO
HADDOCK_DOCS = NO
BUILD_SPHINX_HTML = NO
BUILD_SPHINX_PDF = NO
BUILD_MAN = NO
' >> mk/build.mk
./boot
./configure --enable-tarballs-autodownload
make ${THREADS} &
wait
echo "Done"