Skip to content

Commit

Permalink
Ignore Stack-built ghc executables #1052
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Sep 27, 2015
1 parent 42bb3b3 commit 0548ee2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
7 changes: 7 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ Major changes:

* "stack setup" now supports building and booting GHCJS from source tarball.

Other enhancements:

Bug fixes:

* Ignore stack-built executables named `ghc`
[#1052](https://github.com/commercialhaskell/stack/issues/1052)

## 0.1.5.0

Major changes:
Expand Down
13 changes: 12 additions & 1 deletion src/Stack/Build/Execute.hs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,18 @@ ensureConfig newConfigCache pkgDir ExecuteEnv {..} announce cabal cabalfp = do
when needConfig $ withMVar eeConfigureLock $ \_ -> do
deleteCaches pkgDir
announce
cabal False $ "configure" : dirs ++ nodirs
menv <- getMinimalEnvOverride
exes <- forM (words "ghc ghcjs") $ \name -> do
mpath <- findExecutable menv name
return $ case mpath of
Nothing -> []
Just x -> return $ concat ["--with-", name, "=", toFilePath x]
liftIO $ print exes
cabal False $ "configure" : concat
[ concat exes
, dirs
, nodirs
]
writeConfigCache pkgDir newConfigCache
writeCabalMod pkgDir newCabalMod

Expand Down

0 comments on commit 0548ee2

Please sign in to comment.