1. 24 Dec, 2018 1 commit
  2. 15 Dec, 2018 1 commit
  3. 11 Dec, 2018 3 commits
    • Alec Theriault's avatar
      Support generating HIE files · f582379d
      Alec Theriault authored
      Adds a `-fenable-ide-info` flag which instructs GHC to generate `.hie`
      files (see the wiki page:
      https://ghc.haskell.org/trac/ghc/wiki/HIEFiles).
      
      This is a rebased version of Zubin Duggal's (@wz1000) GHC changes for
      his GSOC project, as posted here:
      https://gist.github.com/wz1000/5ed4ddd0d3e96d6bc75e095cef95363d.
      
      Test Plan: ./validate
      
      Reviewers: bgamari, gershomb, nomeata, alanz, sjakobi
      
      Reviewed By: alanz, sjakobi
      
      Subscribers: alanz, hvr, sjakobi, rwbarton, wz1000, carter
      
      Differential Revision: https://phabricator.haskell.org/D5239
      f582379d
    • Alp Mestanogullari's avatar
      Hadrian: ability to run a subset of the testsuite · a5e76a07
      Alp Mestanogullari authored
      This was supposed to be working already but didn't work when we
      specified several tests with --only. This patch not only fixes this
      but also makes it possible to specify a subset of tests to run with the
      TEST environment variable, like the make build system. Here are some
      examples:
      
          hadrian/build.sh test --only=plugins01
          hadrian/build.sh test --only="plugins01 plugins02"
          TEST="plugins01 plugins02" hadrian/build.sh test
          TEST=plugins03 hadrian/build.sh test --only="plugins01 plugins02"
      
      When both the TEST environment variable and the --only flag are used,
      we simply concatenate the list of tests from both sources and ask the
      testsuite driver to run them all.
      
      This patch addresses #16026.
      
      Test Plan: hadrian/build.sh test --only="plugins01 plugins02"
      
      Reviewers: bgamari, snowleopard
      
      Reviewed By: bgamari, snowleopard
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #16026
      
      Differential Revision: https://phabricator.haskell.org/D5431
      a5e76a07
    • David Eichmann's avatar
      Revert dynamically linking ghc. · 4efafe7e
      David Eichmann authored
      Building a dynamically linked ghc is broken do to incorrectly building
      and installing libffi. This disables building a dynamically linked ghc
      and ghc-iserv-dyn while keeping most of the code in the relevant
      commits: 79d5427e and 89fa34ec
      
      Test Plan:
      Ensure build environment does NOT have a system libffi installed (you
      may want to use a nix environment).
      Then `hadrian/build.sh -c --flavour=default`.
      
      Reviewers: bgamari, alpmestan
      
      Reviewed By: alpmestan
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15837
      
      Differential Revision: https://phabricator.haskell.org/D5430
      4efafe7e
  4. 08 Dec, 2018 2 commits
    • Alp Mestanogullari's avatar
      Hadrian: fix dynamicGhcPrograms value for the quickest flavour · 7d96d281
      Alp Mestanogullari authored
      Quickest does not build anything in a dynamic way, so that
      flavour should default to not building "ghc programs" dynamically.
      
      I ran into this problem by building the 'docs' target with quickest,
      which failed because at some point we run a haddock command in a
      context whose Way is sensitive to dynamicGhcPrograms, and it
      started looking for dyn interface files when it shouldn't have.
      
      Test Plan: hadrian/build.sh --flavour=quickest docs
      
      Reviewers: snowleopard, bgamari
      
      Reviewed By: snowleopard
      
      Subscribers: rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5419
      7d96d281
    • Alp Mestanogullari's avatar
      hadrian: eliminate most of the remaining big rule enumerations · 665f8b0c
      Alp Mestanogullari authored
      Following what was done to Rules.Library some time ago and to
      Rules.Compile recently (D5412), this patch moves more rules away from
      the "enumerate a lot of contexts and generate one rule for each" style
      and instead uses the "parse data from file path to recover context"
      approach. In fact, the only rules left to convert seem to be the ones
      from Rules.Generate.
      
      This effectively decreases the pauses described in #15938 further as
      well as the amount of allocations and GC that we do, unsurprisingly.
      Nowhere as drastically as D5412, though.
      
      Test Plan: perform full build and generate docs
      
      Reviewers: snowleopard, bgamari
      
      Reviewed By: snowleopard
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15938
      
      Differential Revision: https://phabricator.haskell.org/D5422
      665f8b0c
  5. 04 Dec, 2018 1 commit
    • Alec Theriault's avatar
      Hadrian: include 'findPtr' via find-ptr cabal flag · 924026e0
      Alec Theriault authored
      Summary:
      This is the latest in the 'findPtr' saga. See
      
        * 900c47f8
        * 561748cb
      
      for the previous attempts. The problem with re-using the 'debug'
      cabal flag for the purpose of forcing inclusion of 'findPtr' occurs
      when 'debug' is one of the RTS ways, but RTS is not being compiled
      with '-DDEBUG':
      
        * the 'debug' flag gets passed to cabal, signalling to build
          'rts' with the debug flavour, but also forcing inclusion of
          the 'findPtr'/'_findPtr' symbol
      
        * since '-DDEBUG' isn't enabled, that symbol doesn't show up in
          the libraries, so executable that depend on 'rts' (everything)
          will end up always requiring 'findPtr'/'_findPtr' but 'rts' won'y
          provide it!
      
      The fix is simple: create a a new 'find-ptr' cabal-flag whose only
      purpose is forcing '-Wl,-u,findPtr'/'-Wl,-u,_findPtr'. Then, enable that
      flag when the RTS is being compiled with '-DDEBUG'
      
      Test Plan: ./hadrian/build.sh -c # on mac
      
      Reviewers: alpmestan, snowleopard, bgamari, erikd, simonmar, Phyx
      
      Reviewed By: alpmestan, snowleopard, Phyx
      
      Subscribers: Phyx, rwbarton, carter
      
      GHC Trac Issues: #15956
      
      Differential Revision: https://phabricator.haskell.org/D5404
      924026e0
  6. 29 Nov, 2018 2 commits
    • David Eichmann's avatar
      Hadrian: support dynamically linking ghc · 79d5427e
      David Eichmann authored
      * (#15837 point 5) Use the -rpath gcc option and using the $ORIGIN
      variable which the dynamic linker sets to the location of the ghc
      binary.
      * (#15837 point 4) "-fPIC -dynamic" options are used when building ghc
      when either ghc or the rts have a dynamic way.
      * (#15837 point 7) "-shared -dynload deploy" options are only used when
      linking a library (no longer when linking a program).
      
      Reviewers: bgamari, alpmestan
      
      Reviewed By: alpmestan
      
      Subscribers: adamse, rwbarton, carter
      
      Differential Revision: https://phabricator.haskell.org/D5281
      79d5427e
    • Alp Mestanogullari's avatar
      Hadrian: bump Cabal submodule, install extra dynamic flavours of RTS · fb997160
      Alp Mestanogullari authored
      Previously, Hadrian was building all the appropriate dynamic ways for
      libHSrts
      but they were not picked up and installed in the package database when
      we register the rts library. Since we use Cabal for registering
      packages and
      the .cabal files of packages as sources of truth for configuring and
      installing,
      we ended up patching Cabal to add a new field,
      'extra-dynamic-library-flavours',
      to specify those extra flavours to install in .cabal files:
      
          https://github.com/haskell/cabal/pull/5606
      
      We now make use of this in rts.cabal.in to expose dynamic flavours
      behind a
      Cabal flag, which Hadrian will use whenever we are building a GHC
      flavour that
      requires dynamic libraries.
      
      This is all part of a larger plan to build a dynamic stage 2 GHC by
      default,
      like with make, which in turn will fix a lot of test failures. See
      
      Test Plan:
      hadrian/build.sh _build/stage1/lib/package.conf.d/rts-1.0.conf
      _build/stage1/lib/x86_64-.../ should contain many libHSrts-*.so
      
      Reviewers: snowleopard, DavidEichmann, bgamari, erikd, simonmar
      
      Reviewed By: snowleopard, DavidEichmann
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15837
      
      Differential Revision: https://phabricator.haskell.org/D5385
      fb997160
  7. 08 Dec, 2017 1 commit