Skip to content
This repository was archived by the owner on Apr 1, 2025. It is now read-only.

Commit 47b0dac

Browse files
committed
Build both static & dynamic files so we don’t have to live in a separate build dir.
1 parent abd8216 commit 47b0dac

File tree

2 files changed

+13
-14
lines changed

2 files changed

+13
-14
lines changed

.ghci.semantic

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@
99

1010
-- Compile to object code
1111
:set -fwrite-interface -fobject-code
12+
-- Build both static & dynamic objects so we don’t confuse cabal build
13+
:set -static
14+
:set -dynamic-too
15+
:set -dynosuf dyn_o
16+
:set -dynhisuf dyn_hi
1217

13-
-- Write build products to dist-repl (so that we don’t clobber 'cabal build' outputs)
14-
:set -outputdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build
15-
:set -odir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build
16-
:set -hidir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build
17-
:set -stubdir dist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build
18+
-- Write build products to dist-newstyle (instead of alongside the .hs files)
19+
:set -outputdir dist-newstyle/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build
20+
:set -odir dist-newstyle/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build
21+
:set -hidir dist-newstyle/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build
22+
:set -stubdir dist-newstyle/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build
1823

19-
-- Look for autogen’d files in dist-repl
20-
:set -idist-repl/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build/autogen
24+
-- Look for autogen’d files in dist-newstyle
25+
:set -idist-newstyle/build/x86_64-osx/ghc-8.6.5/semantic-0.8.0.0/build/autogen
2126

2227
-- Load all our sources… remember to keep this up to date when we add new packages!
2328
-- But don’t add semantic-source, it’s important that we get that from hackage.

script/repl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,4 @@ set -e
66

77
cd $(dirname "$0")/..
88

9-
repl_builddir=dist-repl
10-
11-
if [[ ! -d $repl_builddir ]]; then
12-
echo "$repl_builddir does not exist, first run 'cabal repl --builddir=$replbuilddir', exit, and then re-run $0"
13-
else
14-
cabal exec --builddir=$repl_builddir ghci -- -ghci-script=.ghci.semantic $@
15-
fi
9+
cabal exec ghci -- -ghci-script=.ghci.semantic $@

0 commit comments

Comments
 (0)