[commit: ghc] master: Fix unlit by placing it under lib/bin/ instead of bin/ (#591) (a161b8e)

git at git.haskell.org git at git.haskell.org
Tue Oct 23 20:16:52 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/a161b8eee6d0465a605a9fb21a5be41078e9b42f/ghc

>---------------------------------------------------------------

commit a161b8eee6d0465a605a9fb21a5be41078e9b42f
Author: Alp Mestanogullari <alpmestan at gmail.com>
Date:   Fri May 11 00:29:34 2018 +0200

    Fix unlit by placing it under lib/bin/ instead of bin/ (#591)
    
    A nicer fix would involve patching GHC to not just look under
    $libexec/ but also under the directory where the GHC binary itself lives
    (bin/ for hadrian), so that we can leave all binaries under bin/.
    
    Addresses Trac #15132.


>---------------------------------------------------------------

a161b8eee6d0465a605a9fb21a5be41078e9b42f
 src/GHC.hs | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/GHC.hs b/src/GHC.hs
index 0262823..5c690dd 100644
--- a/src/GHC.hs
+++ b/src/GHC.hs
@@ -131,8 +131,10 @@ programPath context at Context {..} = do
     -- The @touchy@ utility lives in the @lib/bin@ directory instead of @bin@,
     -- which is likely just a historical accident that will hopefully be fixed.
     -- See: https://github.com/snowleopard/hadrian/issues/570
-    path <- if package /= touchy then stageBinPath stage
-                                 else stageLibPath stage <&> (-/- "bin")
+    -- Likewise for 'unlit'.
+    path <- if package `elem` [touchy, unlit]
+      then stageLibPath stage <&> (-/- "bin")
+      else stageBinPath stage
     pgm  <- programName context
     return $ path -/- pgm <.> exe
 



More information about the ghc-commits mailing list