Commit 5300d02
committed
Add --enable-library-bytecode option for building bytecode libraries
The new `Cabal` and `cabal-install` option tells GHC to build a
bytecode library.
* When GHC is invoked, bytecode objects are also produced.
* A bytecode library is created during linking.
* The bytecode library is installed when the package is installed.
* The `bytecode-library-dirs` field can be populated to instruct GHC
where to find the bytecode library for a package. (This can be useful
if the bytecode libraries are distributed separately from the other
libraries).
The bytecode object files are produced alongside an existing build way.
They are prioritised in this order (`-dyn-too`, `-dynamic`, `-static`).
Bytecode libraries can't be produced standalone at the moment. You have
to produce them alongside an existing build way. This is due to
limitations in GHC.
At the moment, there is not support implemented for creating profiled
bytecode libraries.
Implements haskell/cabal-proposals#2
Fixes #111881 parent a3162da commit 5300d02
File tree
56 files changed
+529
-42
lines changed- Cabal-syntax/src/Distribution/Types
- InstalledPackageInfo
- Cabal/src/Distribution
- Simple
- GHC
- Build
- Program
- Setup
- Types
- cabal-install
- parser-tests/Tests
- files/project-config-local-packages
- src/Distribution/Client
- ProjectConfig
- tests/UnitTests/Distribution/Client
- cabal-testsuite/PackageTests
- LibraryBytecodeCSources
- cbits
- LibraryBytecodeInstall
- pkg-a
- cbits
- pkg-b
- LibraryBytecodeStandalone
- LibraryBytecodeUnsupported
- LibraryBytecode
- changelog.d
- doc
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
56 files changed
+529
-42
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
160 | 161 | | |
161 | 162 | | |
162 | 163 | | |
| 164 | + | |
163 | 165 | | |
164 | 166 | | |
165 | 167 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
| 111 | + | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
409 | 410 | | |
410 | 411 | | |
411 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
412 | 416 | | |
413 | 417 | | |
414 | 418 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
7 | 11 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
82 | 83 | | |
83 | 84 | | |
84 | 85 | | |
| |||
575 | 576 | | |
576 | 577 | | |
577 | 578 | | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
578 | 587 | | |
579 | 588 | | |
580 | 589 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
756 | 759 | | |
757 | 760 | | |
758 | 761 | | |
| |||
780 | 783 | | |
781 | 784 | | |
782 | 785 | | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
783 | 795 | | |
784 | 796 | | |
785 | 797 | | |
786 | 798 | | |
787 | 799 | | |
788 | 800 | | |
| 801 | + | |
789 | 802 | | |
790 | 803 | | |
791 | 804 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
304 | 305 | | |
305 | 306 | | |
306 | 307 | | |
| 308 | + | |
307 | 309 | | |
308 | 310 | | |
309 | 311 | | |
| |||
804 | 806 | | |
805 | 807 | | |
806 | 808 | | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
986 | 986 | | |
987 | 987 | | |
988 | 988 | | |
| 989 | + | |
| 990 | + | |
989 | 991 | | |
990 | 992 | | |
991 | 993 | | |
| |||
1095 | 1097 | | |
1096 | 1098 | | |
1097 | 1099 | | |
| 1100 | + | |
1098 | 1101 | | |
1099 | 1102 | | |
1100 | 1103 | | |
| |||
1111 | 1114 | | |
1112 | 1115 | | |
1113 | 1116 | | |
| 1117 | + | |
1114 | 1118 | | |
1115 | 1119 | | |
1116 | 1120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
279 | 279 | | |
280 | 280 | | |
281 | 281 | | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
282 | 285 | | |
283 | 286 | | |
284 | 287 | | |
| |||
295 | 298 | | |
296 | 299 | | |
297 | 300 | | |
298 | | - | |
299 | | - | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
300 | 309 | | |
301 | 310 | | |
302 | 311 | | |
303 | 312 | | |
304 | 313 | | |
305 | 314 | | |
306 | 315 | | |
307 | | - | |
| 316 | + | |
308 | 317 | | |
309 | | - | |
| 318 | + | |
310 | 319 | | |
311 | 320 | | |
312 | 321 | | |
313 | 322 | | |
314 | | - | |
| 323 | + | |
315 | 324 | | |
316 | 325 | | |
317 | 326 | | |
| |||
323 | 332 | | |
324 | 333 | | |
325 | 334 | | |
326 | | - | |
327 | | - | |
| 335 | + | |
| 336 | + | |
328 | 337 | | |
329 | 338 | | |
330 | 339 | | |
331 | 340 | | |
332 | 341 | | |
333 | 342 | | |
334 | 343 | | |
335 | | - | |
| 344 | + | |
336 | 345 | | |
337 | 346 | | |
338 | 347 | | |
| |||
343 | 352 | | |
344 | 353 | | |
345 | 354 | | |
| 355 | + | |
346 | 356 | | |
347 | 357 | | |
348 | 358 | | |
| |||
435 | 445 | | |
436 | 446 | | |
437 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
438 | 454 | | |
439 | | - | |
440 | | - | |
441 | | - | |
442 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
443 | 459 | | |
444 | 460 | | |
445 | 461 | | |
| |||
457 | 473 | | |
458 | 474 | | |
459 | 475 | | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
460 | 480 | | |
461 | 481 | | |
462 | 482 | | |
| |||
470 | 490 | | |
471 | 491 | | |
472 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
473 | 497 | | |
474 | 498 | | |
475 | 499 | | |
| |||
0 commit comments