summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorJohn Ericson <git@JohnEricson.me>2019-07-12 12:04:08 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-10-04 21:45:48 -0400
commitdd8f76b2e3285f8d01d652c8fa8c28e37ea474de (patch)
treeac82ccd6feac34e0ee962b0559395f05ffb93821 /compiler
parentb538476be3706264620c072e6e436debf9e0d3e4 (diff)
downloadhaskell-dd8f76b2e3285f8d01d652c8fa8c28e37ea474de.tar.gz
Factor out a smaller part of Platform for host fallback
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/DynFlags.hs2
-rw-r--r--compiler/nativeGen/PIC.hs8
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 18eb1a93b9..9e9e70ad28 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -1512,7 +1512,7 @@ versionedAppDir dflags = do
return $ appdir </> versionedFilePath dflags
versionedFilePath :: DynFlags -> FilePath
-versionedFilePath dflags = uniqueSubdir $ targetPlatform dflags
+versionedFilePath dflags = uniqueSubdir $ platformMini $ targetPlatform dflags
-- | The target code type of the compilation (if any).
--
diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
index 9c57a0292f..7ea68e1105 100644
--- a/compiler/nativeGen/PIC.hs
+++ b/compiler/nativeGen/PIC.hs
@@ -565,7 +565,7 @@ pprGotDeclaration _ _ _
--
pprImportedSymbol :: DynFlags -> Platform -> CLabel -> SDoc
-pprImportedSymbol dflags (Platform { platformArch = ArchX86, platformOS = OSDarwin }) importedLbl
+pprImportedSymbol dflags (Platform { platformMini = PlatformMini { platformMini_arch = ArchX86, platformMini_os = OSDarwin } }) importedLbl
| Just (CodeStub, lbl) <- dynamicLinkerLabelInfo importedLbl
= case positionIndependent dflags of
False ->
@@ -618,7 +618,7 @@ pprImportedSymbol dflags (Platform { platformArch = ArchX86, platformOS = OSDarw
= empty
-pprImportedSymbol _ (Platform { platformOS = OSDarwin }) _
+pprImportedSymbol _ (Platform { platformMini = PlatformMini { platformMini_os = OSDarwin } }) _
= empty
-- XCOFF / AIX
@@ -632,7 +632,7 @@ pprImportedSymbol _ (Platform { platformOS = OSDarwin }) _
--
-- NB: No DSO-support yet
-pprImportedSymbol dflags (Platform { platformOS = OSAIX }) importedLbl
+pprImportedSymbol dflags (Platform { platformMini = PlatformMini { platformMini_os = OSAIX } }) importedLbl
= case dynamicLinkerLabelInfo importedLbl of
Just (SymbolPtr, lbl)
-> vcat [
@@ -669,7 +669,7 @@ pprImportedSymbol dflags (Platform { platformOS = OSAIX }) importedLbl
-- the NCG will keep track of all DynamicLinkerLabels it uses
-- and output each of them using pprImportedSymbol.
-pprImportedSymbol dflags platform@(Platform { platformArch = ArchPPC_64 _ })
+pprImportedSymbol dflags platform@(Platform { platformMini = PlatformMini { platformMini_arch = ArchPPC_64 _ } })
importedLbl
| osElfTarget (platformOS platform)
= case dynamicLinkerLabelInfo importedLbl of