Skip to content

Commit

Permalink
WIP: Support GHC 9.10
Browse files Browse the repository at this point in the history
  • Loading branch information
langston-barrett committed Feb 13, 2025
1 parent 50d1550 commit 2eb5a94
Show file tree
Hide file tree
Showing 20 changed files with 48 additions and 27 deletions.
8 changes: 5 additions & 3 deletions .github/Dockerfile-crux-llvm
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# If you update this version number, make sure to update the value of
# LINUX_LLVM_VER in .github/ci.sh (in the install_llvm() function).
ARG LLVM_VER=14
ARG GHC_VER=9.6.5

FROM ubuntu:22.04 AS build
ARG LLVM_VER
ARG GHC_VER

RUN apt-get update && \
apt-get install -y \
Expand All @@ -27,7 +29,7 @@ ADD crux ${CRUX_BUILD_DIR}/crux
ADD crux-llvm ${CRUX_BUILD_DIR}/crux-llvm
ADD dependencies ${CRUX_BUILD_DIR}/dependencies
ADD .github/cabal.project.crux-llvm ${CRUX_BUILD_DIR}/cabal.project
ADD cabal.GHC-9.4.8.config ${CRUX_BUILD_DIR}/cabal.project.freeze
ADD cabal.GHC-${GHC_VER}.config ${CRUX_BUILD_DIR}/cabal.project.freeze
# Workaround until we have a more recent LLVM build available
RUN cp ${CRUX_BUILD_DIR}/crux-llvm/c-src/libcxx-7.1.0.bc ${CRUX_BUILD_DIR}/crux-llvm/c-src/libcxx-${LLVM_VER}.0.0.bc

Expand Down Expand Up @@ -56,8 +58,8 @@ RUN mkdir -p /home/crux-llvm/.local/bin && \
RUN mkdir -p /home/crux-llvm/.ghcup && \
ghcup --version && \
ghcup install cabal 3.10.3.0 && \
ghcup install ghc 9.4.8 && \
ghcup set ghc 9.4.8
ghcup install ghc ${GHC_VER} && \
ghcup set ghc ${GHC_VER}

WORKDIR ${CRUX_BUILD_DIR}
RUN cabal v2-update && \
Expand Down
8 changes: 5 additions & 3 deletions .github/Dockerfile-crux-mir
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
# .github/workflows/crux-mir-build.yml
ARG RUST_TOOLCHAIN="nightly-2023-01-23"
ARG CRUX_BUILD_DIR=/crux-mir/build
ARG GHC_VER=9.6.5

FROM ubuntu:22.04 AS build
ARG RUST_TOOLCHAIN
ARG CRUX_BUILD_DIR
ARG GHC_VER

RUN apt-get update && \
apt-get install -y \
Expand All @@ -26,7 +28,7 @@ ADD crux ${CRUX_BUILD_DIR}/crux
ADD crux-mir ${CRUX_BUILD_DIR}/crux-mir
ADD dependencies ${CRUX_BUILD_DIR}/dependencies
ADD .github/cabal.project.crux-mir ${CRUX_BUILD_DIR}/cabal.project
ADD cabal.GHC-9.4.8.config ${CRUX_BUILD_DIR}/cabal.project.freeze
ADD cabal.GHC-${GHC_VER}.config ${CRUX_BUILD_DIR}/cabal.project.freeze

RUN useradd -m crux-mir && chown -R crux-mir:crux-mir /crux-mir
USER crux-mir
Expand Down Expand Up @@ -56,8 +58,8 @@ RUN mkdir -p /home/crux-mir/.local/bin && \
RUN mkdir -p /home/crux-mir/.ghcup && \
ghcup --version && \
ghcup install cabal 3.10.3.0 && \
ghcup install ghc 9.4.8 && \
ghcup set ghc 9.4.8
ghcup install ghc ${GHC_VER} && \
ghcup set ghc ${GHC_VER}

WORKDIR ${CRUX_BUILD_DIR}/crux-mir
RUN ./translate_libs.sh
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/crucible-go-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
matrix:
os: [ubuntu-22.04]
cabal: ["3.10.3.0"]
ghc: ["9.4.8", "9.6.5", "9.8.2"]
ghc: ["9.6.5", "9.8.2", "9.10.1"]
include:
- os: macos-14
cabal: 3.10.3.0
ghc: 9.8.2
ghc: 9.10.1
- os: windows-2019
cabal: 3.10.3.0
ghc: 9.8.2
ghc: 9.10.1
name: crucible-go - GHC v${{ matrix.ghc }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -93,6 +93,7 @@ jobs:
9.4.8) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.6.5) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.8.2) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.10.1) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
*) GHC_NIXPKGS=github:nixos/nixpkgs/21.11 ;;
esac
echo NS="nix shell ${GHC_NIXPKGS}#cabal-install ${GHC_NIXPKGS}#${GHC} nixpkgs#gmp nixpkgs#zlib nixpkgs#zlib.dev" >> $GITHUB_ENV
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/crucible-jvm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
matrix:
os: [ubuntu-22.04]
cabal: ["3.10.3.0"]
ghc: ["9.4.8", "9.6.5", "9.8.2"]
ghc: ["9.6.5", "9.8.2", "9.10.1"]
include:
- os: macos-14
cabal: 3.10.3.0
ghc: 9.8.2
ghc: 9.10.1
- os: windows-2019
cabal: 3.10.3.0
ghc: 9.8.2
ghc: 9.10.1
name: crucible-jvm - GHC v${{ matrix.ghc }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -93,6 +93,7 @@ jobs:
9.4.8) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.6.5) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.8.2) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.10.1) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
*) GHC_NIXPKGS=github:nixos/nixpkgs/21.11 ;;
esac
echo NS="nix shell ${GHC_NIXPKGS}#cabal-install ${GHC_NIXPKGS}#${GHC} nixpkgs#gmp nixpkgs#zlib nixpkgs#zlib.dev" >> $GITHUB_ENV
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/crucible-wasm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ jobs:
matrix:
os: [ubuntu-22.04]
cabal: ["3.10.3.0"]
ghc: ["9.4.8", "9.6.5", "9.8.2"]
ghc: ["9.6.5", "9.8.2", "9.10.1"]
include:
- os: macos-14
cabal: 3.10.3.0
ghc: 9.8.2
ghc: 9.10.1
- os: windows-2019
cabal: 3.10.3.0
ghc: 9.8.2
ghc: 9.10.1
name: crucible-wasm - GHC v${{ matrix.ghc }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -90,9 +90,9 @@ jobs:
run: |
GHC=haskell.compiler.ghc$(echo ${{ matrix.ghc }} | sed -e s,\\.,,g)
case ${{ matrix.ghc }} in
9.4.8) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.6.5) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.8.2) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.10.1) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
*) GHC_NIXPKGS=github:nixos/nixpkgs/21.11 ;;
esac
echo NS="nix shell ${GHC_NIXPKGS}#cabal-install ${GHC_NIXPKGS}#${GHC} nixpkgs#gmp nixpkgs#zlib nixpkgs#zlib.dev" >> $GITHUB_ENV
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/crux-llvm-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,17 @@ jobs:
matrix:
os: [ubuntu-22.04]
cabal: ["3.10.3.0"]
ghc: ["9.4.8", "9.6.5", "9.8.2"]
ghc: ["9.6.5", "9.8.2", "9.10.1"]
include:
- os: ubuntu-20.04
cabal: 3.10.3.0
ghc: 9.4.8
ghc: 9.10.1
- os: macos-14
cabal: 3.10.3.0
ghc: 9.4.8
ghc: 9.10.1
- os: windows-2019
cabal: 3.10.3.0
ghc: 9.4.8
ghc: 9.10.1
name: crux-llvm - GHC v${{ matrix.ghc }} - ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -133,6 +133,7 @@ jobs:
9.4.8) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.6.5) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.8.2) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.10.1) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
*) GHC_NIXPKGS=github:nixos/nixpkgs/21.11 ;;
esac
echo NS="nix shell ${GHC_NIXPKGS}#cabal-install ${GHC_NIXPKGS}#${GHC} nixpkgs#gmp nixpkgs#zlib nixpkgs#zlib.dev" >> $GITHUB_ENV
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/crux-mir-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ jobs:
9.4.8) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.6.5) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.8.2) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
9.10.1) GHC_NIXPKGS=github:nixos/nixpkgs/nixos-24.05 ;;
*) GHC_NIXPKGS=github:nixos/nixpkgs/21.11 ;;
esac
echo NS="nix shell ${GHC_NIXPKGS}#cabal-install ${GHC_NIXPKGS}#${GHC} nixpkgs#gmp nixpkgs#zlib nixpkgs#zlib.dev" >> $GITHUB_ENV
Expand Down
4 changes: 4 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
--
-- export PATH=$PWD/dist-newstyle/build/x86_64-linux/ghc-7.10.3/hpb-0.1.1/c/hpb/build/hpb:$PATH

-- TODO: https://github.com/travitch/itanium-abi/pull/15
allow-newer: itanium-abi:text
allow-newer: boomerang:template-haskell

packages:
crucible/
crucible-cli/
Expand Down
1 change: 1 addition & 0 deletions crucible-llvm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# next -- TBA

* Add support for GHC 9.10
* Fix a bug in which the memory model would panic when attempting to unpack
constant string literals.

Expand Down
2 changes: 1 addition & 1 deletion crucible-llvm/crucible-llvm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ common bldflags
library
import: bldflags
build-depends:
base >= 4.13 && < 4.20,
base >= 4.13 && < 4.21,
attoparsec,
bv-sized >= 1.0.0,
bytestring,
Expand Down
4 changes: 4 additions & 0 deletions crucible-symio/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Revision history for crucible-symio

# next

* Add support for GHC 9.10

## 0.1.1 -- 2024-08-30

* Add support for GHC 9.8
Expand Down
2 changes: 1 addition & 1 deletion crucible-symio/crucible-symio.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source-repository head
subdir: crucible-symio

common shared
build-depends: base >=4.12 && <4.20,
build-depends: base >=4.12 && <4.21,
aeson,
bv-sized,
bytestring,
Expand Down
1 change: 1 addition & 0 deletions crucible/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# next -- TBA

* Add support for GHC 9.10
* Add support for Bitwuzla as an online SMT solver backend.
* Add a function `ppTypeRepr` to `Lang.Crucible.Types` for pretty-printing
`TypeRepr`s. Modify the `Pretty` instance to use this function.
Expand Down
2 changes: 1 addition & 1 deletion crucible/crucible.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ library
import: bldflags
build-depends:
async,
base >= 4.13 && < 4.20,
base >= 4.13 && < 4.21,
bimap,
bv-sized >= 1.0.0 && < 1.1,
containers >= 0.5.9.0,
Expand Down
2 changes: 1 addition & 1 deletion crucible/src/Lang/Crucible/Utils/BitSet.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import Data.Bits
import Data.Word
import Data.Hashable
import qualified Data.List as List
import Prelude hiding (null, foldr, foldl)
import Prelude hiding (null, foldr, foldl, foldl')

newtype BitSet a = BitSet { getBits :: Integer }
deriving (Show, Eq, Ord)
Expand Down
1 change: 1 addition & 0 deletions crux-llvm/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# next -- TBA

* Add support for GHC 9.10.
* Add support for the Bitwuzla SMT solver in the test suite.
* Add `--debug` option for starting the Crucible debugger.

Expand Down
2 changes: 1 addition & 1 deletion crux-llvm/crux-llvm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ common bldflags
-Wincomplete-uni-patterns
ghc-prof-options: -O2
default-language: Haskell2010
build-depends: base >= 4.8 && < 4.20
build-depends: base >= 4.8 && < 4.21
, bytestring
, containers
, crucible
Expand Down
1 change: 1 addition & 0 deletions crux-mir/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# next -- TBA

* Add support for GHC 9.10
* Add `--debug` option for starting the Crucible debugger.

# 0.9 -- 2024-08-30
Expand Down
1 change: 1 addition & 0 deletions crux/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# next -- TBA

* Add support for GHC 9.10
* Add support for the Bitwuzla SMT solver.
* Add `--debug` option for starting the Crucible debugger.
* For the sake of the `--debug` flag, Crux now depends on the
Expand Down
4 changes: 2 additions & 2 deletions uc-crux-llvm/uc-crux-llvm.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ library
build-depends:
aeson,
async,
base >= 4.8 && < 4.20,
base >= 4.8 && < 4.21,
bv-sized,
bytestring,
containers,
Expand Down Expand Up @@ -217,7 +217,7 @@ executable uc-crux-llvm
hs-source-dirs: exe

build-depends:
base >= 4.8 && < 4.20,
base >= 4.8 && < 4.21,
uc-crux-llvm

ghc-options: -threaded
Expand Down

0 comments on commit 2eb5a94

Please sign in to comment.