[commit: ghc] wip/andrey/windows-doc: Hadrian: Update instructions for building on Windows (0896bbf)

git at git.haskell.org git at git.haskell.org
Sun Jan 27 22:40:51 UTC 2019


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/andrey/windows-doc
Link       : http://ghc.haskell.org/trac/ghc/changeset/0896bbf66723c31313f929e3563b25184d09fc8e/ghc

>---------------------------------------------------------------

commit 0896bbf66723c31313f929e3563b25184d09fc8e
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Jan 27 22:34:30 2019 +0000

    Hadrian: Update instructions for building on Windows
    
    The `hadrian/doc/windows.md` file has falled out of date. In particular
    it still points to the old GitHub repository, and uses incorrect path
    to GHC. This patch fixes it.


>---------------------------------------------------------------

0896bbf66723c31313f929e3563b25184d09fc8e
 hadrian/README.md      |  2 +-
 hadrian/doc/windows.md | 47 ++++++++++++++++++++++++-----------------------
 2 files changed, 25 insertions(+), 24 deletions(-)

diff --git a/hadrian/README.md b/hadrian/README.md
index a3b8a1b..7b6646d 100644
--- a/hadrian/README.md
+++ b/hadrian/README.md
@@ -262,7 +262,7 @@ projects), as well as Well-Typed.
 [issues]: https://github.com/snowleopard/hadrian/issues
 [ghc-preparation]: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation
 [ghc-windows-quick-build]: https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows#AQuickBuild
-[windows-build]: https://github.com/snowleopard/hadrian/blob/master/doc/windows.md
+[windows-build]: https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/doc/windows.md
 [ghc-split-objs-bug]: https://ghc.haskell.org/trac/ghc/ticket/11315
 [test-issue]: https://github.com/snowleopard/hadrian/issues/197
 [validation-issue]: https://github.com/snowleopard/hadrian/issues/187
diff --git a/hadrian/doc/windows.md b/hadrian/doc/windows.md
index 0ad2086..aa59bc5 100644
--- a/hadrian/doc/windows.md
+++ b/hadrian/doc/windows.md
@@ -1,15 +1,13 @@
 # Building GHC on Windows
 
-[![Windows status](https://img.shields.io/appveyor/ci/snowleopard/hadrian/master.svg?label=Windows)](https://ci.appveyor.com/project/snowleopard/hadrian)
+Here is how you can build GHC, from source, on Windows with minimal requirements.
+We only assume that `git` and `stack` are installed (see
+[prerequisites](https://github.com/snowleopard/hadrian/blob/master/doc/windows.md#prerequisites)).
 
-Here is how you can build GHC, from source, on Windows. We assume that `git` and `stack` are installed
-(see [prerequisites](https://github.com/snowleopard/hadrian/blob/master/doc/windows.md#prerequisites)).
-
-```sh
-# Get GHC and Hadrian sources; git core.autocrlf should be set to false (see Prerequisites section)
+```
+# Get GHC sources; git core.autocrlf should be set to false (see Prerequisites section)
 git clone --recursive git://git.haskell.org/ghc.git
 cd ghc
-git clone git://github.com/snowleopard/hadrian
 
 # Download and install the bootstrapping GHC and MSYS2
 cd hadrian
@@ -27,30 +25,33 @@ stack exec hadrian -- --directory ".." -j --flavour=quickest --configure
 
 # Test GHC
 cd ..
-inplace\bin\ghc-stage2 -e 1+2
+_build\stage1\bin\ghc -e 1+2
 ```
 
-The entire process should take about 20 minutes. Note, this will build GHC without
-optimisations. If you need an optimised GHC, drop the `--flavour=quickest` flag from
-the build command line (this will slow down the build to about an hour).
+The entire process should take about 20 minutes. Note, this will build GHC
+without optimisations. If you need an optimised GHC, drop the `--flavour=quickest`
+flag from the build command line (this will slow down the build to about an hour).
 
 These are currently not the
 [official GHC building instructions](https://ghc.haskell.org/trac/ghc/wiki/Building/Preparation/Windows),
 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 Hadrian and/or rebuild GHC often.
+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
+Hadrian and/or rebuild GHC often.
 
 ## Prerequisites
 
-The above works on a clean machine with `git` and `stack` installed (tested with default
-installation settings), which you can get from https://git-scm.com/download/win and
+The above works on a clean machine with `git` and `stack` installed (tested with
+default installation settings), which you can get from
+https://git-scm.com/download/win and
 https://www.stackage.org/stack/windows-x86_64-installer.
 
-Note that `git` should be configured to check out Unix-style line endings. The default behaviour
-of `git` on Windows is to check out Windows-style line endings which can cause issues during the
-build. This can be changed using the following command:
+Note that `git` should be configured to check out Unix-style line endings. The
+default behaviour of `git` on Windows is to check out Windows-style line endings
+which can cause issues during the build. This can be changed using the following
+command:
 
     git config --global core.autocrlf false
 
@@ -61,10 +62,10 @@ If you would like to restore the default behaviour later run:
 ## Testing
 
 These instructions have been tested on a clean Windows 10 machine using the
-[free VirtualBox image](https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/),
-and are also routinely tested on
-[Hadrian's AppVeyor CI instance](https://ci.appveyor.com/project/snowleopard/hadrian/history).
+[free VirtualBox image](https://dev.windows.com/en-us/microsoft-edge/tools/vms/windows/).
+
+**TODO:** It would be useful to test the instructions routinely on CI.
 
 ## Notes
 
-Beware of the [current limitations of Hadrian](https://github.com/snowleopard/hadrian#current-limitations).
+Beware of the [current limitations of Hadrian](https://gitlab.haskell.org/ghc/ghc/blob/master/hadrian/README.md#current-limitations).



More information about the ghc-commits mailing list