Skip to content

Commit 969b58e

Browse files
committed
Reverse change as a test
1 parent 8c0b0d5 commit 969b58e

File tree

1 file changed

+3
-12
lines changed
  • Cabal/src/Distribution/Simple/Program

1 file changed

+3
-12
lines changed

Cabal/src/Distribution/Simple/Program/Ld.hs

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ module Distribution.Simple.Program.Ld
1818
import Distribution.Compat.Prelude
1919
import Prelude ()
2020

21-
import qualified Data.Map as Map
22-
2321
import Distribution.Simple.Compiler (arResponseFilesSupported)
2422
import Distribution.Simple.Flag
2523
( fromFlagOrDefault
@@ -69,10 +67,10 @@ combineObjectFiles verbosity lbi ld target files = do
6967
-- have a slight problem. What we have to do is link files in batches into
7068
-- a temp object file and then include that one in the next batch.
7169

72-
let simpleArgs = prependRelocatableFlag ["-o", target]
70+
let simpleArgs = ["-r", "-o", target]
7371

74-
initialArgs = prependRelocatableFlag ["-o", target]
75-
middleArgs = prependRelocatableFlag ["-o", target, tmpfile]
72+
initialArgs = ["-r", "-o", target]
73+
middleArgs = ["-r", "-o", target, tmpfile]
7674
finalArgs = middleArgs
7775

7876
simple = programInvocation ld simpleArgs
@@ -106,10 +104,3 @@ combineObjectFiles verbosity lbi ld target files = do
106104
runProgramInvocation verbosity inv
107105
renameFile target tmpfile
108106
run invs
109-
110-
-- Prepend "-r" to the list if the linker supports relocatable outputs.
111-
prependRelocatableFlag :: [String] -> [String]
112-
prependRelocatableFlag xs =
113-
case Map.lookup "Supports relocatable output" $ programProperties ld of
114-
Just "YES" -> "-r" : xs
115-
_other -> xs

0 commit comments

Comments
 (0)