1. 01 Dec, 2015 1 commit
    • thomie's avatar
      Build system: Add stage specific SRC_HC_(WARNING_)OPTS · 14d0f7f1
      thomie authored
      * Add stage specific versions of SRC_HC_OPTS. These are currently only
        used for -Werror. The previous combination of GhcStage2HcOpts and
        GhcLibHcOpts didn't apply to utils/*.
      * Add stage specific versions of SRC_HC_WARNING_OPTS. These will later be
        used for new warning supression flags that should not be passed to the
        bootstrap compiler.
      * Move -Wall (and -Werror) related code back to mk/warnings.mk, where it
        was before 987d5427. Now all warning related code is nicely together.
        Include mk/warnings.mk after mk/custom-settings.mk to make this work.
      Reviewed By: bgamari, hvr
      Differential Revision: https://phabricator.haskell.org/D1536
  2. 12 Nov, 2015 1 commit
    • olsner's avatar
      Implement function-sections for Haskell code, #8405 · 4a32bf92
      olsner authored
      This adds a flag -split-sections that does similar things to
      -split-objs, but using sections in single object files instead of
      relying on the Satanic Splitter and other abominations. This is very
      similar to the GCC flags -ffunction-sections and -fdata-sections.
      The --gc-sections linker flag, which allows unused sections to actually
      be removed, is added to all link commands (if the linker supports it) so
      that space savings from having base compiled with sections can be
      Supported both in LLVM and the native code-gen, in theory for all
      architectures, but really tested on x86 only.
      In the GHC build, a new SplitSections variable enables -split-sections
      for relevant parts of the build.
      Test Plan: validate with both settings of SplitSections
      Reviewers: dterei, Phyx, austin, simonmar, thomie, bgamari
      Reviewed By: simonmar, thomie, bgamari
      Subscribers: hsyl20, erikd, kgardas, thomie
      Differential Revision: https://phabricator.haskell.org/D1242
      GHC Trac Issues: #8405
  3. 29 Oct, 2015 1 commit
  4. 28 Oct, 2015 1 commit
    • thomie's avatar
      Build system: don't add ALL_HC_OPTS when linking · 9fc2d777
      thomie authored
      The current scheme in rules/distdir-way-opts.mk is something like this:
        MOST_DIR_HC_OPTS = MOST_HC_OPTS + -odir,-hidir,-stubdir
        ALL_HC_OPTS      = MOST_DIR_HC_OPTS +
      Notice that both ALL_HC_OPTS and GHC_LD_OPTS include MOST_HC_OPTS, and
      currently both got added when linking. Adding MOST_HC_OPTS twice results
      in overly long and hard to decipher command lines (and build logs). This
      commit fixes that.
      Afaik, -odir,-hidir,-stubdir,-hisuf,-osuf,-hcsuf,-spit-objs,-dynamic-too
      are all not needed when linking, so this change should be safe to make.
      GHC_LD_OPTS is for linking, ALL_HC_OPTS is for compiling.
      ALL_HC_OPTS was added to the linking commands in
      37a6a52f, to make sure
      -no-user-package-conf would be in the options list. It still is after
      this change.
      Reviewers: austin, bgamari
      Differential Revision: https://phabricator.haskell.org/D1379
  5. 15 Oct, 2015 1 commit
  6. 22 Jun, 2015 1 commit
  7. 20 Jun, 2015 1 commit
  8. 13 Aug, 2014 2 commits
  9. 05 Aug, 2014 1 commit
    • Edward Z. Yang's avatar
      Package keys (for linking/type equality) separated from package IDs. · 66218d15
      Edward Z. Yang authored
      This patch set makes us no longer assume that a package key is a human
      readable string, leaving Cabal free to "do whatever it wants" to allocate
      keys; we'll look up the PackageId in the database to display to the user.
      This also means we have a new level of qualifier decisions to make at the
      package level, and rewriting some Safe Haskell error reporting code to DTRT.
      Additionally, we adjust the build system to use a new ghc-cabal output
      Make variable PACKAGE_KEY to determine library names and other things,
      rather than concatenating PACKAGE/VERSION as before.
      Adds a new `-this-package-key` flag to subsume the old, erroneously named
      `-package-name` flag, and `-package-key` to select packages by package key.
      RFC: The md5 hashes are pretty tough on the eye, as far as the file
      system is concerned :(
      ToDo: safePkg01 test had its output updated, but the fix is not really right:
      the rest of the dependencies are truncated due to the fact the we're only
      grepping a single line, but ghc-pkg is wrapping its output.
      ToDo: In a later commit, update all submodules to stop using -package-name
      and use -this-package-key.  For now, we don't do it to avoid submodule
      Signed-off-by: default avatarEdward Z. Yang <ezyang@cs.stanford.edu>
      Test Plan: validate
      Reviewers: simonpj, simonmar, hvr, austin
      Subscribers: simonmar, relrod, carter
      Differential Revision: https://phabricator.haskell.org/D80
  10. 27 Mar, 2014 1 commit
    • Simon Marlow's avatar
      Include EXTRA_LD_OPTS (amongst other things) when linking programs · 975e9cb8
      Simon Marlow authored
      One problem was that we weren't including $1_$2_DIST_LD_OPTS when
      linking a program, which looks to be accidental: it was being defined
      but not used anywhere.  This meant that setting $1_$2_EXTRA_LD_OPTS,
      for example, had no effect.
      This commit straightens out the handling of LD_OPTS to be consistent
      with the way we handle CC_OPTS and HC_OPTS.
  11. 28 Jan, 2014 1 commit
  12. 07 Jan, 2014 1 commit
  13. 01 Oct, 2013 1 commit
  14. 15 May, 2013 1 commit
  15. 14 May, 2013 1 commit
    • ian@well-typed.com's avatar
      Fix the GHC package DLL-splitting · 60b86b04
      ian@well-typed.com authored
      There's now an internal -dll-split flag, which we use to tell GHC how
      the GHC package is split into 2 separate DLLs. This is used by
      Packages.isDllName to determine whether a call is within the same
      DLL, or whether it is a call to another DLL.
  16. 12 May, 2013 1 commit
  17. 26 Apr, 2013 2 commits
  18. 20 Apr, 2013 1 commit
  19. 23 Mar, 2013 1 commit
  20. 10 Mar, 2013 1 commit
  21. 09 Mar, 2013 1 commit
  22. 22 Feb, 2013 1 commit
  23. 21 Feb, 2013 1 commit
  24. 08 Nov, 2012 1 commit
  25. 24 Jul, 2012 1 commit
    • Ian Lynagh's avatar
      Tweak the HC_OPTS generation · f95ced26
      Ian Lynagh authored
      libraries/base/GHC/Base_HC_OPTS wasn't getting included, because we
      were using libraries/base/./GHC/Base.lhs as the path, and the ./
      meant we got the wrong filename.
      I didn't use $(realpath ...) as the .hs file may be generated by hsc2hs
      or similar, so may not exist when the HC_OPTS are constructed.
  26. 15 May, 2012 1 commit
    • pcapriotti's avatar
      Rename package-conf flags to package-db. · ca2debb2
      pcapriotti authored
      Rename package database flags in both GHC and ghc-pkg so that they are
      consistent with Cabal nomenclature.
      Add a version check to the build system so that the correct set of
      package db flags are used when the bootstrapping GHC has version < 7.5.
  27. 01 May, 2012 1 commit
  28. 26 Apr, 2012 1 commit
    • Ian Lynagh's avatar
      Add SRC_[CH]C_WARNING_OPTS · 3d8dd486
      Ian Lynagh authored
      This allows you to say things like
          SRC_HC_WARNING_OPTS += -fno-warn-unsupported-calling-conventions
      in mk/validate.mk.
      Unfortunately, we can't just use SRC_HC_OPTS, as that gets put before
      the more specific options (e.g. ghc-options in a .cabal file), many of
      which include -Wall. So now we have:
          ghc $(SRC_HC_OPTS) ... options from .cabal etc ... $(SRC_HC_WARNING_OPTS)
  29. 19 Dec, 2011 1 commit
  30. 05 Oct, 2011 2 commits
  31. 08 Aug, 2011 1 commit
  32. 26 Apr, 2011 2 commits
  33. 24 Jan, 2011 1 commit
  34. 16 Jan, 2011 1 commit
  35. 05 Mar, 2011 1 commit
    • Ian Lynagh's avatar
      Avoid some shell calls in the build system · e28cbcd8
      Ian Lynagh authored
      The DEP_INCLUDE_DIRS and DEP_LIB_DIRS variables always contain
      single-quote dirs, so we can use e.g.
          $(subst $(space)',$(space)-L',$(space)$($1_$2_DEP_LIB_DIRS_SINGLE_QUOTED))
      to add -L to the front of each dir. I've appended "_SINGLE_QUOTED" to
      the variable names so we don't accidentally add bare directories to
  36. 05 Sep, 2010 1 commit