Ben Gamari pushed to branch wip/T26312 at Glasgow Haskell Compiler / GHC

Commits:

2 changed files:

Changes:

  • hadrian/src/Settings/Packages.hs
    ... ... @@ -36,6 +36,8 @@ packageArgs = do
    36 36
         cursesLibraryDir <- getSetting CursesLibDir
    
    37 37
         ffiIncludeDir  <- getSetting FfiIncludeDir
    
    38 38
         ffiLibraryDir  <- getSetting FfiLibDir
    
    39
    +    libzstdIncludeDir <- getSetting LibZstdIncludeDir
    
    40
    +    libzstdLibraryDir <- getSetting LibZstdLibDir
    
    39 41
         stageVersion <- readVersion <$> (expr $ ghcVersionStage stage)
    
    40 42
     
    
    41 43
         mconcat
    
    ... ... @@ -74,7 +76,9 @@ packageArgs = do
    74 76
               , builder (Cabal Setup) ? mconcat
    
    75 77
                 [ arg "--disable-library-for-ghci"
    
    76 78
                 , anyTargetOs [OSOpenBSD] ? arg "--ld-options=-E"
    
    77
    -            , compilerStageOption ghcProfiled ? arg "--ghc-pkg-option=--force" ]
    
    79
    +            , compilerStageOption ghcProfiled ? arg "--ghc-pkg-option=--force"
    
    80
    +            , cabalExtraDirs libzstdIncludeDir libzstdLibraryDir
    
    81
    +            ]
    
    78 82
     
    
    79 83
               , builder (Cabal Flags) ? mconcat
    
    80 84
                 -- For the ghc library, internal-interpreter only makes
    

  • rts/IPE.c
    ... ... @@ -314,7 +314,7 @@ void decompressIPEBufferListNodeIfCompressed(IpeBufferListNode *node) {
    314 314
                  "decompression library (zstd) is not available.");
    
    315 315
     #else
    
    316 316
             size_t compressed_sz = ZSTD_findFrameCompressedSize(
    
    317
    -            node->string_table,
    
    317
    +            node->string_table_block->string_table,
    
    318 318
                 node->string_table_size
    
    319 319
             );
    
    320 320
             char *decompressed_strings = stgMallocBytes(
    
    ... ... @@ -324,10 +324,10 @@ void decompressIPEBufferListNodeIfCompressed(IpeBufferListNode *node) {
    324 324
             ZSTD_decompress(
    
    325 325
                 decompressed_strings,
    
    326 326
                 node->string_table_size,
    
    327
    -            node->string_table,
    
    327
    +            node->string_table_block->string_table,
    
    328 328
                 compressed_sz
    
    329 329
             );
    
    330
    -        node->string_table = (const char *) decompressed_strings;
    
    330
    +        node->string_table_block->string_table = (const char *) decompressed_strings;
    
    331 331
     
    
    332 332
             // Decompress the IPE data
    
    333 333
             compressed_sz = ZSTD_findFrameCompressedSize(