Add 'hadrian/' from commit '45f3bff7016a2a0cd9a5455a882ced984655e90b'
authorBen Gamari <ben@smart-cactus.org>
Tue, 23 Oct 2018 18:20:13 +0000 (14:20 -0400)
committerBen Gamari <ben@smart-cactus.org>
Tue, 23 Oct 2018 18:20:13 +0000 (14:20 -0400)
git-subtree-dir: hadrian
git-subtree-mainline: 575b35f4cdc18045bccd42d341d6f25d95c0696c
git-subtree-split: 45f3bff7016a2a0cd9a5455a882ced984655e90b

110 files changed:
1  2 
hadrian/.ghci
hadrian/.gitignore
hadrian/.travis.yml
hadrian/LICENSE
hadrian/README.md
hadrian/appveyor.yml
hadrian/build.bat
hadrian/build.cabal.bat
hadrian/build.cabal.sh
hadrian/build.nix.sh
hadrian/build.sh
hadrian/build.stack.bat
hadrian/build.stack.nix.sh
hadrian/build.stack.sh
hadrian/cabal.project
hadrian/cfg/system.config.in
hadrian/circle.yml
hadrian/doc/cross-compile.md
hadrian/doc/flavours.md
hadrian/doc/user-settings.md
hadrian/doc/windows.md
hadrian/hadrian.cabal
hadrian/shell.nix
hadrian/src/Base.hs
hadrian/src/Builder.hs
hadrian/src/CommandLine.hs
hadrian/src/Context.hs
hadrian/src/Context/Path.hs
hadrian/src/Context/Type.hs
hadrian/src/Environment.hs
hadrian/src/Expression.hs
hadrian/src/Expression/Type.hs
hadrian/src/Flavour.hs
hadrian/src/Hadrian/Builder.hs
hadrian/src/Hadrian/Builder/Ar.hs
hadrian/src/Hadrian/Builder/Sphinx.hs
hadrian/src/Hadrian/Builder/Tar.hs
hadrian/src/Hadrian/Expression.hs
hadrian/src/Hadrian/Haskell/Cabal.hs
hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
hadrian/src/Hadrian/Haskell/Cabal/Type.hs
hadrian/src/Hadrian/Oracles/ArgsHash.hs
hadrian/src/Hadrian/Oracles/Cabal.hs
hadrian/src/Hadrian/Oracles/Cabal/Rules.hs
hadrian/src/Hadrian/Oracles/Cabal/Type.hs
hadrian/src/Hadrian/Oracles/DirectoryContents.hs
hadrian/src/Hadrian/Oracles/Path.hs
hadrian/src/Hadrian/Oracles/TextFile.hs
hadrian/src/Hadrian/Package.hs
hadrian/src/Hadrian/Target.hs
hadrian/src/Hadrian/Utilities.hs
hadrian/src/Main.hs
hadrian/src/Oracles/Flag.hs
hadrian/src/Oracles/ModuleFiles.hs
hadrian/src/Oracles/Setting.hs
hadrian/src/Oracles/TestSettings.hs
hadrian/src/Packages.hs
hadrian/src/Rules.hs
hadrian/src/Rules/BinaryDist.hs
hadrian/src/Rules/Clean.hs
hadrian/src/Rules/Compile.hs
hadrian/src/Rules/Configure.hs
hadrian/src/Rules/Dependencies.hs
hadrian/src/Rules/Documentation.hs
hadrian/src/Rules/Generate.hs
hadrian/src/Rules/Gmp.hs
hadrian/src/Rules/Libffi.hs
hadrian/src/Rules/Library.hs
hadrian/src/Rules/Nofib.hs
hadrian/src/Rules/Program.hs
hadrian/src/Rules/Register.hs
hadrian/src/Rules/Selftest.hs
hadrian/src/Rules/SourceDist.hs
hadrian/src/Rules/Test.hs
hadrian/src/Settings.hs
hadrian/src/Settings/Builders/Alex.hs
hadrian/src/Settings/Builders/Cabal.hs
hadrian/src/Settings/Builders/Cc.hs
hadrian/src/Settings/Builders/Common.hs
hadrian/src/Settings/Builders/Configure.hs
hadrian/src/Settings/Builders/DeriveConstants.hs
hadrian/src/Settings/Builders/GenPrimopCode.hs
hadrian/src/Settings/Builders/Ghc.hs
hadrian/src/Settings/Builders/GhcPkg.hs
hadrian/src/Settings/Builders/Haddock.hs
hadrian/src/Settings/Builders/Happy.hs
hadrian/src/Settings/Builders/HsCpp.hs
hadrian/src/Settings/Builders/Hsc2Hs.hs
hadrian/src/Settings/Builders/Ld.hs
hadrian/src/Settings/Builders/Make.hs
hadrian/src/Settings/Builders/RunTest.hs
hadrian/src/Settings/Builders/Xelatex.hs
hadrian/src/Settings/Default.hs
hadrian/src/Settings/Default.hs-boot
hadrian/src/Settings/Flavours/Common.hs
hadrian/src/Settings/Flavours/Development.hs
hadrian/src/Settings/Flavours/Performance.hs
hadrian/src/Settings/Flavours/Profiled.hs
hadrian/src/Settings/Flavours/Quick.hs
hadrian/src/Settings/Flavours/QuickCross.hs
hadrian/src/Settings/Flavours/Quickest.hs
hadrian/src/Settings/Packages.hs
hadrian/src/Settings/Warnings.hs
hadrian/src/Stage.hs
hadrian/src/Target.hs
hadrian/src/UserSettings.hs
hadrian/src/Utilities.hs
hadrian/src/Way.hs
hadrian/src/Way/Type.hs
hadrian/stack.yaml

diff --cc hadrian/.ghci
index 0000000,8bb287b..8bb287b
mode 000000,100644..100644
--- /dev/null
--- 2/.ghci
index 0000000,0000000..697afc9
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,26 @@@
++# generated by the configure script
++cfg/system.config
++
++# build.bat and build.sh specific
++/bin/
++
++# build.cabal.sh specific
++/dist/
++/.cabal-sandbox/
++cabal.sandbox.config
++
++# build.cabal-new.sh specific
++/dist-newstyle/
++.ghc.environment.*
++
++# build.stack.sh and build.stack.bat specific
++/.stack-work/
++
++# the user settings
++/UserSettings.hs
++
++# Mostly temp file by emacs
++*~
++
++# ghcid output
++/ghcid.txt
index 0000000,0000000..f670784
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,110 @@@
++sudo: true
++matrix:
++    include:
++        - os: linux
++          env: MODE="selftest"
++          compiler: "GHC 8.4.3"
++          addons:
++              apt:
++                  packages:
++                      - ghc-8.4.3
++                      - cabal-install-2.4
++                      - zlib1g-dev
++                  sources: hvr-ghc
++
++          before_install:
++              - PATH="/opt/ghc/8.4.3/bin:$PATH"
++              - PATH="/opt/cabal/2.4/bin:$PATH"
++
++          script:
++              # Run internal Hadrian tests, after boot and configure.
++              - hadrian/build.sh -c selftest
++
++        - os: linux
++          env: MODE="--flavour=quickest"
++          compiler: "GHC 8.4.3"
++          addons:
++              apt:
++                  packages:
++                      - ghc-8.4.3
++                      - cabal-install-2.4
++                      - zlib1g-dev
++                  sources: hvr-ghc
++
++          before_install:
++              - PATH="/opt/ghc/8.4.3/bin:$PATH"
++              - PATH="/opt/cabal/2.4/bin:$PATH"
++
++          script:
++              # Build GHC, letting hadrian boot & configure the ghc source tree
++              - hadrian/build.sh -c -j $MODE --no-progress --progress-colour=never --profile=-
++
++        - os: linux
++          env: MODE="--flavour=quickest --integer-simple"
++          compiler: "GHC 8.6.1"
++          addons:
++              apt:
++                  packages:
++                      - ghc-8.6.1
++                      - cabal-install-2.4
++                      - zlib1g-dev
++                  sources: hvr-ghc
++
++          before_install:
++              - PATH="/opt/ghc/8.6.1/bin:$PATH"
++              - PATH="/opt/cabal/2.4/bin:$PATH"
++
++          script:
++              # boot, configure and build GHC
++              - hadrian/build.sh -c -j $MODE --no-progress --progress-colour=never --profile=-
++
++              # Test GHC binary
++              - _build/stage1/bin/ghc -e 1+2
++
++        - os: osx
++          osx_image: xcode8
++          env: MODE="--flavour=quickest --integer-simple"
++          before_install:
++              - brew update
++              - brew install ghc cabal-install
++              - brew upgrade python
++
++          script:
++              # Due to timeout limit of OS X build on Travis CI,
++              # we will ignore selftest
++              - hadrian/build.sh -j -c $MODE --no-progress --progress-colour=never --profile=-
++
++              # Test GHC binary
++              - _build/stage1/bin/ghc -e 1+2
++
++install:
++    # Add Cabal to PATH
++    - PATH="$HOME/.cabal/bin:$PATH"
++    - export PATH
++    - env
++
++    # Fetch GHC sources into ./ghc
++    - git --version
++    - git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
++    - git clone --depth 1 --recursive git://github.com/ghc/ghc
++    # --shallow-submodules is not supported on travis standard git 1.8 (linux), but it is supported
++    # on Travis Mac OS X machines. But it does not work with github mirrors because it cannot
++    # find commits.
++
++    # Install all Hadrian and GHC build dependencies
++    - cabal update
++    - cabal install alex happy
++
++    # GHC comes with an older version of Hadrian, so we delete it
++    - rm -rf ghc/hadrian/.git
++
++    # Travis has already cloned Hadrian into ./ and we need to move it
++    # to ./ghc/hadrian -- one way to do it is to move the .git directory
++    # and perform a hard reset in order to regenerate Hadrian files
++    - mv .git ghc/hadrian
++    - cd ghc/hadrian && git reset --hard HEAD && cd ..
++
++cache:
++    directories:
++        - $HOME/.cabal
++        - $HOME/.ghc
diff --cc hadrian/LICENSE
index 0000000,0000000..ff60fa8
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,21 @@@
++MIT License
++
++Copyright (c) 2014-2017 Andrey Mokhov
++
++Permission is hereby granted, free of charge, to any person obtaining a copy
++of this software and associated documentation files (the "Software"), to deal
++in the Software without restriction, including without limitation the rights
++to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
++copies of the Software, and to permit persons to whom the Software is
++furnished to do so, subject to the following conditions:
++
++The above copyright notice and this permission notice shall be included in all
++copies or substantial portions of the Software.
++
++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
++IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
++FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
++AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
++LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
++OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
++SOFTWARE.
index 0000000,0000000..b88d08d
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,224 @@@
++Hadrian
++=======
++
++[![Linux & OS X status](https://img.shields.io/travis/snowleopard/hadrian/master.svg?label=Linux%20%26%20OS%20X)](https://travis-ci.org/snowleopard/hadrian) [![Windows status](https://img.shields.io/appveyor/ci/snowleopard/hadrian/master.svg?label=Windows)](https://ci.appveyor.com/project/snowleopard/hadrian) [![OS X status](https://img.shields.io/circleci/project/github/snowleopard/hadrian.svg?label=OS%20X)](https://circleci.com/gh/snowleopard/hadrian)
++
++Hadrian is a new build system for the [Glasgow Haskell Compiler][ghc]. It is based
++on [Shake][shake] and we hope that it will soon replace the current
++[Make-based build system][make]. If you are curious about the rationale behind the
++project and the architecture of the build system you can find more details in
++this [Haskell Symposium 2016 paper](https://dl.acm.org/authorize?N41275) and this
++[Haskell eXchange 2016 talk][talk].
++
++The new build system can work side-by-side with the existing build system, since it
++places all build artefacts in a dedicated directory (called `_build` by default).
++See [this guide](https://ghc.haskell.org/trac/ghc/wiki/Building/Hadrian/QuickStart)
++if you'd like to start using Hadrian for building GHC.
++
++Your first build
++----------------
++
++Beware, the build system is in the alpha development phase. Things are shaky and sometimes
++break; there are numerous [known issues][issues]. Not afraid? Then put on the helmet and
++run the following command from root of the GHC tree:
++
++```
++hadrian/build.sh -j
++```
++
++or on Windows:
++
++```
++hadrian/build.bat -j
++```
++
++Here flag `-j` enables parallelism and is optional. We will further refer to the build script
++simply as `build`. Note that Hadrian can also run the `boot` and `configure` scripts
++automatically if you pass the flag `--configure`, or simply `-c`. See the overview of
++command line flags below.
++
++Notes:
++
++* If the default build script doesn't work, you might want to give a try to another one, e.g. based
++on Cabal sandboxes (`build.cabal.*`), Stack (`build.stack.*`) or the global package database
++(`build.global-db.*`). Also see [instructions for building GHC on Windows using Stack][windows-build].
++
++* Hadrian is written in Haskell and depends on `shake` (plus a few packages that `shake` depends on),
++`mtl`, `quickcheck`, and GHC core libraries.
++
++* If you have never built GHC before, start with the [preparation guide][ghc-preparation].
++
++Using the build system
++----------------------
++Once your first build is successful, simply run `build` to rebuild. Build results
++are placed into `_build` and `inplace` directories.
++
++#### Command line flags
++
++In addition to standard Shake flags (try `--help`), the build system
++currently supports several others:
++
++* `--build-root=PATH` or `-oPATH`: specify the directory in which you want to store all
++build products. By default Hadrian builds everything in the `_build/` subdirectory of
++the GHC source tree. Unlike the Make build system, Hadrian doesn't have any "inplace"
++logic left anymore. This option is therefore useful for GHC developers who want to build
++GHC in different ways or at different commits, from the same source directory, and have
++the build products sit in different, isolated folders.
++
++* `--configure` or `-c`: use this flag to run the `boot` and `configure` scripts
++automatically, so that you don't have to remember to run them manually as you normally
++do when using Make (typically only in the first build):
++    ```bash
++    ./boot
++    ./configure # On Windows run ./configure --enable-tarballs-autodownload
++    ```
++    Beware that with this flag Hadrian may do network I/O on Windows to download necessary
++    tarballs, which may sometimes be undesirable.
++
++* `--flavour=FLAVOUR`: choose a build flavour. The following settings are currently supported:
++`default`, `quick`, `quickest`, `perf`, `prof`, `devel1` and `devel2`. As an example, the
++`quickest` flavour adds `-O0` flag to all GHC invocations and builds libraries only in the
++`vanilla` way, which speeds up builds by 3-4x. Build flavours are documented
++[here](https://github.com/snowleopard/hadrian/blob/master/doc/flavours.md).
++
++* `--freeze1`: freeze Stage1 GHC, i.e. do not rebuild it even if some of its source files
++are out-of-date. This allows to significantly reduce the rebuild time when you are working
++on a feature that affects both Stage1 and Stage2 compilers, but may lead to incorrect
++build results. To unfreeze Stage1 GHC simply drop the `--freeze1` flag and Hadrian will
++rebuild all out-of-date files.
++
++* `--integer-simple`: build GHC using the `integer-simple` integer library (instead
++of `integer-gmp`).
++
++* `--progress-colour=MODE`: choose whether to use colours when printing build progress
++info. There are three settings: `never` (do not use colours), `auto` (attempt to detect
++whether the console supports colours; this is the default setting), and `always` (use
++colours).
++
++* `--progress-info=STYLE`: choose how build progress info is printed. There are four
++settings: `none`, `brief` (one line per build command; this is the default setting),
++`normal` (typically a box per build command), and `unicorn` (when `normal` just won't do).
++
++* `--split-objects`: generate split objects, which are switched off by default. Due to
++a GHC [bug][ghc-split-objs-bug], you need a full clean rebuild when using this flag.
++
++* `--verbose`: run Hadrian in verbose mode. In particular this prints diagnostic messages
++by Shake oracles.
++
++#### User settings
++
++The Make-based build system uses `mk/build.mk` to specify user build settings. We
++use `hadrian/UserSettings.hs` for the same purpose, see [documentation](doc/user-settings.md).
++
++#### Clean and full rebuild
++
++* `build clean` removes all build artefacts.
++
++* `build -B` forces Shake to rerun all rules, even if the previous build results are
++are still up-to-date.
++
++#### Documentation
++
++To build GHC documentation, run `build docs`. Note that finer-grain documentation
++targets (e.g. building only HTML documentation or only the GHC User's Guide)
++are currently not supported.
++
++#### Source distribution
++
++To build a GHC source distribution tarball, run `build source-dist`.
++
++#### Binary distribution
++
++To build a GHC binary distribution, run `build binary-dist`. The resulting
++tarball contains just enough to support the
++
++``` sh
++$ ./configure [--prefix=PATH] && make install
++```
++
++workflow, for now.
++
++#### Testing
++
++* `build validate` runs GHC tests by simply executing `make fast` in `testsuite/tests`
++directory. This can be used instead of `sh validate --fast --no-clean` in the existing
++build system. Note: this will rebuild Stage2 GHC, `ghc-pkg` and `hpc` if they are out of date.
++
++* `build test` runs GHC tests by calling the `testsuite/driver/runtests.py` python
++script with appropriate flags. The current implementation is limited and cannot
++replace the `validate` script (see [#187][validation-issue]).
++
++* `build selftest` runs tests of the build system. Current test coverage is close to
++zero (see [#197][test-issue]).
++
++Troubleshooting
++---------------
++
++Here are a few simple suggestions that might help you fix the build:
++
++* The Hadrian submodule in GHC is occasionally behind the master branch of this repository,
++  which contains most recent bug fixes. To switch to the most recent version of Hadrian,
++  run `git pull https://github.com/snowleopard/hadrian.git`. Beware: the most recent version
++  contains the most recent bugs too! If this works, please raise an issue and we will try to
++  push the changes to the GHC submodule as soon as possible.
++  
++* Hadrian is occasionally broken by changes in GHC. If this happens, you might want to switch
++  to an earlier GHC commit.
++  
++* If Hadrian fails with the message `Configuration file hadrian/cfg/system.config is missing`,
++  you have probably forgotten to pass the `--configure` flag during the first build.
++  
++* If you need help in debugging Hadrian, read the [wiki](https://github.com/snowleopard/hadrian/wiki)
++  and Shake's [debugging tutorial](https://shakebuild.com/debugging).
++
++If everything fails, don't hesitate to [raise an issue](https://github.com/snowleopard/hadrian/issues/new).
++
++Current limitations
++-------------------
++The new build system still lacks many important features:
++* Validation is not implemented: [#187][validation-issue].
++* Dynamic linking on Windows is not supported [#343][dynamic-windows-issue].
++* There is no support for binary distribution: [#219][bin-dist-issue].
++
++Check out [milestones] to see when we hope to resolve the above limitations.
++
++How to contribute
++-----------------
++
++The best way to contribute is to try the new build system, report the issues
++you found, and attempt to fix them. Please note: the codebase is very unstable
++at present and we expect a lot of further refactoring. If you would like to
++work on a particular issue, please let everyone know by adding a comment about
++this. The issues that are currently on the critical path and therefore require
++particular attention are listed in [#239](https://github.com/snowleopard/hadrian/issues/239).
++Also have a look at [projects](https://github.com/snowleopard/hadrian/projects)
++where open issues and pull requests are grouped into categories.
++
++Acknowledgements
++----------------
++
++I started this project as part of my 6-month research visit to Microsoft
++Research Cambridge, which was funded by Newcastle University, EPSRC, and
++Microsoft Research. I would like to thank Simon Peyton Jones, Neil Mitchell
++and Simon Marlow for kick-starting the project and for their guidance.
++Zhen Zhang has done fantastic work on Hadrian as part of his Summer of
++Haskell 2017 [project](https://summer.haskell.org/ideas.html#hadrian-ghc),
++solving a few heavy and long-overdue issues. Last but not least, big thanks
++to all other project [contributors][contributors], who helped me endure and
++enjoy the project.
++
++[ghc]: https://en.wikipedia.org/wiki/Glasgow_Haskell_Compiler
++[shake]: https://github.com/ndmitchell/shake
++[make]: https://ghc.haskell.org/trac/ghc/wiki/Building/Architecture
++[talk]: https://skillsmatter.com/skillscasts/8722-meet-hadrian-a-new-build-system-for-ghc
++[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
++[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
++[dynamic-windows-issue]: https://github.com/snowleopard/hadrian/issues/343
++[bin-dist-issue]: https://github.com/snowleopard/hadrian/issues/219
++[milestones]: https://github.com/snowleopard/hadrian/milestones
++[contributors]: https://github.com/snowleopard/hadrian/graphs/contributors
index 0000000,0000000..1a18abe
new file mode 100644 (file)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,38 @@@
++clone_folder: "c:\\new-hadrian"
++environment:
++  global:
++    STACK_ROOT: "c:\\sr"
++
++cache:
++    - "c:\\sr -> appveyor.yml"
++
++install:
++    # Get Stack
++    - curl -ostack.zip -LsS --insecure https://www.stackage.org/stack/windows-x86_64
++    - 7z x stack.zip stack.exe
++
++    # Note: AppVeyor has already cloned Hadrian into c:\new-hadrian
++    # Fetch GHC sources into c:\ghc
++    - cd ..
++    - git clone --recursive git://git.haskell.org/ghc.git
++    # GHC comes with an older version of Hadrian, so we delete it
++    - rm -rf ghc\hadrian
++    # Copy new Hadrian into ./ghc/hadrian
++    - cp -r new-hadrian ghc\hadrian
++
++    # Install Alex and Happy
++    - set PATH=C:\Users\appveyor\AppData\Roaming\local\bin;%PATH%
++    - ghc\hadrian\stack install --install-ghc alex happy > nul
++
++    # Install all Hadrian and GHC build dependencies
++    - cd ghc\hadrian
++    - stack setup > nul
++    - appveyor-retry stack exec -- pacman -S autoconf automake-wrapper make patch python3 tar --noconfirm
++
++build_script:
++    # Build GHC
++    - cd ..
++    - hadrian\build -c -j --flavour=quickest --integer-simple --no-progress --progress-colour=never --profile=-
++
++    # Test GHC binary
++    - _build\stage1\bin\ghc -e 1+2
index 0000000,01a869f..01a869f
mode 000000,100644..100644
--- /dev/null
index 0000000,b47c0bf..b47c0bf
mode 000000,100644..100644
--- /dev/null
index 0000000,9fddd61..9fddd61
mode 000000,100755..100755
--- /dev/null
index 0000000,0000000..4b03ea8
new file mode 100755 (executable)
--- /dev/null
--- /dev/null
@@@ -1,0 -1,0 +1,35 @@@
++#!/usr/bin/env nix-shell
++#! nix-shell -i bash shell.nix
++
++# This script sets up the build environment by invoking nix-shell shell.nix
++# and then runs the hadrian executable.
++
++function rl {
++    TARGET_FILE="$1"
++
++    cd "$(dirname "$TARGET_FILE")"
++    TARGET_FILE="$(basename "$TARGET_FILE")"
++
++    # Iterate down a (possible) chain of symlinks
++    while [ -L "$TARGET_FILE" ]
++    do
++        TARGET_FILE="$(readlink "$TARGET_FILE")"
++        cd "$(dirname "$TARGET_FILE")"
++        TARGET_FILE="$(basename "$TARGET_FILE")"
++    done
++
++    # Compute the canonicalized name by finding the physical path
++    # for the directory we're in and appending the target file.
++    PHYS_DIR="$(pwd -P)"
++    RESULT="$PHYS_DIR/$TARGET_FILE"
++    echo "$RESULT"
++}
++
++absoluteRoot="$(dirname "$(rl "$0")")"
++echo $absoluteRoot
++cd "$absoluteRoot"
++
++hadrian         \
++  --lint                         \
++  --directory="$absoluteRoot/.." \
++  "$@"
index 0000000,1fde2d6..1fde2d6
mode 000000,100755..100755
--- /dev/null
index 0000000,674375a..674375a
mode 000000,100644..100644
--- /dev/null
index 0000000,59ac061..59ac061
mode 000000,100755..100755
--- /dev/null
index 0000000,2b1ff1d..2b1ff1d
mode 000000,100755..100755
--- /dev/null
index 0000000,176d1ee..176d1ee
mode 000000,100644..100644
--- /dev/null
index 0000000,344706d..344706d
mode 000000,100644..100644
--- /dev/null
index 0000000,4d0d973..4d0d973
mode 000000,100644..100644
--- /dev/null
index 0000000,724d0e1..724d0e1
mode 000000,100644..100644
--- /dev/null
index 0000000,f276dbb..f276dbb
mode 000000,100644..100644
--- /dev/null
index 0000000,b81c0dc..b81c0dc
mode 000000,100644..100644
--- /dev/null
index 0000000,0ad2086..0ad2086
mode 000000,100644..100644
--- /dev/null
index 0000000,fec927a..fec927a
mode 000000,100644..100644
--- /dev/null
index 0000000,041bf09..041bf09
mode 000000,100644..100644
--- /dev/null
index 0000000,68862ed..68862ed
mode 000000,100644..100644
--- /dev/null
index 0000000,85c2c4c..85c2c4c
mode 000000,100644..100644
--- /dev/null
index 0000000,1532ec5..1532ec5
mode 000000,100644..100644
--- /dev/null
index 0000000,3269714..3269714
mode 000000,100644..100644
--- /dev/null
index 0000000,4bc9d9b..4bc9d9b
mode 000000,100644..100644
--- /dev/null
index 0000000,4ce622e..4ce622e
mode 000000,100644..100644
--- /dev/null
index 0000000,1666c68..1666c68
mode 000000,100644..100644
--- /dev/null
index 0000000,a520c0b..a520c0b
mode 000000,100644..100644
--- /dev/null
index 0000000,b5b0138..b5b0138
mode 000000,100644..100644
--- /dev/null
index 0000000,e95e0d7..e95e0d7
mode 000000,100644..100644
--- /dev/null
index 0000000,5d645ee..5d645ee
mode 000000,100644..100644
--- /dev/null
index 0000000,ad74653..ad74653
mode 000000,100644..100644
--- /dev/null
index 0000000,44b522c..44b522c
mode 000000,100644..100644
--- /dev/null
index 0000000,75cf725..75cf725
mode 000000,100644..100644
--- /dev/null
index 0000000,53c86de..53c86de
mode 000000,100644..100644
--- /dev/null
index 0000000,327e6a0..327e6a0
mode 000000,100644..100644
--- /dev/null
index 0000000,bae2fdb..bae2fdb
mode 000000,100644..100644
--- /dev/null
index 0000000,4c52162..4c52162
mode 000000,100644..100644
--- /dev/null
index 0000000,ab771a4..ab771a4
mode 000000,100644..100644
--- /dev/null
index 0000000,aef553f..aef553f
mode 000000,100644..100644
--- /dev/null
index 0000000,6bc31d7..6bc31d7
mode 000000,100644..100644
--- /dev/null
index 0000000,8848977..8848977
mode 000000,100644..100644
--- /dev/null
index 0000000,88b5bad..88b5bad
mode 000000,100644..100644
--- /dev/null
index 0000000,083e683..083e683
mode 000000,100644..100644
--- /dev/null
index 0000000,57dbf2d..57dbf2d
mode 000000,100644..100644
--- /dev/null
index 0000000,1e508c0..1e508c0
mode 000000,100644..100644
--- /dev/null
index 0000000,1cdcddf..1cdcddf
mode 000000,100644..100644
--- /dev/null
index 0000000,1bf75b5..1bf75b5
mode 000000,100644..100644
--- /dev/null
index 0000000,8a9a48f..8a9a48f
mode 000000,100644..100644
--- /dev/null
index 0000000,852bd5d..852bd5d
mode 000000,100644..100644
--- /dev/null
index 0000000,f0aeb4b..f0aeb4b
mode 000000,100644..100644
--- /dev/null
index 0000000,abf6933..abf6933
mode 000000,100644..100644
--- /dev/null
index 0000000,4e85db2..4e85db2
mode 000000,100644..100644
--- /dev/null
index 0000000,909b3c3..909b3c3
mode 000000,100644..100644
--- /dev/null
index 0000000,9589d12..9589d12
mode 000000,100644..100644
--- /dev/null
index 0000000,92b5ff5..92b5ff5
mode 000000,100644..100644
--- /dev/null
index 0000000,c3650c3..c3650c3
mode 000000,100644..100644
--- /dev/null
index 0000000,32265fe..32265fe
mode 000000,100644..100644
--- /dev/null
index 0000000,58ac1ef..58ac1ef
mode 000000,100644..100644
--- /dev/null
index 0000000,b53bcc8..b53bcc8
mode 000000,100644..100644
--- /dev/null
index 0000000,0950605..0950605
mode 000000,100644..100644
--- /dev/null
index 0000000,f5be21a..f5be21a
mode 000000,100644..100644
--- /dev/null
index 0000000,62023d7..62023d7
mode 000000,100644..100644
--- /dev/null
index 0000000,68aa6e3..68aa6e3
mode 000000,100644..100644
--- /dev/null
index 0000000,8bec3f3..8bec3f3
mode 000000,100644..100644
--- /dev/null
index 0000000,f5d6990..f5d6990
mode 000000,100644..100644
--- /dev/null
index 0000000,3497f43..3497f43
mode 000000,100755..100755
--- /dev/null
index 0000000,e0ef136..e0ef136
mode 000000,100644..100644
--- /dev/null
index 0000000,f33e9b4..f33e9b4
mode 000000,100644..100644
--- /dev/null
index 0000000,e0055f3..e0055f3
mode 000000,100644..100644
--- /dev/null
index 0000000,6846c4b..6846c4b
mode 000000,100644..100644
--- /dev/null
index 0000000,8212b5f..8212b5f
mode 000000,100644..100644
--- /dev/null
index 0000000,bc8303f..bc8303f
mode 000000,100644..100644
--- /dev/null
index 0000000,5ffb261..5ffb261
mode 000000,100644..100644
--- /dev/null
index 0000000,e33061c..e33061c
mode 000000,100644..100644
--- /dev/null
index 0000000,0d5363d..0d5363d
mode 000000,100644..100644
--- /dev/null
index 0000000,2715bbb..2715bbb
mode 000000,100644..100644
--- /dev/null
index 0000000,102ba54..102ba54
mode 000000,100644..100644
--- /dev/null
index 0000000,031bd45..031bd45
mode 000000,100644..100644
--- /dev/null
index 0000000,30a2849..30a2849
mode 000000,100644..100644
--- /dev/null
index 0000000,a1eb2fb..a1eb2fb
mode 000000,100644..100644
--- /dev/null
index 0000000,59b58eb..59b58eb
mode 000000,100644..100644
--- /dev/null
index 0000000,4d75e32..4d75e32
mode 000000,100644..100644
--- /dev/null
index 0000000,5a9e831..5a9e831
mode 000000,100644..100644
--- /dev/null
index 0000000,7c9405c..7c9405c
mode 000000,100644..100644
--- /dev/null
index 0000000,30c8d98..30c8d98
mode 000000,100644..100644
--- /dev/null
index 0000000,9246806..9246806
mode 000000,100644..100644
--- /dev/null
index 0000000,7fe6a89..7fe6a89
mode 000000,100644..100644
--- /dev/null
index 0000000,2375a12..2375a12
mode 000000,100644..100644
--- /dev/null
index 0000000,4055ff4..4055ff4
mode 000000,100644..100644
--- /dev/null
index 0000000,d379133..d379133
mode 000000,100644..100644
--- /dev/null