snowleopard / hadrian

Hadrian: a new build system for the Glasgow Haskell Compiler. Now merged into the GHC tree!
https://gitlab.haskell.org/ghc/ghc/tree/master/hadrian
MIT License
208 stars 39 forks source link

Do we need stripCmdPath? #549

Open snowleopard opened 6 years ago

snowleopard commented 6 years ago

@izgzhen @angerman @alpmestan I've removed unused stripCmdPath:

-- ref: mk/config.mk
-- | Command line tool for stripping.
stripCmdPath :: Action FilePath
stripCmdPath = do
    targetPlatform <- setting TargetPlatform
    top <- topDirectory
    case targetPlatform of
        "x86_64-unknown-mingw32" ->
             return (top -/- "inplace/mingw/bin/strip.exe")
        "arm-unknown-linux" ->
             return ":" -- HACK: from the make-based system, see the ref above
        _ -> return "strip"

Is this the right thing to do? There is the following comment in Settings.Builders.GhcCabal:

-- don't strip libraries when cross compiling.
-- XXX we need to set --with-strip= (stripCmdPath :: Action FilePath), and if it's ':' disable
--     stripping as well. As it is now, I believe we might have issues with stripping on
--     windows, as I can't see a consumer of `stripCmdPath`.
izgzhen commented 6 years ago

stripCmdPath was previously used in install by GhcCabal (copy subcommand).

izgzhen commented 6 years ago

I suggest let's keep this issue open and delete the dead code for now

snowleopard commented 6 years ago

@izgzhen Thanks, agreed!