[Git][ghc/ghc][wip/andreask/linker_fix] Fix broken #if
Andreas Klebinger pushed to branch wip/andreask/linker_fix at Glasgow Haskell Compiler / GHC Commits: 28cc4dcc by Andreas Klebinger at 2026-07-31T10:16:13+02:00 Fix broken #if - - - - - 2 changed files: - rts/Linker.c - rts/linker/LoadArchive.c Changes: ===================================== rts/Linker.c ===================================== @@ -1394,7 +1394,7 @@ preloadObjectFile (pathchar *path) * the sections. And hence we need to leave r+w+x here for other hosts * until all hosts have been made aware of the initial image being r+w only. * - * See also the misalignment logic for darwin below. + * See also the alignment logic for darwin sections. */ #if defined(darwin_HOST_OS) || defined(openbsd_HOST_OS) image = mmapForLinker(fileSize, MEM_READ_WRITE, MAP_PRIVATE, fd, 0); ===================================== rts/linker/LoadArchive.c ===================================== @@ -596,11 +596,11 @@ HsInt loadArchive_ (pathchar *path) ASSERT(!isGnuIndex); DEBUG_LOG("Member might be an object file...loading...\n"); #if defined(darwin_HOST_OS) || defined(ios_HOST_OS) -#if defined(RTS_LINKER_USE_MMAP) +#if RTS_LINKER_USE_MMAP image = mmapAnonForLinker(memberSize); #else #error "Only MMAP based loading supported on Apple platforms" -#endif // defined(RTS_LINKER_USE_MMAP) +#endif // RTS_LINKER_USE_MMAP #else // not darwin image = stgMallocBytes(memberSize, "loadArchive(image)"); View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/28cc4dcc9796421b6a06a03bef47484a... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/28cc4dcc9796421b6a06a03bef47484a... 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)
-
Andreas Klebinger (@AndreasK)