[Git][ghc/ghc][master] 2 commits: hadrian: Pass lib & include directories to ghc `Setup configure`

Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: 41a448e5 by Ben Gamari at 2025-09-04T19:21:43-04:00 hadrian: Pass lib & include directories to ghc `Setup configure` - - - - - 46bb9a79 by Ben Gamari at 2025-09-04T19:21:44-04:00 rts/IPE: Fix compilation when zstd is enabled This was broken by the refactoring undertaken in c80dd91c0bf6ac034f0c592f16c548b9408a8481. Closes #26312. - - - - - 2 changed files: - hadrian/src/Settings/Packages.hs - rts/IPE.c Changes: ===================================== hadrian/src/Settings/Packages.hs ===================================== @@ -36,6 +36,8 @@ packageArgs = do cursesLibraryDir <- getSetting CursesLibDir ffiIncludeDir <- getSetting FfiIncludeDir ffiLibraryDir <- getSetting FfiLibDir + libzstdIncludeDir <- getSetting LibZstdIncludeDir + libzstdLibraryDir <- getSetting LibZstdLibDir stageVersion <- readVersion <$> (expr $ ghcVersionStage stage) mconcat @@ -74,7 +76,9 @@ packageArgs = do , builder (Cabal Setup) ? mconcat [ arg "--disable-library-for-ghci" , anyTargetOs [OSOpenBSD] ? arg "--ld-options=-E" - , compilerStageOption ghcProfiled ? arg "--ghc-pkg-option=--force" ] + , compilerStageOption ghcProfiled ? arg "--ghc-pkg-option=--force" + , cabalExtraDirs libzstdIncludeDir libzstdLibraryDir + ] , builder (Cabal Flags) ? mconcat -- For the ghc library, internal-interpreter only makes ===================================== rts/IPE.c ===================================== @@ -313,38 +313,41 @@ void decompressIPEBufferListNodeIfCompressed(IpeBufferListNode *node) { barf("An IPE buffer list node has been compressed, but the " "decompression library (zstd) is not available."); #else + // Decompress string table size_t compressed_sz = ZSTD_findFrameCompressedSize( - node->string_table, + node->string_table_block->string_table, node->string_table_size ); - char *decompressed_strings = stgMallocBytes( - node->string_table_size, + IpeStringTableBlock *decompressed_strings = stgMallocBytes( + sizeof(IpeStringTableBlock) + node->string_table_size, "updateIpeMap: decompressed_strings" ); + decompressed_strings->magic = IPE_MAGIC_WORD; ZSTD_decompress( - decompressed_strings, + decompressed_strings->string_table, node->string_table_size, - node->string_table, + node->string_table_block->string_table, compressed_sz ); - node->string_table = (const char *) decompressed_strings; + node->string_table_block = decompressed_strings; // Decompress the IPE data compressed_sz = ZSTD_findFrameCompressedSize( - node->entries, + node->entries_block->entries, node->entries_size ); - void *decompressed_entries = stgMallocBytes( - node->entries_size, + IpeBufferEntryBlock *decompressed_entries = stgMallocBytes( + sizeof(IpeBufferEntryBlock) + node->entries_size, "updateIpeMap: decompressed_entries" ); + decompressed_entries->magic = IPE_MAGIC_WORD; ZSTD_decompress( - decompressed_entries, + decompressed_entries->entries, node->entries_size, - node->entries, + node->entries_block->entries, compressed_sz ); - node->entries = decompressed_entries; + node->entries_block = decompressed_entries; #endif // HAVE_LIBZSTD == 0 } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bdf82fd2bc70f21d9c8a9d535afab4e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/bdf82fd2bc70f21d9c8a9d535afab4e... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)