diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-06-29 17:32:08 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-07-22 20:19:59 -0400 |
commit | e079bb721e25dbc19e1adf8c8051b6ea03752962 (patch) | |
tree | 2360d5ef57157e74aa51d7a8f5e14c27a686615e /compiler/GHC/StgToCmm.hs | |
parent | 8ea33edb2beb64cde7d51777787e232d4cd4fef1 (diff) | |
download | haskell-e079bb721e25dbc19e1adf8c8051b6ea03752962.tar.gz |
Correctly test active backend
Previously we used a platform settings to detect if the native code
generator was used. This was wrong. We need to use the
`DynFlags.hscTarget` field instead.
Diffstat (limited to 'compiler/GHC/StgToCmm.hs')
-rw-r--r-- | compiler/GHC/StgToCmm.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/GHC/StgToCmm.hs b/compiler/GHC/StgToCmm.hs index 1ec7abe5a0..04ce004df4 100644 --- a/compiler/GHC/StgToCmm.hs +++ b/compiler/GHC/StgToCmm.hs @@ -165,7 +165,7 @@ cgTopBinding dflags (StgTopStringLit id str) = do -- emit either a CmmString literal or dump the string in a file and emit a -- CmmFileEmbed literal. -- See Note [Embedding large binary blobs] in GHC.CmmToAsm.Ppr - let isNCG = platformMisc_ghcWithNativeCodeGen $ platformMisc dflags + let isNCG = hscTarget dflags == HscAsm isSmall = fromIntegral (BS.length str) <= binBlobThreshold dflags asString = binBlobThreshold dflags == 0 || isSmall |