diff options
author | Adam Sandberg Ericsson <adam@sandbergericsson.se> | 2021-05-16 10:41:32 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-05-19 23:40:47 -0400 |
commit | 441fdd6ce8af823e99fd260ed0f96b99e457bce5 (patch) | |
tree | 1faf6976c9178e9e65b84d53f52f15ccadd3a8dc /compiler/GHC/Driver/Session.hs | |
parent | d48b7e5c2fae5db1973a767be45aba82b2aa727c (diff) | |
download | haskell-441fdd6ce8af823e99fd260ed0f96b99e457bce5.tar.gz |
driver: check if clang is the assembler when passing clang specific arguments (#19827)
Previously we assumed that the assembler was the same as the c compiler,
but we allow setting them to different programs with -pgmc and -pgma.
Diffstat (limited to 'compiler/GHC/Driver/Session.hs')
-rw-r--r-- | compiler/GHC/Driver/Session.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/compiler/GHC/Driver/Session.hs b/compiler/GHC/Driver/Session.hs index 6a2f4c6b73..12782af0a8 100644 --- a/compiler/GHC/Driver/Session.hs +++ b/compiler/GHC/Driver/Session.hs @@ -654,9 +654,12 @@ data DynFlags = DynFlags { -- | Run-time linker information (what options we need, etc.) rtldInfo :: IORef (Maybe LinkerInfo), - -- | Run-time compiler information + -- | Run-time C compiler information rtccInfo :: IORef (Maybe CompilerInfo), + -- | Run-time assembler information + rtasmInfo :: IORef (Maybe CompilerInfo), + -- Constants used to control the amount of optimization done. -- | Max size, in bytes, of inline array allocations. @@ -1047,6 +1050,7 @@ initDynFlags dflags = do refDynamicTooFailed <- newIORef (not platformCanGenerateDynamicToo) refRtldInfo <- newIORef Nothing refRtccInfo <- newIORef Nothing + refRtasmInfo <- newIORef Nothing canUseUnicode <- do let enc = localeEncoding str = "‘’" (withCString enc str $ \cstr -> @@ -1069,7 +1073,8 @@ initDynFlags dflags = do canUseColor = stderrSupportsAnsiColors, colScheme = colScheme', rtldInfo = refRtldInfo, - rtccInfo = refRtccInfo + rtccInfo = refRtccInfo, + rtasmInfo = refRtasmInfo } -- | The normal 'DynFlags'. Note that they are not suitable for use in this form @@ -1237,6 +1242,7 @@ defaultDynFlags mySettings llvmConfig = avx512pf = False, rtldInfo = panic "defaultDynFlags: no rtldInfo", rtccInfo = panic "defaultDynFlags: no rtccInfo", + rtasmInfo = panic "defaultDynFlags: no rtasmInfo", maxInlineAllocSize = 128, maxInlineMemcpyInsns = 32, |