diff options
-rw-r--r-- | .gitlab-ci.yml | 1 | ||||
-rw-r--r-- | hadrian/src/Rules/Lint.hs | 10 |
2 files changed, 8 insertions, 3 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a5cfd8161d..e9bdd7e6aa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -372,7 +372,6 @@ lint-base: script: - .gitlab/ci.sh setup - .gitlab/ci.sh configure - - .gitlab/ci.sh run_hadrian stage1:lib:base - .gitlab/ci.sh run_hadrian lint:base lint-compiler: diff --git a/hadrian/src/Rules/Lint.hs b/hadrian/src/Rules/Lint.hs index c48ac51106..218dff8047 100644 --- a/hadrian/src/Rules/Lint.hs +++ b/hadrian/src/Rules/Lint.hs @@ -51,12 +51,18 @@ base = do let machDeps = "includes/MachDeps.h" let ghcautoconf = stage1Lib </> "ghcautoconf.h" let ghcplatform = stage1Lib </> "ghcplatform.h" - need ["stage1:lib:base", ghcautoconf, ghcplatform, machDeps] + -- ./configure is called here manually because we need to generate + -- HsBaseConfig.h, which is created from HsBaseConfig.h.in. ./configure + -- is usually run by Cabal which generates this file but if we do that + -- then hadrian thinks it needs to build the stage0 compiler before + -- attempting to configure. Therefore we just run it directly everytime, + -- which is slower but still faster than building the whole of stage0. + cmd_ (Cwd "libraries/base") "./configure" + need [ghcautoconf, ghcplatform, machDeps] let includeDirs = [ "includes" , "libraries/base/include" , stage1Lib - , buildDir </> "stage1/libraries/base/build/include" ] runHLint includeDirs [] "libraries/base" |