Commit fd5fec4
committed
Guard JS modules behind HAVE_JS_BACKEND and disable library-for-ghci for stage1
- Guard GHC.HsToCore.Foreign.JavaScript import and ArchJavaScript pattern
matches in dsFImport/dsFExport behind #if defined(HAVE_JS_BACKEND), matching
the existing HAVE_INTERPRETER guard pattern for Wasm.
- Move 11 JS-related modules (GHC.HsToCore.Foreign.JavaScript, GHC.JS.*)
from unconditional Exposed-Modules to the if flag(js-backend) section in
ghc.cabal.in. These modules are only needed when the JS backend is enabled
and were being compiled unconditionally in stage1 despite -js-backend.
- Set library-for-ghci: False in cabal.project.stage1. Stage1 never loads
libraries interactively, so generating GHCi-compatible .o files from every
.a archive is pure waste. Stage2 retains library-for-ghci: True.
Estimated stage1 build time savings: 3-7% on top of existing minimal-stage1.1 parent d898c0d commit fd5fec4
3 files changed
Lines changed: 19 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
136 | 138 | | |
137 | 139 | | |
138 | 140 | | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| 145 | + | |
142 | 146 | | |
143 | 147 | | |
144 | 148 | | |
| |||
184 | 188 | | |
185 | 189 | | |
186 | 190 | | |
| 191 | + | |
187 | 192 | | |
188 | 193 | | |
189 | 194 | | |
| 195 | + | |
190 | 196 | | |
191 | 197 | | |
192 | 198 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
630 | 630 | | |
631 | 631 | | |
632 | 632 | | |
633 | | - | |
634 | 633 | | |
635 | 634 | | |
636 | 635 | | |
| |||
681 | 680 | | |
682 | 681 | | |
683 | 682 | | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
690 | | - | |
691 | | - | |
692 | | - | |
693 | | - | |
694 | 683 | | |
695 | 684 | | |
696 | 685 | | |
| |||
1097 | 1086 | | |
1098 | 1087 | | |
1099 | 1088 | | |
1100 | | - | |
| 1089 | + | |
1101 | 1090 | | |
1102 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
1103 | 1103 | | |
1104 | 1104 | | |
1105 | 1105 | | |
| |||
0 commit comments