1. 13 Jun, 2019 1 commit
  2. 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
  3. 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
  4. 15 Mar, 2019 1 commit
  5. 06 Mar, 2019 1 commit
    • Ben Gamari's avatar
      Rip out object splitting · 37f257af
      Ben Gamari authored
      The splitter is an evil Perl script that processes assembler code.
      Its job can be done better by the linker's --gc-sections flag. GHC
      passes this flag to the linker whenever -split-sections is passed on
      the command line.
      
      This is based on @DemiMarie's D2768.
      
      Fixes Trac #11315
      Fixes Trac #9832
      Fixes Trac #8964
      Fixes Trac #8685
      Fixes Trac #8629
      37f257af
  6. 23 Feb, 2019 1 commit
  7. 16 Jan, 2019 1 commit
  8. 06 Jan, 2019 1 commit
    • Zejun Wu's avatar
      Hadrian: merge sections in profiling _p.a to .p_o for ghci · 9ea8dcea
      Zejun Wu authored
      This is the hadrain version of {D5169}
      
      * We build squashed .o and .p_o for ghci when `dynamicGhcPrograms` is
      `False`
      * We no longer build them for rts as ghci never loads it
      
      we need https://github.com/haskell/cabal/pull/5592 for cabal to copy
      the built `.p_o` file.
      
      Test Plan:
      ```
      $ grep dynamicGhc hadrian/UserSettings.hs
        , dynamicGhcPrograms = return False
      $ touch ...
      $ hadrian/build.sh --flavour=user -j --digest-or
      $ find _build/stage1/libraries/ -name 'HS*-*.*o' | wc
           62      62    3664
      ```
      
      ```
      $ grep -C3 dynamicGhc hadrian/UserSettings.hs
      userFlavour :: Flavour
      userFlavour = performanceFlavour
        { name = "user"
        , dynamicGhcPrograms = return False
        }
      $ hadrian/build.sh -j --flavour=user test --verbose
      Unexpected results from:
      TEST="T3807 T9208 T9293 annth_make ghci057 haddock.Cabal haddock.base
      haddock.compiler"
      
      SUMMARY for test run started at Wed Dec  5 17:45:39 2018 PST
       0:03:16 spent to go through
          6708 total tests, which gave rise to
         26015 test cases, of which
         19290 were skipped
      
            29 had missing libraries
          6600 expected passes
            88 expected failures
      
             3 caused framework failures
             0 caused framework warnings
             1 unexpected passes
             7 unexpected failures
             0 unexpected stat failures
      $ find _build -name 'HSbase*.*o'
      _build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1
      2.0.0.o
      _build/stage1/lib/x86_64-linux-ghc-8.7.20181204/base-4.12.0.0/HSbase-4.1
      2.0.0.p_o
      _build/stage1/libraries/base/build/HSbase-4.12.0.0.o
      _build/stage1/libraries/base/build/HSbase-4.12.0.0.p_o
      ```
      
      Reviewers: bgamari, simonmar, snowleopard
      
      Reviewed By: snowleopard
      
      Subscribers: alpmestan, rwbarton, carter
      
      GHC Trac Issues: #15779
      
      Differential Revision: https://phabricator.haskell.org/D5270
      9ea8dcea
  9. 07 Dec, 2018 1 commit
    • Alp Mestanogullari's avatar
      hadrian: optimise Rules.Compile · eee1b61f
      Alp Mestanogullari authored
      Previously, as reported in #15938, resuming a build "in the middle",
      e.g when building _build/stage1/libraries/base/, hadrian would take up
      to a whole minute to get started doing actual work, building code.
      
      This was mostly due to a big enumeration that we do in Rules.hs, to
      generate all the possible patterns for object files for 1) all ways, 2)
      all packages and 3) all stages. Since rule enumeration is always
      performed, whatever the target, we were always paying this cost, which
      seemed to grow bigger the farther in the build we stopped and were
      resuming from.
      
      Instead, this patch borrows the approach that we took for Rules.Library
      in https://github.com/snowleopard/hadrian/pull/571, which exposes all the
      relevant object files under as few catch-all rules as possible (8 here),
      and parses all the information we need out of the object's path.
      
      The concrete effect of this patch that I have observed is to reduce the
      45-60 seconds pause to <5 seconds. Along with the Shake performance
      improvements that Neil mentions in #15938, most of the pause should
      effectively disappear.
      
      Reviewers: snowleopard, bgamari, goldfire
      
      Reviewed By: snowleopard
      
      Subscribers: rwbarton, carter
      
      GHC Trac Issues: #15938
      
      Differential Revision: https://phabricator.haskell.org/D5412
      eee1b61f
  10. 29 Nov, 2018 1 commit
    • 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
  11. 08 Dec, 2017 1 commit