Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build GHC with cabal-install and a Makefile #3

Draft
wants to merge 76 commits into
base: tmp/make-build-offset
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
3b6e7b1
Add github workflow
hsyl20 Nov 15, 2024
7ef5f05
Build GHC with cabal-install and a Makefile
hsyl20 Nov 27, 2024
a03c95c
Generate proper settings for ghc-boot
hsyl20 Nov 27, 2024
b9d460f
Build stage0 tools: ghc-pkg, deriveConstants, genprimopcode
hsyl20 Nov 27, 2024
af7a7ce
Generate proper stage1 settings
hsyl20 Nov 27, 2024
38f96a9
Fix installation of stage1 programs. WIP using stage1 compiler
hsyl20 Nov 28, 2024
4137c76
Fix path to stage1 package db
hsyl20 Nov 28, 2024
304d917
Progress towards building the RTS
hsyl20 Nov 28, 2024
ff24e40
Fix CPP for Cmm
hsyl20 Nov 28, 2024
cd7e255
Apply suggestions
hsyl20 Nov 29, 2024
b878f1a
Allow specifying custom cabal
hsyl20 Dec 3, 2024
07abc0d
Start with deriveConstants
hsyl20 Dec 3, 2024
8b4cdfc
Generate DerivedConstants.h with a hack
hsyl20 Dec 3, 2024
c3eac1b
Pass -this-unit-id because cabal doesn't when it compiles Cmm files
hsyl20 Dec 3, 2024
5fadf5f
Try using per source flags
hsyl20 Dec 11, 2024
a15c85d
Fix rts per file flags
hsyl20 Dec 11, 2024
0b275d3
Generate AutoApply*.cmm
hsyl20 Dec 13, 2024
4388e76
Build libffi
hsyl20 Dec 16, 2024
fce763a
Progress building ghc-prim
hsyl20 Dec 18, 2024
2abe03e
Build ghc-prim
hsyl20 Dec 18, 2024
51994a3
refactor: avoid hack when checking size of struct MD5Context
andreabedini Dec 19, 2024
ad48a08
Build ghc-bignum
hsyl20 Dec 18, 2024
af0275d
WIP: build ghc-internal
hsyl20 Jan 7, 2025
13f1d3c
Fix new error while bootstrapping
hsyl20 Jan 8, 2025
3589356
Fix more stuff
hsyl20 Jan 8, 2025
a63608f
Build base
hsyl20 Jan 8, 2025
3c0c08d
Build statically linked stage0 programs.
hsyl20 Jan 10, 2025
e2397b4
Add Haskell build script
hsyl20 Jan 10, 2025
4fee186
Build stage1 boot libraries with Build.hs
hsyl20 Jan 13, 2025
c9aa65d
Add timing to messages
hsyl20 Jan 13, 2025
cc421cf
Fix messages
hsyl20 Jan 13, 2025
7b0e5ca
Don't wire in the compiler
hsyl20 Jan 14, 2025
dbada6e
Fix options
hsyl20 Jan 14, 2025
d611659
Fix compiler path
hsyl20 Jan 14, 2025
8822716
Minor refactor
hsyl20 Jan 14, 2025
7fd82b1
Fix Makefile to use Build.hs
hsyl20 Jan 14, 2025
d49d25d
Fix Setup scripts
hsyl20 Jan 14, 2025
999b935
Add Alex
hsyl20 Jan 14, 2025
e6e97c7
Use the Makefile in CI
hsyl20 Jan 14, 2025
9da37f0
Comments
hsyl20 Jan 15, 2025
4ff9370
Cleanup
hsyl20 Jan 15, 2025
fd3029f
Generate cabal.project files for easier maintenance and parameterization
hsyl20 Jan 16, 2025
c8fd283
Fix passing ghc-options to the rts when building Cmm
hsyl20 Jan 16, 2025
872ec28
Fix hard-wired paths
hsyl20 Jan 16, 2025
cc91b7e
Fix fs.h for unlit
hsyl20 Jan 20, 2025
2ece465
Build all the boot libraries at once, including the rts
hsyl20 Jan 20, 2025
cc3e24c
Dump logs into files
hsyl20 Jan 20, 2025
5bc6c2d
Fix a few things found while trying to use "cabal install --lib"
hsyl20 Jan 20, 2025
a7570d2
Move Cabal submodule to our patched version
andreabedini Jan 21, 2025
fa5b181
Add patched cabal to Makefile
andreabedini Jan 21, 2025
8a91f42
Add TODO list
andreabedini Jan 21, 2025
0f029f9
Simplify Build.hs dependencies
andreabedini Jan 21, 2025
92816b6
Progress towards cabal-install install --lib
hsyl20 Jan 21, 2025
7e61646
Fix timestamps
hsyl20 Jan 21, 2025
cb88067
Use cabal install --lib to build boot libraries
hsyl20 Jan 22, 2025
9eaa75e
Parse package env
hsyl20 Jan 22, 2025
3e48043
Do not hardcode GHC version into Makefile
andreabedini Jan 23, 2025
9ceb814
chore: add Build.hs to hie.yaml
andreabedini Jan 23, 2025
650c647
Display output from cabal build
andreabedini Jan 23, 2025
ea16e5e
Separate cabal from GHC in GitHub workflow
andreabedini Jan 23, 2025
2e79dba
No need to recache a newly initialised packagedb
andreabedini Jan 24, 2025
d942040
Use GHC 9.8.4 on CI
hsyl20 Jan 24, 2025
f89fd48
Revert "Display output from cabal build"
hsyl20 Jan 24, 2025
678821b
Revert "Do not hardcode GHC version into Makefile"
hsyl20 Jan 24, 2025
461b108
Show logs on failure when building boot libs
hsyl20 Jan 24, 2025
2ee86bd
Add xxhash.h
hsyl20 Jan 24, 2025
733f9e1
Fix after merge of ghc-prim into ghc-internal
hsyl20 Jan 27, 2025
f92289a
Workaround environment file parsing
hsyl20 Jan 27, 2025
768340e
Better fix to package env without package dbs...
hsyl20 Jan 27, 2025
0c2ae8c
Prepare stage1's package db
hsyl20 Jan 27, 2025
f247074
Progress towards building more boot libraries and building stage2
hsyl20 Jan 27, 2025
77c6ed4
Fix package copy
hsyl20 Jan 27, 2025
652d447
Enable TNTC to avoid link issue for now
hsyl20 Jan 27, 2025
c35ce29
Workaround cabal bug with multiple flags
hsyl20 Jan 28, 2025
e25b51a
Try adding ffi to extra-libraries-static
hsyl20 Jan 28, 2025
706168f
Fix FS_NAMESPACE for the rts
hsyl20 Jan 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

# Trigger the workflow on push or pull request, but only for the master branch
on:
pull_request:
types:
- opened
- synchronize
push:
branches: [master]

jobs:
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ghc: ['9.8.4'] # bootstrapping compiler

steps:
- uses: actions/checkout@v4
with:
submodules: "recursive"

- uses: haskell-actions/setup@v2
id: setup
name: Setup Haskell tools
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "latest"
cabal-update: true

- name: Configure the build
run: ./boot

- name: Build patched cabal
run: make cabal

- name: Build the bindist
run: make
3 changes: 2 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
ignore = untracked
[submodule "libraries/Cabal"]
path = libraries/Cabal
url = https://gitlab.haskell.org/ghc/packages/Cabal.git
url = https://github.com/hsyl20/cabal
ignore = untracked
branch = hsyl20/per-file-extra-source-options
[submodule "libraries/containers"]
path = libraries/containers
url = https://gitlab.haskell.org/ghc/packages/containers.git
Expand Down
Loading