Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,6 @@ GIT_COMMIT_ID
.bash_history
.gitconfig

# Should be equal to testdir_suffix from testsuite/driver/testlib.py.
*.run

# -----------------------------------------------------------------------------
# ghc.nix
ghc.nix/
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,14 @@ _build/bindist/tests.tar.gz:

$(GHC1) $(GHC2): | hackage
hackage: _build/packages/hackage.haskell.org/01-index.tar.gz

# Always run cabal update. This makes sure that the index file won't go stale,
# whatever index-state we set in the project file. Reproducibility is left to
# index-state.
.PHONY: _build/packages/hackage.haskell.org/01-index.tar.gz
_build/packages/hackage.haskell.org/01-index.tar.gz: | $(CABAL)
@mkdir -p $(@D)
$(CABAL) $(CABAL_ARGS) update --index-state @1745256340
$(CABAL) $(CABAL_ARGS) update

# booted depends on successful source preparation
configure rts/configure libraries/ghc-internal/configure driver/ghci/ghci-wrapper.cabal libraries/base/base.cabal libraries/ghc-experimental/ghc-experimental.cabal libraries/ghc-boot-th-next/ghc-boot-th-next.cabal libraries/ghci/ghci.cabal libraries/ghc-boot-th/ghc-boot-th.cabal libraries/ghc-boot/ghc-boot.cabal libraries/template-haskell/template-haskell.cabal libraries/ghc-heap/ghc-heap.cabal libraries/ghc-internal/ghc-internal.cabal compiler/ghc.cabal utils/ghc-pkg/ghc-pkg.cabal utils/runghc/runghc.cabal utils/ghc-iserv/ghc-iserv.cabal utils/remote-iserv/remote-iserv.cabal ghc/ghc-bin.cabal: configure.ac rts/configure.ac libraries/ghc-internal/configure.ac libraries/ghc-boot-th-next/.synth-stamp driver/ghci/ghci-wrapper.cabal.in libraries/base/base.cabal.in libraries/ghc-experimental/ghc-experimental.cabal.in libraries/ghc-boot-th-next/ghc-boot-th-next.cabal.in libraries/ghci/ghci.cabal.in libraries/ghc-boot-th/ghc-boot-th.cabal.in libraries/ghc-boot/ghc-boot.cabal.in libraries/template-haskell/template-haskell.cabal.in libraries/ghc-heap/ghc-heap.cabal.in libraries/ghc-internal/ghc-internal.cabal.in compiler/ghc.cabal.in utils/ghc-pkg/ghc-pkg.cabal.in utils/runghc/runghc.cabal.in utils/ghc-iserv/ghc-iserv.cabal.in utils/remote-iserv/remote-iserv.cabal.in ghc/ghc-bin.cabal.in
Expand Down
51 changes: 51 additions & 0 deletions cabal.project.rts
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
-- NOTE: Yes. The strings have to be escaped like this.

package rts
ghc-options: "-optc-DProjectVersion=\"914\""
ghc-options: "-optc-DBuildPlatform=\"FIXME\""
ghc-options: "-optc-DBuildArch=\"FIXME\""
ghc-options: "-optc-DBuildOS=\"FIXME\""
ghc-options: "-optc-DBuildVendor=\"FIXME\""
ghc-options: "-optc-DGhcUnregisterised=\"FIXME\""
ghc-options: "-optc-DTablesNextToCode=\"FIXME\""
ghc-options: "-optc-DFS_NAMESPACE=rts"
ghc-options: -no-rts
flags: +tables-next-to-code

if os(linux)
package rts
ghc-options: "-optc-DHostArch=\"x86_64\""
ghc-options: "-optc-DHostOS=\"linux\""
ghc-options: "-optc-DHostPlatform=\"x86_64-unknown-linux\""
ghc-options: "-optc-DHostVendor=\"unknown\""

if os(darwin)
package rts
ghc-options: "-optc-DHostArch=\"aarch64\""
ghc-options: "-optc-DHostOS=\"darwin\""
ghc-options: "-optc-DHostPlatform=\"aarch64-apple-darwin\""
ghc-options: "-optc-DHostVendor=\"unknown\""
flags: +leading-underscore

if os(freebsd)
package rts
ghc-options: "-optc-DHostArch=\"x86_64\""
ghc-options: "-optc-DHostOS=\"freebsd\""
ghc-options: "-optc-DHostPlatform=\"x86_64-portbld-freebsd\""
ghc-options: "-optc-DHostVendor=\"unknown\""

if os(wasi)
package rts
ghc-options: "-optc-DHostArch=\"wasm32\""
ghc-options: "-optc-DHostOS=\"unknown\""
ghc-options: "-optc-DHostPlatform=\"wasm32-wasi\""
ghc-options: "-optc-DHostVendor=\"unknown\""
ghc-options: -optl-Wl,--export-dynamic
ghc-options: -optc-fvisibility=default
ghc-options: -optc-fvisibility-inlines-hidden

package rts-headers
ghc-options: -no-rts

package rts-fs
ghc-options: -no-rts
59 changes: 39 additions & 20 deletions cabal.project.stage1
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
index-state: 2025-10-26T19:17:08Z
allow-boot-library-installs: True
benchmarks: False
tests: False

packages:
-- NOTE: we need rts-headers, because the _newly_ built compiler depends
-- on these potentially _new_ headers, we must not rely on those from
Expand All @@ -8,38 +13,51 @@ packages:
rts-headers
rts-fs

-- other packages.
-- Compiler
ghc
compiler
libraries/directory
libraries/file-io
libraries/filepath
libraries/ghc-platform

-- Internal libraries
libraries/ghc-boot
libraries/ghc-boot-th-next
libraries/ghc-heap
libraries/ghc-platform
libraries/ghci
libraries/libffi-clib

-- Internal tools
utils/deriveConstants
utils/genapply
utils/genprimopcode
utils/ghc-pkg
utils/ghc-toolchain
utils/ghc-toolchain/exe
utils/unlit

-- The following are packages available on Hackage but included as submodules
libraries/Cabal/Cabal
libraries/Cabal/Cabal-syntax
libraries/directory
libraries/file-io
libraries/filepath
libraries/os-string
libraries/process
libraries/semaphore-compat
-- libraries/time
libraries/unix
libraries/Win32
libraries/Cabal/Cabal-syntax
libraries/Cabal/Cabal
utils/ghc-pkg
utils/hsc2hs
utils/unlit
utils/genprimopcode
utils/genapply
utils/deriveConstants
utils/ghc-toolchain
utils/ghc-toolchain/exe

benchmarks: False
tests: False
allow-boot-library-installs: True

--
-- Constraints
--

constraints:
template-haskell <= 2.22

--
-- Package level configuration
--

package *
library-vanilla: True
Expand All @@ -64,8 +82,9 @@ package ghc-boot-th-next
package hsc2hs
flags: +in-ghc-tree

constraints:
template-haskell <= 2.22
--
-- Program options
--

program-options
ghc-options: -fhide-source-paths -j
Loading
Loading