hadrian icon indicating copy to clipboard operation
hadrian copied to clipboard

Do we need stripCmdPath?

Open snowleopard opened this issue 8 years ago • 3 comments

@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`.

snowleopard avatar Apr 03 '18 00:04 snowleopard

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

izgzhen avatar Apr 03 '18 02:04 izgzhen

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

izgzhen avatar Apr 03 '18 02:04 izgzhen

@izgzhen Thanks, agreed!

snowleopard avatar Apr 03 '18 08:04 snowleopard