[Git][ghc/ghc][ghc-9.12] 3 commits: Revert "configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails"
Zubin pushed to branch ghc-9.12 at Glasgow Haskell Compiler / GHC Commits: bd923b84 by Ben Gamari at 2025-12-09T12:32:43+05:30 Revert "configure: do not set LLC/OPT/LLVMAS fallback values when FIND_LLVM_PROG fails" While dropping these fallbacks is likely the right thing in the long run, doing so now makes it needlessly difficult for users to use the LLVM backend. See #26209. This will change once `ghc-toolchain` becomes the default path. This reverts commit 4eb5ad09cf93caa5791a735baa0e7ba86b916f2a. (cherry picked from commit 9922faa74dcf7975def67ab82d27da05da7d29f2) - - - - - 85edfeb1 by Zubin Duggal at 2025-12-09T12:35:05+05:30 rts/linker/PEi386: Copy strings before they are inserted into LoadedDllCache. The original strings are temporary and might be freed at an arbitrary point. Fixes #26613 (cherry picked from commit 5072da477b8ec883aea4b9ea27763fcc1971af1a) - - - - - 65621219 by Zubin Duggal at 2025-12-09T22:32:33+05:30 haddock: Bump version to 2.32.0 - - - - - 4 changed files: - m4/fp_settings.m4 - rts/linker/PEi386.c - utils/haddock/haddock-api/haddock-api.cabal - utils/haddock/haddock.cabal Changes: ===================================== m4/fp_settings.m4 ===================================== @@ -85,6 +85,19 @@ AC_DEFUN([FP_SETTINGS], SettingsWindresCommand="$WindresCmd" fi + # Fallback values for LLVM tools. See #26209. + if test -z "$LlcCmd"; then + LlcCmd="llc" + fi + + if test -z "$OptCmd"; then + OptCmd="opt" + fi + + if test -z "$LlvmAsCmd"; then + LlvmAsCmd="clang" + fi + # LLVM backend tools SettingsLlcCommand="$LlcCmd" SettingsOptCommand="$OptCmd" ===================================== rts/linker/PEi386.c ===================================== @@ -460,7 +460,12 @@ static int compare_path(StgWord key1, StgWord key2) static void addLoadedDll(LoadedDllCache *cache, const pathchar *dll_name, HINSTANCE instance) { - insertHashTable_(cache->hash, (StgWord) dll_name, instance, hash_path); + // dll_name might be deallocated, we need to copy it to have a stable reference to the contents + // See #26613 + size_t size = wcslen(dll_name) + 1; + pathchar* dll_name_copy = stgMallocBytes(size * sizeof(pathchar), "addLoadedDll"); + wcsncpy(dll_name_copy, dll_name, size); + insertHashTable_(cache->hash, (StgWord) dll_name_copy, instance, hash_path); } static HINSTANCE isDllLoaded(const LoadedDllCache *cache, const pathchar *dll_name) ===================================== utils/haddock/haddock-api/haddock-api.cabal ===================================== @@ -1,6 +1,6 @@ cabal-version: 3.0 name: haddock-api -version: 2.30.0 +version: 2.32.0 synopsis: A documentation-generation tool for Haskell libraries description: Haddock is a documentation-generation tool for Haskell libraries ===================================== utils/haddock/haddock.cabal ===================================== @@ -1,6 +1,6 @@ cabal-version: 3.0 name: haddock -version: 2.30.0 +version: 2.32.0 synopsis: A documentation-generation tool for Haskell libraries description: This is Haddock, a tool for automatically generating documentation @@ -94,7 +94,7 @@ executable haddock base >= 4.13.0.0 && <4.22, -- in order for haddock's advertised version number to have proper meaning, -- we pin down to a single haddock-api version. - haddock-api == 2.30.0 + haddock-api == 2.32.0 test-suite html-test import: extensions View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3cd27895944c5f76ce606008476114e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/3cd27895944c5f76ce606008476114e... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Zubin (@wz1000)