summaryrefslogtreecommitdiff
path: root/utils/runghc
Commit message (Collapse)AuthorAgeFilesLines
* Per stage headers, ghc_boot_platform.h -> stage 0 ghcplatform.hJohn Ericson2019-10-041-1/+1
| | | | | | | | | | | | | | | | | | The generated headers are now generated per stage, which means we can skip hacks like `ghc_boot_platform.h` and just have that be the stage 0 header as proper. In general, stages are to be embraced: freely generate everything in each stage but then just build what you depend on, and everything is symmetrical and efficient. Trying to avoid stages because bootstrapping is a mind bender just creates tons of bespoke mini-mind-benders that add up to something far crazier. Hadrian was pretty close to this "stage-major" approach already, and so was fairly easy to fix. Make needed more work, however: it did know about stages so at least there was a scaffold, but few packages except for the compiler cared, and the compiler used its own counting system. That said, make and Hadrian now work more similarly, which is good for the transition to Hadrian. The merits of embracing stage aside, the change may be worthy for easing that transition alone.
* fix runghc's GHC detection logic to cover the "in-tree Hadrian build" scenarioAlp Mestanogullari2019-06-161-1/+6
| | | | | | | | Before this patch, runghc would only run the GHC detection logic on Windows and assume that it was invoked through a wrapper script on all other platforms. This patch lifts this limitation and makes that logic work for the scenario where someone is calling the runghc executable directly, without passing an explicit path to GHC.
* Update Wiki URLs to point to GitLabTakenobu Tani2019-03-252-4/+4
| | | | | | | | | | | | | | | | | | | | | | | This moves all URL references to Trac Wiki to their corresponding GitLab counterparts. This substitution is classified as follows: 1. Automated substitution using sed with Ben's mapping rule [1] Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy... New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy... 2. Manual substitution for URLs containing `#` index Old: ghc.haskell.org/trac/ghc/wiki/XxxYyy...#Zzz New: gitlab.haskell.org/ghc/ghc/wikis/xxx-yyy...#zzz 3. Manual substitution for strings starting with `Commentary` Old: Commentary/XxxYyy... New: commentary/xxx-yyy... See also !539 [1]: https://gitlab.haskell.org/bgamari/gitlab-migration/blob/master/wiki-mapping.json
* Update Trac ticket URLs to point to GitLabRyan Scott2019-03-151-1/+1
| | | | | This moves all URL references to Trac tickets to their corresponding GitLab counterparts.
* Add missing Semigroup instances in utils/{hpc,runghc}Herbert Valerio Riedel2017-08-311-6/+10
| | | | This is a follow-up to c0feee90118333dac817cfad6f2dedc0a886d1bd
* Bump process to 1.6Ben Gamari2017-04-271-1/+1
| | | | Also bumps Cabal submodule due to version bound bump.
* add $(CrossCompilePrefix) to 'runghc' and 'ghci'Sergei Trofimovich2017-04-061-5/+5
| | | | | | | | | | When Stage1Only=YES install mode is used one of rare tools that lack $(CrossCompilePrefix) prefix are 'runghc' and 'ghci'. This causes file collisions when multiple GHC crosscompilers are installed in system. Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
* base: Bump version to 4.10.0.0Ben Gamari2016-12-151-1/+1
| | | | Updates a number of submodules.
* runghc: Fix import of System.Process on WindowsBen Gamari2016-10-021-1/+1
| | | | | | | | | | | | | | | | | This apparently should have been an import of rawSystem instead of runProcess. Oops. Fixes D2538. Test Plan: Validate on Linux and Windows. Reviewers: austin, snowleopard Reviewed By: snowleopard Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2561
* runghc: use executeFile to run ghc process on POSIXMichael Snoyman2016-10-022-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | This means that, on POSIX systems, there will be only one ghc process used for running scripts, as opposed to the current situation of a runghc process and a ghc process. Beyond minor performance benefits of not having an extra fork and resident process, the more important impact of this is automatically getting proper signal handling. I noticed this problem myself when running runghc as PID1 inside a Docker container. I attempted to create a shim library for executeFile that would work for both POSIX and Windows, but unfortunately I ran into issues with exit codes being propagated correctly (see https://github.com/fpco/replace-process/issues/2). Therefore, this patch leaves the Windows behavior unchanged. Given that signals are a POSIX issue, this isn't too bad a trade-off. If someone has suggestions for better Windows _exec support, please let me know. Reviewers: erikd, austin, bgamari Reviewed By: bgamari Subscribers: Phyx, thomie Differential Revision: https://phabricator.haskell.org/D2538
* Fix and complete runghc documentationHarendra Kumar2016-08-301-0/+1
| | | | | | | | | | Reviewers: austin, thomie, bgamari Reviewed By: bgamari Differential Revision: https://phabricator.haskell.org/D2463 GHC Trac Issues: #12517
* Add Cabal synopses and descriptionsBen Gamari2016-01-051-2/+12
| | | | | | | | | | | | | | | | Various people (myself included) have complained about the lack of useful descriptions for the various packages included in GHC's source tree. Fix this. Test Plan: Validate Reviewers: austin, thomie Reviewed By: thomie Subscribers: angerman, ezyang Differential Revision: https://phabricator.haskell.org/D1736
* Fix runghc when $1_$2_SHELL_WRAPPER = NORyanGlScott2015-12-152-5/+18
| | | | | | | | | | | | | | | | | | | | | When that variable isn't on (which is always the case on Windows), `runghc` naively attempts to invoke `ghc` by finding an executable simply named `ghc`. This won't work if `ghc` doesn't exist (e.g., if we're building GHC and using `ghc-stage2` instead). A simple fix is to test for the existence of `ghc` beforehand, and if that fails, fall back on `ghc-stage2`. Fixes #11185. Test Plan: ./validate Reviewers: austin, hvr, thomie, bgamari Reviewed By: thomie, bgamari Differential Revision: https://phabricator.haskell.org/D1621 GHC Trac Issues: #11185
* Update process submodule to process-1.4 releaseHerbert Valerio Riedel2015-11-021-1/+1
| | | | | We already used a process-1.4 snapshot with non-bumped version, so this commit is mostly a `.cabal` file upper-bound relaxation change.
* Update process submoduleHerbert Valerio Riedel2015-11-011-1/+1
| | | | | | | | | | This is needed to prepare for #11026 as this update relaxes the upper bounds on `base` to allow for `base-4.9.0.0` This also needs to relax a few upper bounds on process in some cabal files (there will be another process submodule update soon, as a major version bump of process' version is still pending)
* Build system: cleanup a few .cabal filesThomas Miedema2015-10-301-11/+4
|
* Build system: rename runghc.hs to Main.hsThomas Miedema2015-10-303-7/+1
| | | | | The build system has trouble with Main modules not called Main.hs. This change allows a hack in utils/runghc/ghc.mk to be removed.
* runghc: be explicit about ghc version (#9054)Thomas Miedema2015-02-182-1/+9
| | | | | | | | | | | | | | Summary: runghc-7.x should always call ghc-7.x Reviewers: austin Reviewed By: austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D664 GHC Trac Issues: #9054
* Change all hashbangs to /usr/bin/env (#9057)Thomas Miedema2014-09-231-1/+1
| | | | | | | | | | | | | | | | | | Summary: ``` git grep -l '#!' | xargs sed -i 's|#!.*/bin/\([^ ]*\)$|#!/usr/bin/env \1|' ``` and some manual tweaking Test Plan: harbormaster Reviewers: austin Subscribers: hvr, simonmar, ezyang, carter Differential Revision: https://phabricator.haskell.org/D237 GHC Trac Issues: #9057
* Export `Monoid(..)`/`Foldable(..)`/`Traversable(..)` from PreludeHerbert Valerio Riedel2014-09-211-1/+0
| | | | | | | | | | | | | | | This finally exposes also the methods of these 3 classes in the Prelude in order to allow to define basic class instances w/o needing imports. This almost completes the primary goal of #9586 NOTE: `fold`, `foldl'`, `foldr'`, and `toList` are not exposed yet, as they require upstream fixes for at least `containers` and `bytestring`, and are not required for defining basic instances. Reviewed By: ekmett, austin Differential Revision: https://phabricator.haskell.org/D236
* Remove LANGUAGE pragrams implied by Haskell2010Herbert Valerio Riedel2014-05-141-1/+1
| | | | | | | | | Haskell2010 implies (at least) EmptyDataDecls, ForeignFunctionInterface, PatternGuards, DoAndIfThenElse, and RelaxedPolyRec. This is a follow-up to dd92e2179e3171a0630834b773c08d416101980d Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* Set cabal files to default-language:Haskell2010Herbert Valerio Riedel2014-05-141-1/+2
| | | | | | | This is a first step towards eliminating `default-extensions` in favour of per-file declared `{-# LANGUAGE ... #-}` pragmas. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
* runghc: Fix interaction of stdin and --ghc-argsJohn Lenz2014-01-071-7/+13
| | | | | | | | | | | | | When reading the program from standard input, runghc did not properly handle the --ghc-arg= escape for arguments to ghc which do not start with a dash, since arguments were processed twice and the first time the --ghc-arg= was stripped. Now arguments are only processed once. For backwards compatibility, a prefix of --ghc-arg=--ghc-arg= is allowed since this prefix will work on both old and new versions of ghc. This fixes #8601 Signed-off-by: Austin Seipp <austin@well-typed.com>
* Globally replace "hackage.haskell.org" with "ghc.haskell.org"Simon Marlow2013-10-012-4/+4
|
* Use different exeext variables for each stage; fixes #7709Ian Lynagh2013-04-201-1/+1
| | | | | Currently they are all set to the same value, but when cross-compiling they could be set to different values.
* Automatically add the $(exeext) to program namesIan Lynagh2013-03-031-1/+1
| | | | | | | We now define _PROGNAME, and _PROG is automatically defined with $(exeext). This will shortly automatically use the right exeext depending on what stage it is being compiled with (exeext may be different for different stages when cross-compiling).
* Rename $(Windows) to $(Windows_Host)Ian Lynagh2013-03-011-1/+1
|
* Stop using the deprecated System.CmdIan Lynagh2013-02-151-1/+1
|
* Update dependenciesIan Lynagh2012-11-301-1/+1
|
* Build the dynamic way by default on Linux/amd64Ian Lynagh2012-10-031-0/+1
| | | | | | | | | | | | | 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/...
* Tweak the build system handling of shell wrappersIan Lynagh2012-09-271-1/+1
| | | | | | | Rather than having a separate foo_INSTALL_SHELL_WRAPPER variable, we just use foo_INSTALL && foo_SHELL_WRAPPER
* Update dependency on directory.Paolo Capriotti2012-09-091-1/+1
|
* Create versioned runghc wrapper (#5873)Paolo Capriotti2012-06-191-0/+3
|
* Remove a couple of unnecessary lines of CPPIan Lynagh2012-05-181-2/+0
|
* Fix #6109 : error Unknown mingw32 arch.Erik de Castro Lopo2012-05-181-5/+9
|
* Don't use stdcall on Win64: It isn't supported; ccall is used insteadIan Lynagh2012-05-161-1/+9
|
* Improve the way we call "rm" in the build system; fixes trac #4916Ian Lynagh2011-11-191-1/+1
| | | | | | | | | | We avoid calling "rm -rf" with no file arguments; this fixes cleaning on Solaris, where that fails. We also check for suspicious arguments: anything containing "..", starting "/", or containing a "*" (you need to call $(wildcard ...) yourself now if you really want globbing). This should make things a little safer.
* Remove unnecessary import (Windows only)Simon Peyton Jones2011-07-291-1/+0
|
* Relax some dependenciesIan Lynagh2011-07-081-1/+1
|
* Make builds that use stage1 use "dist-install" consistently. ThisSimon Marlow2011-05-281-7/+7
| | | | | makes it easier to remove everything built with stage1 in cases where the build system or GHC wrongly thinks everything is up to date.
* Unicode fixes, taking into account PEP383 supportMax Bolingbroke2011-05-141-9/+11
|
* Remove more dead code now we require GHC >= 6.12Ian Lynagh2010-12-151-4/+0
|
* Fix build following haskell98 and -fglasgow-exts changesIan Lynagh2010-10-062-3/+4
|
* Make installation on *nix work for paths with spaces in their nameIan Lynagh2009-11-052-3/+3
| | | | | | This means we can remove some conditional stuff from the Makefiles, and means the testsuite doesn't have to work out whether or not it's on Windows.
* Use "order only constraints" for directoriesIan Lynagh2009-10-021-2/+1
| | | | There are now 104 calls to mkdirhier, down from 1201, when validating.
* UNDO: fix the inplace runghc (it broke the installed runghc)Simon Marlow2009-08-261-1/+1
|
* fix the inplace runghcSimon Marlow2009-08-201-1/+1
| | | | | It was invoking $(TOP)/inplace/bin/ghc rather than $(TOP)/inplace/bin/ghc-stage2
* Fix unused import warningsIan Lynagh2009-07-071-2/+0
|
* Include runghc and unlit in bindistsIan Lynagh2009-06-131-3/+1
|
* Quote commands that we run, so they work if there are space in their pathsIan Lynagh2009-05-301-4/+4
| | | | | I've also added some missing $s to some makefiles. These aren't technically necessary, but it's nice to be consistent.