Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
-
242d4317
by sheaf at 2026-07-04T04:16:19-04:00
1 changed file:
Changes:
| 1 | 1 | {-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples, GeneralizedNewtypeDeriving, DerivingStrategies #-}
|
| 2 | 2 | {-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
|
| 3 | --- gross hack: we maneuvered ourselves into a position where we can't boot GHC with a LLVM based GHC anymore.
|
|
| 4 | --- LLVM based GHC's fail to compile memcmp ffi calls. These end up as memcmp$def in the llvm ir, however we
|
|
| 5 | --- don't have any prototypes and subsequently the llvm toolchain chokes on them. Since 7fdcce6d, we use
|
|
| 6 | --- ShortText for the package database. This however introduces this very module; which through inlining ends
|
|
| 7 | --- up bringing memcmp_ByteArray from bytestring:Data.ByteString.Short.Internal into scope, which results in
|
|
| 8 | --- the memcmp call we choke on.
|
|
| 9 | ---
|
|
| 10 | --- The solution thusly is to force late binding via the linker instead of inlining when comping with the
|
|
| 11 | --- bootstrap compiler. This will produce a slower (slightly less optimised) stage1 compiler only.
|
|
| 12 | ---
|
|
| 13 | --- See issue 18857. hsyl20 deserves credit for coming up with the idea for the solution.
|
|
| 14 | --- |
|
|
| 15 | --- An Unicode string for internal GHC use. Meant to replace String
|
|
| 3 | + |
|
| 4 | +-- | An Unicode string for internal GHC use. Meant to replace String
|
|
| 16 | 5 | -- in places where being a lazy linked is not very useful and a more
|
| 17 | 6 | -- memory efficient data structure is desirable.
|
| 18 | 7 |