[Git][ghc/ghc][wip/fix-clang-23] 2 commits: autoconf/ghc-toolchain: bump llvm upper bound to support llvm 23
Cheng Shao pushed to branch wip/fix-clang-23 at Glasgow Haskell Compiler / GHC Commits: 3194dd19 by Cheng Shao at 2026-08-31T20:04:12+00:00 autoconf/ghc-toolchain: bump llvm upper bound to support llvm 23 This commit bumps llvm upper bound to support llvm 23. - - - - - 97665d9c by Cheng Shao at 2026-08-31T20:04:16+00:00 rts: fix compilation issues with clang 23 clang 23 has broadened `-Wall`/`-Wextra` ranges, exposing some minor issues in the rts when building with validate flavours: - Unused locals - `#pragma GCC diagnostic pop` mismatch This commit fixes those. - - - - - 6 changed files: - + changelog.d/llvm-23 - configure.ac - rts/ProfHeap.c - rts/eventlog/EventLog.c - rts/prim/atomic.c - utils/ghc-toolchain/src/GHC/Toolchain/Program.hs Changes: ===================================== changelog.d/llvm-23 ===================================== @@ -0,0 +1,4 @@ +section: llvm-backend +synopsis: Bump LlvmMaxVersion to support LLVM 23.x releases. +issues: #27764 +mrs: !16617 ===================================== configure.ac ===================================== @@ -557,7 +557,7 @@ AC_SUBST(InstallNameToolCmd) # versions of LLVM simultaneously, but that stopped working around # 3.5/3.6 release of LLVM. LlvmMinVersion=13 # inclusive -LlvmMaxVersion=23 # not inclusive +LlvmMaxVersion=24 # not inclusive AC_SUBST([LlvmMinVersion]) AC_SUBST([LlvmMaxVersion]) ===================================== rts/ProfHeap.c ===================================== @@ -141,7 +141,10 @@ restore_locale( void ) * store only up to (max_era - 1) as its creation or last use time. * -------------------------------------------------------------------------- */ unsigned int era; + +#if defined(PROFILING) static uint32_t max_era; +#endif StgWord user_era; @@ -518,8 +521,10 @@ initHeapProfiling(void) n_censuses = 1; } +#if defined(PROFILING) // max_era = 2^LDV_SHIFT max_era = 1 << LDV_SHIFT; +#endif censuses = stgMallocBytes(sizeof(Census) * n_censuses, "initHeapProfiling"); ===================================== rts/eventlog/EventLog.c ===================================== @@ -113,8 +113,6 @@ static eventlog_init_func_t *eventlog_header_funcs = NULL; // See Note [Maximum event length] #define EVENT_LOG_SIZE 2 * (1024 * 1024) // 2MB -static int flushCount = 0; - // Struct for record keeping of buffer to store event types and events. // // Invariant: The event buffer will always begin with a block-start marker. @@ -1514,7 +1512,6 @@ void printAndClearEventBuf (EventsBuf *ebuf) } resetEventsBuf(ebuf); - flushCount++; postBlockMarker(ebuf); } ===================================== rts/prim/atomic.c ===================================== @@ -96,8 +96,6 @@ StgWord64 hs_atomic_nand64(StgWord x, StgWord64 val) return __atomic_fetch_nand((volatile StgWord64 *) x, val, __ATOMIC_SEQ_CST); } -#pragma GCC diagnostic pop - // FetchOrByteArrayOp_Int StgWord hs_atomic_or8(StgWord x, StgWord val) ===================================== utils/ghc-toolchain/src/GHC/Toolchain/Program.hs ===================================== @@ -167,7 +167,7 @@ minLlvmVersion = 13 -- Max llvm version (exclusive) maxLlvmVersionExcl :: Int -maxLlvmVersionExcl = 23 +maxLlvmVersionExcl = 24 -- Max llvm version (inclusive) maxLlvmVersion :: Int View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f2dddebcbe7aeb6ed8dcfdbea88922c... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/f2dddebcbe7aeb6ed8dcfdbea88922c... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Cheng Shao (@TerrorJack)