diff options
| author | Cheng Shao <astrohavoc@gmail.com> | 2022-10-28 17:27:24 +0000 |
|---|---|---|
| committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-11 00:26:55 -0500 |
| commit | a8adc71e80734c6dc2e119596368f84e39fd1172 (patch) | |
| tree | a194112eb7a9bd0db51fda32a4a869a395e16362 /compiler/GHC/Cmm | |
| parent | c1fe4ab6ee00b21c1918f67b58ad78be5b044109 (diff) | |
| download | haskell-a8adc71e80734c6dc2e119596368f84e39fd1172.tar.gz | |
compiler: annotate CmmFileEmbed with blob length
This patch adds the blob length field to CmmFileEmbed. The wasm32 NCG
needs to know the precise size of each data segment.
Diffstat (limited to 'compiler/GHC/Cmm')
| -rw-r--r-- | compiler/GHC/Cmm/Utils.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/GHC/Cmm/Utils.hs b/compiler/GHC/Cmm/Utils.hs index 7524ba7c5e..bf8c96fd14 100644 --- a/compiler/GHC/Cmm/Utils.hs +++ b/compiler/GHC/Cmm/Utils.hs @@ -197,9 +197,9 @@ mkByteStringCLit lbl bytes -- | We make a top-level decl for the embedded binary file, and return a label pointing to it mkFileEmbedLit - :: CLabel -> FilePath -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt) -mkFileEmbedLit lbl path - = (CmmLabel lbl, CmmData (Section ReadOnlyData lbl) (CmmStaticsRaw lbl [CmmFileEmbed path])) + :: CLabel -> FilePath -> Int -> (CmmLit, GenCmmDecl (GenCmmStatics raw) info stmt) +mkFileEmbedLit lbl path len + = (CmmLabel lbl, CmmData (Section ReadOnlyData lbl) (CmmStaticsRaw lbl [CmmFileEmbed path len])) -- | Build a data-segment data block |
