[Git][ghc/ghc][wip/T18105] rts: Make non-existent linker search path merely a warning

Ben Gamari gitlab at gitlab.haskell.org
Sun Apr 26 22:43:20 UTC 2020



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


Commits:
274ec83f by Ben Gamari at 2020-04-26T18:43:13-04:00
rts: Make non-existent linker search path merely a warning

As noted in #18105, previously this resulted in a rather intrusive error
message. This is in contrast to the general expectation that search
paths are merely places to look, not places that must exist.

Fixes #18105.

- - - - -


1 changed file:

- rts/linker/PEi386.c


Changes:

=====================================
rts/linker/PEi386.c
=====================================
@@ -776,12 +776,12 @@ HsPtr addLibrarySearchPath_PEi386(pathchar* dll_path)
     WCHAR* abs_path = malloc(sizeof(WCHAR) * init_buf_size);
     DWORD wResult = GetFullPathNameW(dll_path, bufsize, abs_path, NULL);
     if (!wResult){
-        sysErrorBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError());
+        debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError());
     }
     else if (wResult > init_buf_size) {
         abs_path = realloc(abs_path, sizeof(WCHAR) * wResult);
         if (!GetFullPathNameW(dll_path, bufsize, abs_path, NULL)) {
-            sysErrorBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError());
+            debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError());
         }
     }
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/274ec83f7464b84e318069cc26933c9bbd30abad

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/274ec83f7464b84e318069cc26933c9bbd30abad
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200426/5d0813eb/attachment.html>


More information about the ghc-commits mailing list