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

Andreas make-build changes #4

Draft
wants to merge 64 commits into
base: wip/make-build
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b8d78ee
chore(hie.yaml): add Build.hs
andreabedini Feb 18, 2025
78c15fb
fix(rts): bump cabal-version
andreabedini Feb 12, 2025
845440c
chore(rts): remove another leftover file
andreabedini Feb 12, 2025
71a9355
refactor(rts): add --with-compiler to rts/configure.ac
andreabedini Feb 27, 2025
b53279e
chore: remove libraries/defineTOP.mk
andreabedini Dec 3, 2024
d6dd0ff
refactor(autoconf): drop FP_CHECK_TIMER_CREATE
andreabedini Dec 19, 2024
a6a1652
refactor(autoconf): drop FP_SET_CFLAGS_C99
andreabedini Dec 19, 2024
b109395
refactor(autoconf): remove inappropriate test in configure.ac
andreabedini Dec 19, 2024
a7578e7
refactor: remove boot script
andreabedini Feb 11, 2025
013c9e7
refactor(compiler,hadrian): Remove runtime LLVM version check
andreabedini Feb 20, 2025
1e34a0e
refactor(rts): do not generate event types
andreabedini Feb 24, 2025
5ff07b4
ci: switch to haskell/ghcup-setup@v1
andreabedini Jan 24, 2025
c7ddac2
ci: cache aggressively
andreabedini Feb 14, 2025
269c895
feat: inline all the versions
andreabedini Feb 20, 2025
ce12e2d
FIXME ci: add cabal-install workflow
andreabedini Feb 24, 2025
a9ae5ac
refactor(rts-headers): Move shared headers to new package
andreabedini Feb 26, 2025
5c75136
refactor(rts-fs): turn utils/fs into a cabal package
andreabedini Feb 27, 2025
6eb8b9b
feat(ghc): generate ghcversion.h on the fly
andreabedini Feb 26, 2025
c1f34e9
refactor(rts): simplify creation of rts/ghcautoconf.h
andreabedini Feb 27, 2025
5c68f66
refactor(rts): simplify creation of ghcplatform.h
andreabedini Feb 18, 2025
cd5ee06
feat: replace some submodules with official versions
andreabedini Feb 14, 2025
bc9af29
refactor(rts/configure.ac): produce rts.buildinfo in a more standard way
andreabedini Feb 27, 2025
c1fc761
refactor(rts/configure.ac): simplify config variables
andreabedini Feb 27, 2025
567672b
refactor(rts/configure.ac): checking for rts.cabal is more reliable
andreabedini Feb 27, 2025
0cc3ba2
chore: re-enable shared executables
andreabedini Feb 20, 2025
c66ef86
chore: normalise .gitmodules
andreabedini Feb 27, 2025
20ad77c
refactor(rts): generate derived constants in rts/configure.ac
andreabedini Feb 28, 2025
7e6d727
build: simple Makefile
andreabedini Feb 28, 2025
27dc5cd
feat(ghc-toolchain): add otool and install_name_tool
andreabedini Feb 27, 2025
80d8600
build: use ghc-toolchain for settings
andreabedini Feb 28, 2025
15bdbdc
ci: adds cross-platform build support/ci via nix
angerman Feb 27, 2025
91b238e
refactor: use cabal main exes rather than act-as-setup
andreabedini Feb 28, 2025
7554a21
ci: use original makefile for ci.yml
andreabedini Feb 28, 2025
bc6ff15
WIP
andreabedini Feb 28, 2025
1b12e5b
wip: rts derived constants
andreabedini Feb 26, 2025
64db5c6
WIP
andreabedini Feb 28, 2025
8dd977e
ci: remove ci.yml
andreabedini Feb 28, 2025
4a41678
WIP
andreabedini Feb 28, 2025
904621f
We need `-fcommon`.
angerman Mar 1, 2025
9e19018
Adding HADRIAN_SETTINGS.
angerman Mar 1, 2025
5b55c2b
Fixup ghcversion.h generation
angerman Mar 1, 2025
b65ea4b
fixup! Adding HADRIAN_SETTINGS.
angerman Mar 1, 2025
78d1f26
Allow the rts to have dependencies.
angerman Mar 2, 2025
9dcb67a
Depend on settings for the rts (for now)
angerman Mar 2, 2025
9babaee
We need ghc-pkg
angerman Mar 2, 2025
db90da3
Build in parallel
angerman Mar 2, 2025
eb9aeca
bump cabal reference
angerman Mar 2, 2025
39957fb
Add genapply to the rts:Setup
angerman Mar 2, 2025
2252dc1
fixup! feat(ghc-toolchain): add otool and install_name_tool
angerman Mar 3, 2025
fe86627
Move ghcversion into the rts, and pass the defines from GHC.
angerman Mar 21, 2025
1ea0645
Make rts.setup properly declare it's setup-depends
angerman Mar 21, 2025
361ca98
Set the default value for Relative Global Package DB
angerman Mar 21, 2025
2e0d1dd
Fix cabal projects
angerman Mar 21, 2025
3218299
fixup! Move ghcversion into the rts, and pass the defines from GHC.
angerman Mar 21, 2025
82ae45d
Add ghcversion.h to rts-headers
angerman Mar 21, 2025
9668158
Drop ghcversion from rts.cabal
angerman Mar 21, 2025
db3383d
`ghcversion.h`, not `<ghcversion.h>`.
angerman Mar 21, 2025
0fcd7be
Add `-no-ghcversion-header` flag to ghc.
angerman Mar 21, 2025
2092f90
fixup! Drop ghcversion from rts.cabal
angerman Mar 21, 2025
30877e4
fixup! Move ghcversion into the rts, and pass the defines from GHC.
angerman Mar 21, 2025
3dcc8ee
Don't pass `ghcversion.h` when building the rts.
angerman Mar 21, 2025
da47326
Add Cabal/Cabal-syntax to the boot lirbaries.
angerman Mar 21, 2025
d959bf4
Update Makefile
angerman Mar 21, 2025
99bec78
Clarify rts.
angerman Mar 21, 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
7 changes: 7 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Check if nix-direnv is already loaded; if not, source it
if ! has nix_direnv_reload; then
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/2.2.0/direnvrc" "sha256-+IuxtJIDzJIlHDAxyzr7M2S3FD +zSd/BNfZe+ntXje0="
fi

# Use the specified flake to enter the Nix development environment
use flake github:input-output-hk/devx#ghc98-minimal-ghc
120 changes: 120 additions & 0 deletions .github/workflows/ci-cabal-install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: CI mostly cabal-install

# 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"

- id: ghc-path
name: Set GHC install directory
run: |
DIR=${{ github.workspace }}/ghc-${{ matrix.ghc }}
echo "path=$DIR" >> $GITHUB_OUTPUT
echo "$DIR/bin" >> $GITHUB_PATH

- id: cache-ghc
name: Restore bootstrap compiler
uses: actions/cache/restore@v4
with:
key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}
path: ${{ steps.ghc-path.outputs.path }}

- if: steps.cache-ghc.outputs.cache-hit != 'true'
name: Install ghcup
uses: haskell/ghcup-setup@v1

- if: steps.cache-ghc.outputs.cache-hit != 'true'
name: Install bootstrap compiler
run: |
ghcup install ghc ${{ matrix.ghc }} --isolate ${{ steps.ghc-path.output.path }}
ghcup install cabal latest --isolate ${{ steps.ghc-path.outputs.path }}/bin

- id: cabal-paths
run: |
cabal user-config init
echo "store=$(cabal path --store-dir)" >> $GITHUB_OUTPUT
echo "remote-repo-cache=$(cabal path --remote-repo-cache)" >> $GITHUB_OUTPUT

- name: Restore Hackage index and source packages
uses: actions/cache/restore@v4
with:
key: hackage-${{ github.run_id }}
restore-keys: hackage-
path: ${{ steps.cabal-paths.outputs.remote-repo-cache }}

- name: Restore cabal store
uses: actions/cache/restore@v4
with:
key: store-${{ matrix.os }}-${{ matrix.ghc }}-${{ github.run_id }}
restore-keys: store-${{ matrix.os }}-${{ matrix.ghc }}-
path: ${{ steps.cabal-paths.outputs.store }}

- name: Restore build artifacts
uses: actions/cache/restore@v4
with:
key: build-${{ matrix.os }}-${{ matrix.ghc }}-${{ github.run_id }}
restore-keys: build-${{ matrix.os }}-${{ matrix.ghc }}-
path: _build _stage0 _stage1 _stage1-rts _stage1-boot

- name: Update Hackage index
run: cabal update

- name: Build
run: make

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: stage1
path: _stage1

- name: Save build artifacts
uses: actions/cache/save@v4
if: always()
with:
key: build-${{ matrix.os }}-${{ matrix.ghc }}-${{ github.run_id }}
path: _build _stage0 _stage1 _stage1-rts _stage1-boot

- name: Save cabal store
uses: actions/cache/save@v4
if: always()
with:
key: store-${{ matrix.os }}-${{ matrix.ghc }}-${{ github.run_id }}
path: ${{ steps.cabal-paths.outputs.store }}

- name: Save Hackage index and source packages
uses: actions/cache/save@v4
if: always()
with:
key: hackage-${{ github.run_id }}
path: ${{ steps.cabal-paths.outputs.remote-repo-cache }}

- name: Save bootstrap compiler
uses: actions/cache/save@v4
if: steps.cache-ghc.outputs.cache-hit != 'true'
with:
key: ${{ matrix.os }}-ghc-${{ matrix.ghc }}
path: ${{ steps.ghc-path.outputs.path }}

64 changes: 0 additions & 64 deletions .github/workflows/ci.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/nix-based.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI (with nix)

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

defaults:
run:
shell: devx {0}

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

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

- name: Build
uses: input-output-hk/actions/devx@latest
with:
platform: ${{ matrix.os == 'ubuntu-latest' && 'x86_64-linux' || 'aarch64-darwin' }}
compiler-nix-name: ${{ matrix.ghc }}
minimal: true
ghc: true

- run: cabal update

- name: Build stage1
run: make stage1

- name: Build stage1-rts
run: make stage1-rts
21 changes: 0 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,6 @@ _darcs/
/compiler/MachRegs.h
/compiler/MachRegs
/compiler/GHC/CmmToLlvm/Version/Bounds.hs
/compiler/ghc.cabal
/compiler/ghc.cabal.old
/distrib/configure.ac
/distrib/ghc.iss
/docs/index.html
Expand All @@ -138,7 +136,6 @@ _darcs/
/docs/users_guide/utils.pyc
/driver/ghci/ghc-pkg-inplace
/driver/ghci/ghci-inplace
/driver/ghci/ghci-wrapper.cabal
/driver/ghci/ghci.res
/driver/ghci/cwrapper.c
/driver/ghci/cwrapper.h
Expand All @@ -150,7 +147,6 @@ _darcs/
/driver/package.conf.inplace.old
/settings
/ghc.spec
/ghc/ghc-bin.cabal
/index.html
/inplace/
/libffi/build/
Expand All @@ -165,29 +161,19 @@ _darcs/
/libraries/doc-index*.html
/libraries/frames.html
/libraries/ghc-boot/GNUmakefile
/libraries/ghc-boot/ghc-boot.cabal
/libraries/ghc-boot-th/GNUmakefile
/libraries/ghc-boot-th/ghc-boot-th.cabal
/libraries/ghc-boot-th-next/ghc-boot-th-next.cabal
/libraries/ghc-boot-th/ghc.mk
/libraries/ghc-heap/ghc-heap.cabal
/libraries/ghc-internal/ghc-internal.cabal
/libraries/ghc-experimental/ghc-experimental.cabal
/libraries/base/base.cabal
/libraries/ghci/GNUmakefile
/libraries/ghci/ghci.cabal
/libraries/ghci/ghc.mk
/libraries/haddock-util.js
/libraries/hslogo-16.png
/libraries/index-frames.html
/libraries/index.html
/libraries/libiserv/libiserv.cabal
/libraries/minus.gif
/libraries/ocean.css
/libraries/plus.gif
/libraries/synopsis.png
/libraries/stamp/
/libraries/template-haskell/template-haskell.cabal
/linter.log
/mk/are-validating.mk
/mk/build.mk
Expand All @@ -202,13 +188,6 @@ _darcs/
/testsuite_summary*.txt
/testsuite*.xml
/testlog*
/utils/iserv/iserv.cabal
/utils/iserv-proxy/iserv-proxy.cabal
/utils/remote-iserv/remote-iserv.cabal
/utils/mkUserGuidePart/mkUserGuidePart.cabal
/utils/runghc/runghc.cabal
/utils/gen-dll/gen-dll.cabal
/utils/ghc-pkg/ghc-pkg.cabal
utils/unlit/fs.*
libraries/ghc-internal/include/fs.h
libraries/ghc-internal/cbits/fs.c
Expand Down
7 changes: 6 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,20 @@
[submodule "gmp-tarballs"]
path = libraries/ghc-internal/gmp/gmp-tarballs
url = https://gitlab.haskell.org/ghc/gmp-tarballs.git
ignore = untracked
[submodule "libraries/exceptions"]
path = libraries/exceptions
url = https://gitlab.haskell.org/ghc/packages/exceptions.git
ignore = untracked
[submodule "utils/hpc"]
path = utils/hpc
url = https://gitlab.haskell.org/hpc/hpc-bin.git
ignore = untracked
[submodule "libraries/os-string"]
path = libraries/os-string
url = https://gitlab.haskell.org/ghc/packages/os-string
url = https://gitlab.haskell.org/ghc/packages/os-string.git
ignore = untracked
[submodule "libraries/file-io"]
path = libraries/file-io
url = https://gitlab.haskell.org/ghc/packages/file-io.git
ignore = untracked
Loading
Loading