summaryrefslogtreecommitdiff
path: root/utils/ghc-cabal/Main.hs
Commit message (Collapse)AuthorAgeFilesLines
...
* Package keys (for linking/type equality) separated from package IDs.Edward Z. Yang2014-08-051-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 explosion. Signed-off-by: Edward 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
* Use import list to hide new System.Exit.dieHerbert Valerio Riedel2014-04-211-1/+1
| | | | | | | | | Soon, System.Exit will export the new `die` (see #9016) which would clash with Cabal's own `die` implementation. This commit provides forward-compatiblity. This also updates the Cabal submodule which requires a similiar fix. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Update Cabal submodule to tip of v1.20 branchHerbert Valerio Riedel2014-04-161-0/+10
| | | | | | | | | | | | | | | | | | | This corresponds to the RC of the soon-to-be Cabal 1.20 release One noteworthy change is the removal of the `--with-ranlib` flag requiring a small adaptation in the GHC build system. Moreover two new licences were added, MPL and BSD2. Due to https://github.com/haskell/cabal/issues/1622 Cabal-1.20 now allows to strip libraries as well, this doesn't work well with `ghc-cabal copy` being fed a `":"` strip-command argument which was simply ignored in the past. The current code tries to retain this semantics as backward compat. However, this needs more investigation as I'm not sure if/why the `test_bindist` step doesn't want the libraries to be stripped on installation. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* ghc-cabal: force use of UTF8 when writing out `haddock-prologue.txt`Herbert Valerio Riedel2014-03-231-1/+7
| | | | | | | | This unbreaks the GHC build if a non-UTF8 locale such as LANG=C is active See also haskell/cabal#1721 and haskell/haddock#286 Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Cause "make install" to install dynamic libraries (#8194)Bryan O'Sullivan2013-09-151-4/+6
| | | | | | Our special ghc-cabal command needs to be told that we are building with dynamic library support when it does its copying. We do so by passing an extra parameter from ghc.mk.
* Sync Cabal to upstream version 1.18 pre-releaseHerbert Valerio Riedel2013-08-261-6/+7
| | | | | | Apart from bumping build-dep version bounds, `ghc-cabal` is adapted to some minor Cabal API changes, and `bin-package-db` is made aware of Cabal's recently added AGPL licence support.
* Fix the GHC package DLL-splittingIan Lynagh2013-05-141-6/+14
| | | | | | | 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.
* Simplify ghc-cabalIan Lynagh2013-05-141-19/+17
| | | | | | It now consistently takes directory and distDirectory as its first 2 arguments. Also, it only supports configuring 1 package at a time now (we weren't using the ability to configure more than one at once).
* More work towards dynamic programs on WindowsIan Lynagh2013-05-121-0/+1
| | | | | | | | | | | | | | | | | | | Dynamic GHC is now working in-place, but pathologically slow due to the DLL split. (GHC assumes that all intra-package calls are in the same DLL, but that isn't true when we split the GHC package into 2 DLLs. That means that GHC's startup time is around 22 seconds, as it is doing run-time linking). Also, ghci isn't actually working yet: $ inplace/bin/ghc-stage2 --interactive GHCi, version 7.7.20130512: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... <command line>: can't load .so/.DLL for: HSghc-prim-0.3.1.0.dll (addDLL: could not load DLL) ghc-stage2.exe: HSghc-prim-0.3.1.0: The specified module could not be found.
* Finish adding support for 2 DLLs in the ghc package; fixes #5987Ian Lynagh2013-03-131-2/+25
|
* Follow changes in CabalIan Lynagh2013-03-121-28/+17
|
* Update CabalIan Lynagh2013-03-111-13/+20
|
* Revert "Always use --force when registering packages"Ian Lynagh2012-10-251-2/+2
| | | | | | This reverts commit c67b43133ee9f71b280577b274cb3753a396a83a. We no longer need to always force, as ghc-pkg is cleverer.
* Always use --force when registering packagesIan Lynagh2012-10-251-2/+2
| | | | | When dynamic-by-default, we may only have .dyn_hi files, and ghc-pkg complains if there are no .hi files.
* Make it possible to build with only way dynIan Lynagh2012-10-241-6/+19
|
* Move the RPATH computation into the build rulesIan Lynagh2012-10-141-4/+0
| | | | It doesn't really belong in package-data.mk
* Add TRANSITIVE_DEPS variables to package-data.mk filesIan Lynagh2012-10-141-0/+3
|
* Build the dynamic way by default on Linux/amd64Ian Lynagh2012-10-031-45/+89
| | | | | | | | | | | | | This required various build system changes to get the build to go through. In the inplace shell wrappers, we set LD_LIBRARY_PATH to allow programs to find their libraries. In the future, we might change the inplace tree to be the same shape as an installed tree instead. However, this would mean changing the way we do installation, as currently we use cabal's installation methods to install the libraries, but that only works if the libraries are under libraries/foo/dist-install/build/..., rather than in inplace/lib/...
* Follow changes in CabalIan Lynagh2012-08-231-1/+2
|
* Rename package-conf flags to package-db.Paolo Capriotti2012-05-151-1/+1
| | | | | | | | 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.
* Adapt to changes in Cabal.Paolo Capriotti2012-05-071-30/+14
|
* Add stricter ghc-pkg checks on package file/dir/url fieldsDuncan Coutts2011-05-251-1/+1
| | | | | | | The haddock-html and haddock-interface fields are now checked as well. Had to fix up ghc-cabal as it used relative paths for the inplace package's haddock-html. It turns out that these were never used so it could simply be omitted.
* Set stdout to use line buffering in ghc-cabalIan Lynagh2011-04-171-1/+2
|
* Fix build, and improve ghc-cabal's errorsIan Lynagh2011-03-051-4/+4
|
* Whitespace onlyIan Lynagh2011-03-051-8/+8
|
* Sanity check values that we wrap in single quotesIan Lynagh2011-03-051-3/+16
| | | | Make sure they contain no single quotes, leading spaces, or trailing spaces.
* Avoid some shell calls in the build systemIan Lynagh2011-03-051-2/+2
| | | | | | | | | 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 them.
* Merge in new code generator branch.Simon Marlow2011-01-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This changes the new code generator to make use of the Hoopl package for dataflow analysis. Hoopl is a new boot package, and is maintained in a separate upstream git repository (as usual, GHC has its own lagging darcs mirror in http://darcs.haskell.org/packages/hoopl). During this merge I squashed recent history into one patch. I tried to rebase, but the history had some internal conflicts of its own which made rebase extremely confusing, so I gave up. The history I squashed was: - Update new codegen to work with latest Hoopl - Add some notes on new code gen to cmm-notes - Enable Hoopl lag package. - Add SPJ note to cmm-notes - Improve GC calls on new code generator. Work in this branch was done by: - Milan Straka <fox@ucw.cz> - John Dias <dias@cs.tufts.edu> - David Terei <davidterei@gmail.com> Edward Z. Yang <ezyang@mit.edu> merged in further changes from GHC HEAD and fixed a few bugs.
* Use := when assigning the result of $(wildcard ...)Ian Lynagh2011-01-221-1/+1
| | | | Avoids repeated evaluations of things that need system calls etc
* Remove an extraneous comma that stopped ghc-cabal from buildingIan Lynagh2011-01-191-1/+1
|
* Move the PACKAGE_MAGIC evaluation inside package-data.mkIan Lynagh2011-01-191-2/+7
|
* ghc-cabal now adds the language flag being usedIan Lynagh2011-01-171-0/+1
| | | | | This means we get -XHaskell98 added to the list of flags, just like we would if we were building with Cabal.
* Add --version support to ghc-cabalIan Lynagh2010-12-121-0/+2
|
* Build a copy of ghc-cabal with the in-tree compiler, for the bindistIan Lynagh2010-12-101-0/+385