[commit: ghc] wip/nfs-locking: Drop support for -this-package-key (95a23a6)

git at git.haskell.org git at git.haskell.org
Fri Oct 27 01:27:03 UTC 2017


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

On branch  : wip/nfs-locking
Link       : http://ghc.haskell.org/trac/ghc/changeset/95a23a6667824592499775d746a71ee2b8de07fe/ghc

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

commit 95a23a6667824592499775d746a71ee2b8de07fe
Author: Andrey Mokhov <andrey.mokhov at gmail.com>
Date:   Sun Sep 10 23:45:34 2017 +0100

    Drop support for -this-package-key


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

95a23a6667824592499775d746a71ee2b8de07fe
 src/Oracles/Flag.hs          | 4 +---
 src/Settings/Builders/Ghc.hs | 9 ++-------
 2 files changed, 3 insertions(+), 10 deletions(-)

diff --git a/src/Oracles/Flag.hs b/src/Oracles/Flag.hs
index 20aca1f..510b9d2 100644
--- a/src/Oracles/Flag.hs
+++ b/src/Oracles/Flag.hs
@@ -17,7 +17,6 @@ data Flag = ArSupportsAtFile
           | LeadingUnderscore
           | SolarisBrokenShld
           | SplitObjectsBroken
-          | SupportsThisUnitId
           | WithLibdw
           | UseSystemFfi
 
@@ -35,12 +34,11 @@ flag f = do
             LeadingUnderscore  -> "leading-underscore"
             SolarisBrokenShld  -> "solaris-broken-shld"
             SplitObjectsBroken -> "split-objects-broken"
-            SupportsThisUnitId -> "supports-this-unit-id"
             WithLibdw          -> "with-libdw"
             UseSystemFfi       -> "use-system-ffi"
     value <- lookupValueOrError configFile key
     when (value `notElem` ["YES", "NO", ""]) . error $ "Configuration flag "
-        ++ quote (key ++ " = " ++ value) ++ "cannot be parsed."
+        ++ quote (key ++ " = " ++ value) ++ " cannot be parsed."
     return $ value == "YES"
 
 platformSupportsSharedLibs :: Action Bool
diff --git a/src/Settings/Builders/Ghc.hs b/src/Settings/Builders/Ghc.hs
index a186e08..7f942f6 100644
--- a/src/Settings/Builders/Ghc.hs
+++ b/src/Settings/Builders/Ghc.hs
@@ -115,18 +115,13 @@ wayGhcArgs = do
             , (way == debug || way == debugDynamic) ?
               pure ["-ticky", "-DTICKY_TICKY"] ]
 
--- FIXME: Get rid of to-be-deprecated -this-package-key.
 packageGhcArgs :: Args
 packageGhcArgs = withHsPackage $ \cabalFile -> do
-    pkgId   <- expr $ pkgIdentifier cabalFile
-    thisArg <- do
-        not0 <- notStage0
-        unit <- expr $ flag SupportsThisUnitId
-        return $ if not0 || unit then "-this-unit-id " else "-this-package-key "
+    pkgId <- expr $ pkgIdentifier cabalFile
     mconcat [ arg "-hide-all-packages"
             , arg "-no-user-package-db"
             , bootPackageDatabaseArgs
-            , libraryPackage ? arg (thisArg ++ pkgId)
+            , libraryPackage ? arg ("-this-unit-id " ++ pkgId)
             , map ("-package-id " ++) <$> getPkgDataList DepIds ]
 
 includeGhcArgs :: Args



More information about the ghc-commits mailing list