1. 13 Jun, 2019 1 commit
  2. 12 Jun, 2019 2 commits
  3. 11 Jun, 2019 3 commits
    • Alp Mestanogullari's avatar
      testsuite/mk/boilerplate.mk: rename 'ghc-config-mk' to 'ghc_config_mk' · aad6115a
      Alp Mestanogullari authored
      Make/shell variable names which contain dashes can cause problems under
      some conditions. The 'ghc-config-mk' variable from testsuite/mk/boilerplate.mk
      that I made overridable (by Hadrian) in ba0aed2e was working as expected when
      our Hadrian/Linux job was based off the deb8 Docker image, but broke when
      I switched the job to use our deb9-based image, in 3d97bad6. The exact
      circumstances/tool versions that trigger this problem are unknown, but
      changing the variable's name to 'ghc_config_mk' lets us work around the issue.
      
      This fixes the annth_compunits and annth_make test failures that showed up
      when we switched the Hadrian/Linux job to use the deb9 environment.
      aad6115a
    • Alp Mestanogullari's avatar
      Refine the GHCI macro into HAVE[_{INTERNAL, EXTERNAL}]_INTERPRETER · 39f50bff
      Alp Mestanogullari authored
      As discussed in #16331, the GHCI macro, defined through 'ghci' flags
      in ghc.cabal.in, ghc-bin.cabal.in and ghci.cabal.in, is supposed to indicate
      whether GHC is built with support for an internal interpreter, that runs in
      the same process. It is however overloaded in a few places to mean
      "there is an interpreter available", regardless of whether it's an internal
      or external interpreter.
      
      For the sake of clarity and with the hope of more easily being able to
      build stage 1 GHCs with external interpreter support, this patch splits
      the previous GHCI macro into 3 different ones:
      
      - HAVE_INTERNAL_INTERPRETER: GHC is built with an internal interpreter
      - HAVE_EXTERNAL_INTERPRETER: GHC is built with support for external interpreters
      - HAVE_INTERPRETER: HAVE_INTERNAL_INTERPRETER || HAVE_EXTERNAL_INTERPRETER
      39f50bff
    • David Eichmann's avatar
      Refactor the rules for .hi and .o into a single rule using `&%>` #16764 · 58a5d728
      David Eichmann authored
      Currently the rule for .hi files just triggers (via need) the rule
      for the .o file, and .o rule generates both the .o and .hi file.
      Likewise for .o-boot and .hi-boot files. This is a bit of an abuse
      of Shake, and in fact shake supports rules with multiple output
      with the &%> function. This exact use case appears in Neil
      Mitchell's paper *Shake Before Building* section 6.3.
      58a5d728
  4. 09 Jun, 2019 2 commits
  5. 07 Jun, 2019 1 commit
  6. 04 Jun, 2019 2 commits
  7. 30 May, 2019 1 commit
    • Alp Mestanogullari's avatar
      Hadrian: always generate the libffi dynlibs manifest with globbing · 3aa71a22
      Alp Mestanogullari authored
      Instead of trying to deduce which dynlibs are expected to be found (and then
      copied to the RTS's build dir) in libffi's build directory, with some OS
      specific logic, we now always just use `getDirectoryFilesIO` to look for
      those dynlibs and record their names in the manifest. The previous logic
      ended up causing problems on Windows, where we don't build dynlibs at all
      for now but the manifest file's logic didn't take that into account because
      it was only partially reproducing the criterions that determine whether or not
      we will be building shared libraries.
      
      This patch also re-enables the Hadrian/Windows CI job, which was failing to
      build GHC precisely because of libffi shared libraries and the aforementionned
      duplicated logic.
      3aa71a22
  8. 29 May, 2019 2 commits
    • David Eichmann's avatar
      a1bf3413
    • Alp Mestanogullari's avatar
      testsuite: introduce 'static_stats' tests · 7a75a094
      Alp Mestanogullari authored
      They are a particular type of perf tests. This patch introduces a
      'stats_files_dir' configuration field in the testsuite driver where all
      haddock timing files (and possibly others in the future) are assumed to live.
      We also change both the Make and Hadrian build systems to pass respectively
      $(TOP)/testsuite/tests/perf/haddock/ and
      <build root>/stage1/haddock-timing-files/ as the value of that new
      configuration field, and to generate the timing files in those directories
      in the first place while generating documentation with haddock.
      
      This new test type can be seen as one dedicated to examining stats files that
      are generated while building a GHC distribution. This also lets us get rid of
      the 'extra_files' directives in the all.T entries for haddock.base,
      haddock.Cabal and haddock.compiler.
      7a75a094
  9. 27 May, 2019 2 commits
    • John Ericson's avatar
      hadrian: Fix generation of settings · f80d3afd
      John Ericson authored
      I jumbled some lines in e529c65e,
      messing up the leading underscores and rts ways settings. This broke at
      least stage1 linking on macOS, but probably loads of other things too.
      
      Should fix #16685 and #16658.
      f80d3afd
    • Alp Mestanogullari's avatar
      Hadrian: Fix problem with unlit path in settings file · 01f8e390
      Alp Mestanogullari authored
      e529c65e introduced a problem in the logic for generating the
      path to the unlit command in the settings file, and this patches
      fixes it.
      
      This fixes many tests, the simplest of which is:
      
      > _build/stage1/bin/ghc testsuite/tests/parser/should_fail/T8430.lhs
      
      which failed because of a wrong path for unlit, and now fails for the right
      reason, with the error message expected for this test.
      
      This addresses #16659.
      01f8e390
  10. 25 May, 2019 1 commit
    • David Eichmann's avatar
      Hadrian: Add Mising Libffi Dependencies #16653 · 9be1749d
      David Eichmann authored
      Libffi is ultimately built from a single archive file (e.g.
      libffi-tarballs/libffi-3.99999+git20171002+77e130c.tar.gz).
      The file can be seen as the shallow dependency for the whole
      libffi build. Hence, in all libffi rules, the archive is
      `need`ed and the build directory is `trackAllow`ed.
      9be1749d
  11. 24 May, 2019 1 commit
    • Alp Mestanogullari's avatar
      add an --hadrian mode to ./validate · 04b4b984
      Alp Mestanogullari authored
      When the '--hadrian' flag is passed to the validate script, we use hadrian
      to build GHC, package it up in a binary distribution and later on run GHC's
      testsuite against the said bindist, which gets installed locally in the process.
      
      Along the way, this commit fixes a typo, an omission (build iserv binaries
      before producing the bindist archive) and moves the Makefile that enables
      'make install' on those bindists from being a list of strings in the code to
      an actual file (it was becoming increasingly annoying to work with).
      
      Finally, the Settings.Builders.Ghc part of this patch is necessary for being
      able to use the installed binary distribution, in 'validate'.
      04b4b984
  12. 22 May, 2019 1 commit
    • Alp Mestanogullari's avatar
      Hadrian: add --test-root-dirs, to only run specific directories of tests · 2c15b85e
      Alp Mestanogullari authored
      We can specify several of those, by using the flag multiple times or
      just once but combining the directories with ':'.
      
      Along the way, this patch also fixes the testsuite-related --only flag,
      so that we can use it many times instead of being force to specify a
      space-separated list of test in a single --only flag.
      2c15b85e
  13. 21 May, 2019 1 commit
    • David Eichmann's avatar
      Refactor Libffi and RTS rules · 0af519ac
      David Eichmann authored
      This removes a hack that copies libffi files to the rts
      build directory. This was done in a libffi rule, but now
      an rts rule correctly needs and copies the relevant
      files from the libffi build dir to the rts build dir.
      
      Issues: #16272 #16304
      0af519ac
  14. 14 May, 2019 4 commits
    • Alp Mestanogullari's avatar
      Hadrian: 'need' source files for various docs in Rules.Documentation · a416ae26
      Alp Mestanogullari authored
      Previously, changing one of the .rst files from the user guide would not cause
      the user guide to be rebuilt. This patch take a first stab at declaring the
      documentation source files that our documentation rules depend on, focusing
      on the .rst files only for now.
      
      We eventually might want to rebuild docs when we, say, change the haddock style
      file, but this level of tracking isn't really necessary for now.
      
      This fixes #16645.
      a416ae26
    • Vladislav Zavialov's avatar
      Restore the --coerce option in 'happy' configuration · 684dc290
      Vladislav Zavialov authored
      happy-1.19.10 has been released with a fix for --coerce in the presence
      of higher rank types. This should result in about 10% performance
      improvement in the parser.
      684dc290
    • John Ericson's avatar
      Remove all target-specific portions of Config.hs · e529c65e
      John Ericson authored
      1. If GHC is to be multi-target, these cannot be baked in at compile
         time.
      
      2. Compile-time flags have a higher maintenance than run-time flags.
      
      3. The old way makes build system implementation (various bootstrapping
         details) with the thing being built. E.g. GHC doesn't need to care
         about which integer library *will* be used---this is purely a crutch
         so the build system doesn't need to pass flags later when using that
         library.
      
      4. Experience with cross compilation in Nixpkgs has shown things work
         nicer when compiler's can *optionally* delegate the bootstrapping the
         package manager. The package manager knows the entire end-goal build
         plan, and thus can make top-down decisions on bootstrapping. GHC can
         just worry about GHC, not even core library like base and ghc-prim!
      e529c65e
    • John Ericson's avatar
      hadrian: Make settings stage specific · 015a21b8
      John Ericson authored
      015a21b8
  15. 10 May, 2019 1 commit
    • David Eichmann's avatar
      Hadrian: programs need registered ghc-pkg libraries · bfcd986d
      David Eichmann authored
      In Hadrian, building programs (e.g. `ghc` or `haddock`) requires libraries located in the ghc-pkg package database i.e.
      
          _build/stage1/lib/x86_64-linux-ghc-8.9.0.20190430/libHSdeepseq-1.4.4.0-ghc8.9.0.20190430.so
      
      Add the corresponding `need`s for these library files and the subsequent rules.
      bfcd986d
  16. 08 May, 2019 1 commit
  17. 06 May, 2019 2 commits
    • Alp Mestanogullari's avatar
      Hadrian: override $(ghc-config-mk), to prevent redundant config generation · ba0aed2e
      Alp Mestanogullari authored
      This required making the 'ghc-config-mk' variable overridable in
      testsuite/mk/boilerplate.mk, and then making use of this in hadrian
      to point to '<build root>/test/ghcconfig' instead, which is where we
      always put the test config.
      
      Previously, we would build ghc-config and run it against the
      GHC to be tested, a second time, while we're running the tests, because some
      include testsuite/mk/boilerplate.mk. This was causing unexpected output
      failures.
      ba0aed2e
    • John Ericson's avatar
      Remove cGhcEnableTablesNextToCode · 27941064
      John Ericson authored
      Get "Tables next to code" from the settings file instead.
      27941064
  18. 01 May, 2019 2 commits
    • John Ericson's avatar
      Move cGHC_UNLIT_PGM to be "unlit command" in settings · 2988ef5e
      John Ericson authored
      The bulk of the work was done in #712, making settings be make/Hadrian
      controlled. This commit then just moves the unlit command rules in
      make/Hadrian from the `Config.hs` generator to the `settings` generator
      in each build system.
      
      I think this is a good change because the crucial benefit is *settings*
      don't affect the build: ghc gets one baby step closer to being a regular
      cabal executable, and make/Hadrian just maintains settings as part of
      bootstrapping.
      2988ef5e
    • John Ericson's avatar
      Generate settings by make/hadrian instead of configure · d37d91e9
      John Ericson authored
      This allows it to eventually become stage-specific
      d37d91e9
  19. 22 Apr, 2019 1 commit
    • Alp Mestanogullari's avatar
      Hadrian: use the testsuite driver's config.haddock arg more correctly · 51655fd8
      Alp Mestanogullari authored
      4 haddock tests assume that .haddock files have been produced, by using the
      'req_haddock' modifier. The testsuite driver assumes that this condition is
      satisfied if 'config.haddock' is non-empty, but before this patch Hadrian was
      always passing the path to where the haddock executable should be, regardless
      of whether it is actually there or not.
      
      Instead, we now pass an empty config.haddock when we can't find all of
      <build root>/docs/html/libraries/<pkg>/<pkg>.haddock>, where <pkg> ranges over
      array, base, ghc-prim, process and template-haskell, and pass the path
      to haddock when all those file exists. This has the (desired) effect of skipping
      the 4 tests (marked as 'missing library') when the docs haven't been built,
      and running the haddock tests when they have.
      51655fd8
  20. 19 Apr, 2019 1 commit
  21. 18 Apr, 2019 1 commit
  22. 16 Apr, 2019 1 commit
  23. 14 Apr, 2019 3 commits
  24. 12 Apr, 2019 2 commits
    • Alp Mestanogullari's avatar
      Hadrian: add a --test-accept/-a flag, to mimic 'make accept' · 3c759ced
      Alp Mestanogullari authored
      When -a or --test-accept is passed, and if one runs the 'test' target, then
      any test failing because of mismatching output and which is not expected to
      fail will have its expected output adjusted by the test driver, effectively
      considering the new output correct from now on.
      
      When this flag is passed, hadrian's 'test' target becomes sensitive to the
      PLATFORM and OS environment variable, just like the Make build system:
      - when the PLATFORM env var is set to "YES", when accepting a result, accept it
        for the current platform;
      - when the OS env var is set to "YES", when accepting a result, accept it
        for all wordsizes of the current operating system.
      
      This can all be combined with `--only="..."` and `TEST="..." to only accept
      the new output of a subset of tests.
      3c759ced
    • Sylvain Henry's avatar
      beaa07d2
  25. 11 Apr, 2019 1 commit