summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.ghcid2
-rw-r--r--.gitlab-ci.yml2
-rwxr-xr-x.gitlab/ci.sh2
-rw-r--r--compiler/main/ErrUtils.hs2
-rw-r--r--hadrian/.gitignore10
-rw-r--r--hadrian/README.md18
-rwxr-xr-xhadrian/build (renamed from hadrian/ghci.sh)2
-rwxr-xr-xhadrian/build-cabal (renamed from hadrian/build.cabal.sh)0
-rw-r--r--hadrian/build-cabal.bat (renamed from hadrian/build.cabal.bat)0
-rwxr-xr-xhadrian/build-stack (renamed from hadrian/build.stack.sh)0
-rwxr-xr-xhadrian/build-stack-nix3
-rw-r--r--hadrian/build-stack.bat (renamed from hadrian/build.stack.bat)0
-rw-r--r--hadrian/build.bat2
-rwxr-xr-xhadrian/build.stack.nix.sh3
-rwxr-xr-xhadrian/completion.sh4
-rw-r--r--hadrian/doc/testsuite.md2
-rw-r--r--hadrian/doc/user-settings.md18
-rw-r--r--hadrian/doc/windows.md2
-rwxr-xr-xhadrian/ghci (renamed from hadrian/build.sh)2
-rwxr-xr-xhadrian/ghci-cabal6
-rwxr-xr-xhadrian/ghci-stack (renamed from hadrian/ghci.stack.sh)2
-rwxr-xr-xhadrian/ghci.cabal.sh6
-rwxr-xr-xhadrian/hie-bios2
-rw-r--r--hadrian/src/Rules.hs2
-rwxr-xr-xhadrian/src/Settings.hs6
-rwxr-xr-xvalidate4
26 files changed, 51 insertions, 51 deletions
diff --git a/.ghcid b/.ghcid
index 9ce2eeb73e..966e6f5b0f 100644
--- a/.ghcid
+++ b/.ghcid
@@ -1,4 +1,4 @@
---command sh ./hadrian/ghci.sh
+--command sh ./hadrian/ghci
--reload compiler
--reload ghc
--reload includes
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index cb3ad05613..1b4de0f9d9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -271,7 +271,7 @@ hadrian-ghc-in-ghci:
- ./boot
- ./configure $CONFIGURE_ARGS
# Load ghc-in-ghci then immediately exit and check the modules loaded
- - echo ":q" | hadrian/ghci.sh -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok,"
+ - echo ":q" | hadrian/ghci -j`mk/detect-cpu-count.sh`| tail -n2 | grep "Ok,"
cache:
key: hadrian-ghci
paths:
diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh
index 851eb27933..ff612f663e 100755
--- a/.gitlab/ci.sh
+++ b/.gitlab/ci.sh
@@ -402,7 +402,7 @@ function clean() {
}
function run_hadrian() {
- run hadrian/build.cabal.sh \
+ run hadrian/build-cabal \
--flavour="$FLAVOUR" \
-j"$cores" \
--broken-test="$BROKEN_TESTS" \
diff --git a/compiler/main/ErrUtils.hs b/compiler/main/ErrUtils.hs
index 2a05476dc9..839ef19b81 100644
--- a/compiler/main/ErrUtils.hs
+++ b/compiler/main/ErrUtils.hs
@@ -902,7 +902,7 @@ Producing an eventlog for GHC
To actually produce the eventlog, you need an eventlog-capable GHC build:
With Hadrian:
- $ hadrian/build.sh -j "stage1.ghc-bin.ghc.link.opts += -eventlog"
+ $ hadrian/build -j "stage1.ghc-bin.ghc.link.opts += -eventlog"
With Make:
$ make -j GhcStage2HcOpts+=-eventlog
diff --git a/hadrian/.gitignore b/hadrian/.gitignore
index 697afc9663..91e8fb77c8 100644
--- a/hadrian/.gitignore
+++ b/hadrian/.gitignore
@@ -1,19 +1,19 @@
# generated by the configure script
cfg/system.config
-# build.bat and build.sh specific
+# build.bat and build specific
/bin/
-# build.cabal.sh specific
+# build-cabal specific
/dist/
/.cabal-sandbox/
cabal.sandbox.config
-# build.cabal-new.sh specific
+# build-cabal-new specific
/dist-newstyle/
.ghc.environment.*
-# build.stack.sh and build.stack.bat specific
+# build-stack and build-stack.bat specific
/.stack-work/
# the user settings
@@ -23,4 +23,4 @@ cabal.sandbox.config
*~
# ghcid output
-/ghcid.txt \ No newline at end of file
+/ghcid.txt
diff --git a/hadrian/README.md b/hadrian/README.md
index ab343c98e8..c653d80902 100644
--- a/hadrian/README.md
+++ b/hadrian/README.md
@@ -21,7 +21,7 @@ tree:
```
./boot && ./configure
-hadrian/build.sh -j
+hadrian/build -j
```
or on Windows:
@@ -39,8 +39,8 @@ or simply `-c`. See the overview of command line flags below.
Notes:
* If the default build script doesn't work, you might want to try another one,
-e.g. based on Cabal sandboxes (`build.cabal.*`), Stack (`build.stack.*`) or Nix
-(`build.stack.nix.*`).
+e.g. based on Cabal sandboxes (`build-cabal.*`), Stack (`build-stack.*`) or Nix
+(`build-stack-nix.*`).
* On Windows, if you do not want to install MSYS, you can use the Stack-based
build script (Stack provides a managed MSYS environment), as described in
@@ -164,18 +164,18 @@ build stage1:exe:haddock
#### Fast feedback using ghci
-Running the `./hadrian/ghci.sh` script will load the main compiler into
+Running the `./hadrian/ghci` script will load the main compiler into
a ghci session. This is intended for fast development feedback, modules are only
typechecked so it isn't possible to run any functions in the repl.
```
-./hadrian/ghci.sh
+./hadrian/ghci
```
You can also use this target with `ghcid`.
```
-ghcid --command="./hadrian/ghci.sh"
+ghcid --command="./hadrian/ghci"
```
The first time this command is run hadrian will need to compile a few dependencies
@@ -188,7 +188,7 @@ have the effect of passing `-j` to both hadrian and ghci so they will both
build in parallel.
```
-./hadrian/ghci.sh -j8
+./hadrian/ghci -j8
```
#### Testing
@@ -272,12 +272,12 @@ a GHC API session with the correct environment to load a module into your own
GHC session. This is how `haskell-ide-engine` is able to support hadrian.
```
-> ./hadrian/build.sh tool-args
+> ./hadrian/build tool-args
-hide-all-packages -no-user-package-db -package-db _build/stage0/lib/packag...
```
-The `./hadrian/ghci.sh` script is implemented using this target.
+The `./hadrian/ghci` script is implemented using this target.
Troubleshooting
---------------
diff --git a/hadrian/ghci.sh b/hadrian/build
index 06ad47a66e..01e050360f 100755
--- a/hadrian/ghci.sh
+++ b/hadrian/build
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
# By default on Linux/MacOS we build Hadrian using Cabal
-(. "hadrian/ghci.cabal.sh" "$@")
+(. "hadrian/build-cabal" "$@")
diff --git a/hadrian/build.cabal.sh b/hadrian/build-cabal
index c385542410..c385542410 100755
--- a/hadrian/build.cabal.sh
+++ b/hadrian/build-cabal
diff --git a/hadrian/build.cabal.bat b/hadrian/build-cabal.bat
index aa0acab4e4..aa0acab4e4 100644
--- a/hadrian/build.cabal.bat
+++ b/hadrian/build-cabal.bat
diff --git a/hadrian/build.stack.sh b/hadrian/build-stack
index 7a45042ebd..7a45042ebd 100755
--- a/hadrian/build.stack.sh
+++ b/hadrian/build-stack
diff --git a/hadrian/build-stack-nix b/hadrian/build-stack-nix
new file mode 100755
index 0000000000..a3ac6e6ae0
--- /dev/null
+++ b/hadrian/build-stack-nix
@@ -0,0 +1,3 @@
+#!/usr/bin/env bash
+
+HADRIAN_NIX=YES hadrian/build-stack
diff --git a/hadrian/build.stack.bat b/hadrian/build-stack.bat
index 09bfd9561e..09bfd9561e 100644
--- a/hadrian/build.stack.bat
+++ b/hadrian/build-stack.bat
diff --git a/hadrian/build.bat b/hadrian/build.bat
index e71f886462..06b5b00395 100644
--- a/hadrian/build.bat
+++ b/hadrian/build.bat
@@ -1,4 +1,4 @@
@echo off
rem By default on Windows we build Hadrian using Cabal
-hadrian/build.cabal.bat %*
+hadrian/build-cabal.bat %*
diff --git a/hadrian/build.stack.nix.sh b/hadrian/build.stack.nix.sh
deleted file mode 100755
index b30c114143..0000000000
--- a/hadrian/build.stack.nix.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-HADRIAN_NIX=YES hadrian/build.stack.sh
diff --git a/hadrian/completion.sh b/hadrian/completion.sh
index 589fdf5795..2f31123c5b 100755
--- a/hadrian/completion.sh
+++ b/hadrian/completion.sh
@@ -3,5 +3,5 @@
hadrian=$(cd hadrian; cabal new-exec which hadrian; cd ..)
all_settings=$($hadrian autocomplete --complete-setting="$@" --quiet)
-complete -W "$all_settings" hadrian/build.sh
-complete -W "$all_settings" hadrian/build.cabal.sh
+complete -W "$all_settings" hadrian/build
+complete -W "$all_settings" hadrian/build-cabal
diff --git a/hadrian/doc/testsuite.md b/hadrian/doc/testsuite.md
index 65202dc038..ed1205ec0f 100644
--- a/hadrian/doc/testsuite.md
+++ b/hadrian/doc/testsuite.md
@@ -6,7 +6,7 @@ The simplest way to run the testsuite is
``` sh
# assuming 'build' is the build script you're using
-# (hadrian/build.sh, hadrian/build.bat, ...)
+# (hadrian/build, hadrian/build.bat, ...)
build test
```
diff --git a/hadrian/doc/user-settings.md b/hadrian/doc/user-settings.md
index de0d452fd5..9963bac5ed 100644
--- a/hadrian/doc/user-settings.md
+++ b/hadrian/doc/user-settings.md
@@ -106,7 +106,7 @@ userArgs = mconcat
You can match any combination of the `builder`, `stage`, `package`, `way`, `input`
and `output` predicates when specifying custom command line arguments. File
patterns such as `"**/Prelude.*"` can be used when matching input and output files,
-where `**` matches an arbitrary number of path components, but not absolute path
+where `**` matches an arbitrary number of path components, but not absolute path
prefixes, and `*` matches an entire path component, excluding any separators.
#### Enabling -Werror
@@ -368,7 +368,7 @@ the stage.
We could equivalently specify those settings on the command-line:
``` sh
-$ hadrian/build.sh "stage1.ghc-bin.ghc.link.opts += -eventlog" \
+$ hadrian/build "stage1.ghc-bin.ghc.link.opts += -eventlog" \
"*.base.ghc.*.opts += -v3"
```
@@ -388,7 +388,7 @@ the right names for them:
when building all known packages, if the Hadrian command ever gets them to be
built;
- the remaining slots specify the builder and how it was invoked,
-
+
* `ghc` refers to GHC commands; the final slot refers to how GHC is invoked:
* `c.opts` for commands that build C files with GHC
@@ -397,7 +397,7 @@ the right names for them:
* `deps.opts` for commands that figure out dependencies between Haskell modules
(with `ghc -M`)
* `toolargs.opts` for GHC commands that are used to generate the right ghci
- argument for `hadrian/ghci.sh` to work
+ argument for `hadrian/ghci` to work
* `cc` refers to C compiler commands
@@ -426,15 +426,15 @@ that takes an (optional) argument, `--complete-setting=<some string>`, and
prints on stdout all the setting keys that have the given string as a prefix.
There is a `hadrian/completion.sh` script that makes use of this rule to
-install Bash completions for `hadrian/build.sh` and `hadrian/build.cabal.sh`.
+install Bash completions for `hadrian/build` and `hadrian/build-cabal`.
You can try it out by doing:
``` sh
$ source hadrian/completion.sh
-$ hadrian/build.sh <TAB>
-$ hadrian/build.sh stage1.ba<TAB>
-$ hadrian/build.sh "stage1.base.ghc.<TAB>
-$ hadrian/build.sh "*.*.ghc.*.opts += -v3" "stage0.ghc-bin.ghc.lin<TAB>
+$ hadrian/build <TAB>
+$ hadrian/build stage1.ba<TAB>
+$ hadrian/build "stage1.base.ghc.<TAB>
+$ hadrian/build "*.*.ghc.*.opts += -v3" "stage0.ghc-bin.ghc.lin<TAB>
```
[split-sections]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/phases.html#ghc-flag--split-sections
diff --git a/hadrian/doc/windows.md b/hadrian/doc/windows.md
index 9701b804f2..d8fc414f3a 100644
--- a/hadrian/doc/windows.md
+++ b/hadrian/doc/windows.md
@@ -38,7 +38,7 @@ but are much simpler and may also be more robust.
The `stack build` and `stack exec hadrian` commands can be replaced by an
invocation of Hadrian's Stack-based build script:
-`build.stack.bat -j --flavour=quickest`. Use this script if you plan to work on
+`build-stack.bat -j --flavour=quickest`. Use this script if you plan to work on
Hadrian and/or rebuild GHC often.
## Prerequisites
diff --git a/hadrian/build.sh b/hadrian/ghci
index 1fde2d6373..b395de4f08 100755
--- a/hadrian/build.sh
+++ b/hadrian/ghci
@@ -1,4 +1,4 @@
#!/usr/bin/env bash
# By default on Linux/MacOS we build Hadrian using Cabal
-(. "hadrian/build.cabal.sh" "$@")
+(. "hadrian/ghci-cabal" "$@")
diff --git a/hadrian/ghci-cabal b/hadrian/ghci-cabal
new file mode 100755
index 0000000000..93343e4e28
--- /dev/null
+++ b/hadrian/ghci-cabal
@@ -0,0 +1,6 @@
+#!/usr/bin/env sh
+
+set -e
+
+GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-cabal" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")"
+ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m
diff --git a/hadrian/ghci.stack.sh b/hadrian/ghci-stack
index 08fcb0ac9c..3c850cdac8 100755
--- a/hadrian/ghci.stack.sh
+++ b/hadrian/ghci-stack
@@ -2,5 +2,5 @@
set -e
-GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build.stack.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")"
+GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build-stack" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")"
stack exec -- ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m
diff --git a/hadrian/ghci.cabal.sh b/hadrian/ghci.cabal.sh
deleted file mode 100755
index f31b94574f..0000000000
--- a/hadrian/ghci.cabal.sh
+++ /dev/null
@@ -1,6 +0,0 @@
-#!/usr/bin/env sh
-
-set -e
-
-GHC_FLAGS="$GHC_FLAGS $(TERM=dumb CABFLAGS=-v0 "hadrian/build.cabal.sh" tool-args -q --build-root=.hadrian_ghci --flavour=ghc-in-ghci "$@")"
-ghci $GHC_FLAGS "$@" -fno-code -fwrite-interface -hidir=.hadrian_ghci/interface -O0 ghc/Main.hs +RTS -A128m
diff --git a/hadrian/hie-bios b/hadrian/hie-bios
index db06589c2b..b6e5a471eb 100755
--- a/hadrian/hie-bios
+++ b/hadrian/hie-bios
@@ -3,7 +3,7 @@
# When run, this program will output a list of arguments which are necessary to
# load the GHC library component into GHCi. The program is used by `ghcide` in
# order to automatically set up the correct GHC API session for a project.
-TERM=dumb CABFLAGS=-v0 $PWD/hadrian/build.cabal.sh tool-args -q --build-root=.hie-bios --flavour=ghc-in-ghci > $HIE_BIOS_OUTPUT
+TERM=dumb CABFLAGS=-v0 $PWD/hadrian/build-cabal tool-args -q --build-root=.hie-bios --flavour=ghc-in-ghci > $HIE_BIOS_OUTPUT
echo -ighc >> $HIE_BIOS_OUTPUT
echo "ghc/Main.hs" >> $HIE_BIOS_OUTPUT
diff --git a/hadrian/src/Rules.hs b/hadrian/src/Rules.hs
index 9b9f7557f3..f479ba679f 100644
--- a/hadrian/src/Rules.hs
+++ b/hadrian/src/Rules.hs
@@ -34,7 +34,7 @@ import UserSettings
-- run, the target prints out the arguments that would be passed to @ghc@
-- during normal compilation to @stdout@.
--
--- This target is called by the `ghci.sh` script in order to load all of GHC's
+-- This target is called by the `ghci` script in order to load all of GHC's
-- modules into GHCi.
toolArgsTarget :: Rules ()
toolArgsTarget = do
diff --git a/hadrian/src/Settings.hs b/hadrian/src/Settings.hs
index b57029a967..7c6a24af27 100755
--- a/hadrian/src/Settings.hs
+++ b/hadrian/src/Settings.hs
@@ -105,7 +105,7 @@ It now also offers a more "old-school" interface, in the form of
@foo.bar.baz = v@ or @foo.bar.baz += v@ expressions, that one can
pass on the command line that invokes hadrian:
-> $ hadrian/build.sh --flavour=quickest -j "stage1.ghc-bin.ghc.link.opts += -v3"
+> $ hadrian/build --flavour=quickest -j "stage1.ghc-bin.ghc.link.opts += -v3"
or in a file at <build root>/hadrian.settings, where <build root>
is the build root to be used for the build, which is _build by default.
@@ -117,7 +117,7 @@ following contents:
and issue:
-> $ hadrian/build.sh
+> $ hadrian/build
Hadrian would pick up the settings given in _build/hadrian.settings (as well as
any settings that you may additionally be passing on the command line) and
@@ -254,7 +254,7 @@ data BuilderMode = BM_Ghc (Wildcard GhcMode)
-- - @<ghc mode>@ is one of @c@ (building C files), @hs@ (building Haskell
-- modules), @link@ (linking object files), @deps@ (finding Haskell
-- dependencies with @ghc -M@) or @toolargs@ (getting necessary flags to
--- make hadrian/ghci.sh work;
+-- make hadrian/ghci work;
-- - @<cc mode>@ is one of @c@ (building C files) or @deps@ (finding C
-- dependencies);
-- - locations that support a wildcard (@*@) entry are here to avoid
diff --git a/validate b/validate
index d6f45c7c1c..a302781db4 100755
--- a/validate
+++ b/validate
@@ -163,14 +163,14 @@ else
# Just build hadrian.
if [ "$use_stack" = "NO" ]
then
- hadrian/build.sh --help > /dev/null
+ hadrian/build --help > /dev/null
cd hadrian
hadrian_cmd=$(cabal new-exec -- which hadrian)
else
if [ $no_clean -eq 0 ]; then
rm -rf hadrian/.stack-work
fi
- hadrian/build.stack.sh --help > /dev/null
+ hadrian/build-stack --help > /dev/null
cd hadrian
hadrian_cmd=$(stack exec -- which hadrian)
fi