1diff --git a/Distribution/Simple/GHC.hs b/Distribution/Simple/GHC.hs
2index 547776046..176e59111 100644
3--- a/Distribution/Simple/GHC.hs
4+++ b/Distribution/Simple/GHC.hs
6 {-# LANGUAGE FlexibleContexts #-}
7 {-# LANGUAGE RankNTypes #-}
8 {-# LANGUAGE TupleSections #-}
9+{-# LANGUAGE LambdaCase #-}
12 -----------------------------------------------------------------------------
13@@ -1755,13 +1756,27 @@ installExe verbosity lbi binDir buildPref
14 let exeName' = unUnqualComponentName $ exeName exe
15 exeFileName = exeTargetName (hostPlatform lbi) exe
16 fixedExeBaseName = progprefix ++ exeName' ++ progsuffix
17- installBinary dest = do
18+ exePath = buildPref </> exeName' </> exeFileName
19+ installBinary dest = doesFileExist exePath >>= \case
21 installExecutableFile verbosity
22 (buildPref </> exeName' </> exeFileName)
23 (dest <.> exeExtension (hostPlatform lbi))
24 when (stripExes lbi) $
25 Strip.stripExe verbosity (hostPlatform lbi) (withPrograms lbi)
26 (dest <.> exeExtension (hostPlatform lbi))
29+ -- The executable exists but is not a simple file.
30+ -- Deligate installation to the compiler
31+ runDbProgram verbosity ghcProgram (withPrograms lbi) $
32+ [ "--install-executable"
33+ , buildPref </> exeName' </> exeFileName
36+ case (stripExes lbi, lookupProgram stripProgram $ withPrograms lbi) of
37+ (True, Just strip) -> ["-strip-program", programPath strip]
39 installBinary (binDir </> fixedExeBaseName)
41 -- |Install foreign library for GHC.
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list