Skip to content

Commit

Permalink
Fix new error while bootstrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
hsyl20 committed Jan 8, 2025
1 parent b6efa77 commit 0cbfef4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
16 changes: 15 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ HADRIAN_SETTINGS_STAGE0 := $(shell ghc --info | runghc GenSettings.hs ghc-boot)
HADRIAN_SETTINGS_STAGE1 := $(shell ghc --info | runghc GenSettings.hs ghc-boot)
SETTINGS_STAGE1 := $(shell ghc --info | runghc GenSettings.hs stage1)

CABAL := /home/hsyl20/repo/cabal/dist-newstyle/build/x86_64-linux/ghc-9.8.2/cabal-install-3.15.0.0/x/cabal/build/cabal/cabal
CABAL := /home/hsyl20/projects/cabal/dist-newstyle/build/x86_64-linux/ghc-9.10.1/cabal-install-3.15.0.0/x/cabal/build/cabal/cabal
# CABAL := cabal

all: _build/stage1/bin/ghc
Expand All @@ -14,6 +14,13 @@ _build/stage0/bin/ghc:
cp -rf ./compiler _build/stage0/src/libraries/ghc
cp -rf ./ghc _build/stage0/src/ghc-bin
cp -rf ./utils _build/stage0/src/

cp -f rts/include/rts/Bytecodes.h _build/stage0/src/libraries/ghc/
cp -f rts/include/rts/storage/ClosureTypes.h _build/stage0/src/libraries/ghc/
cp -f rts/include/rts/storage/FunTypes.h _build/stage0/src/libraries/ghc/
cp -f rts/include/stg/MachRegs.h _build/stage0/src/libraries/ghc/
mkdir -p _build/stage0/src/libraries/ghc/MachRegs
cp -f rts/include/stg/MachRegs/*.h _build/stage0/src/libraries/ghc/MachRegs/

## Substituting variables
cp _build/stage0/src/ghc-bin/ghc-bin.cabal{.in,}
Expand Down Expand Up @@ -89,6 +96,13 @@ _build/stage1/bin/ghc: _build/stage0/bin/ghc
cp -rf ./ghc _build/stage1/src/ghc-bin
cp -rf ./config.sub _build/stage1/src/libraries/rts/
cp -rf ./config.guess _build/stage1/src/libraries/rts/

cp -f rts/include/rts/Bytecodes.h _build/stage1/src/libraries/ghc/
cp -f rts/include/rts/storage/ClosureTypes.h _build/stage1/src/libraries/ghc/
cp -f rts/include/rts/storage/FunTypes.h _build/stage1/src/libraries/ghc/
cp -f rts/include/stg/MachRegs.h _build/stage1/src/libraries/ghc/
mkdir -p _build/stage1/src/libraries/ghc/MachRegs
cp -f rts/include/stg/MachRegs/*.h _build/stage1/src/libraries/ghc/MachRegs/

python rts/gen_event_types.py --event-types-defines _build/stage1/src/libraries/rts/include/rts/EventLogConstants.h
python rts/gen_event_types.py --event-types-array _build/stage1/src/libraries/rts/include/rts/EventTypes.h
Expand Down
6 changes: 6 additions & 0 deletions cabal.project-stage0
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ packages:
./_build/stage0/src/utils/genapply/
./_build/stage0/src/utils/deriveConstants/

with-compiler: ghc-9.8.4

benchmarks: False
tests: False
allow-boot-library-installs: True
Expand All @@ -37,6 +39,10 @@ package *
executable-static: False
ghc-options: -fhide-source-paths -j

constraints:
-- for some reason 2.23 doesn't build
template-haskell <= 2.22

package ghc-boot-th
flags: +bootstrap

Expand Down
1 change: 0 additions & 1 deletion compiler/GHC/Parser/Lexer.x
Original file line number Diff line number Diff line change
Expand Up @@ -3470,7 +3470,6 @@ topNoLayoutContainsCommas (ALRNoLayout b _ : _) = b
-- If the generated alexScan/alexScanUser functions are called multiple times
-- in this file, alexScanUser gets broken out into a separate function and
-- increases memory usage. Make sure GHC inlines this function and optimizes it.
{-# INLINE alexScanUser #-}

lexToken :: P (PsLocated Token)
lexToken = do
Expand Down

0 comments on commit 0cbfef4

Please sign in to comment.