summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-04-26 18:42:17 -0400
committerBen Gamari <ben@smart-cactus.org>2020-05-27 23:14:28 -0400
commit286cf192474b067d4017cbd05219dfd6e6ec7589 (patch)
treee173bdbae1bfafd40419d0feabc0ae386e8067b1
parent6507c2bf7b68c5614a35a6e1e03612160989fb98 (diff)
downloadhaskell-286cf192474b067d4017cbd05219dfd6e6ec7589.tar.gz
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. (cherry picked from commit 24af9f30681444380c25465f555599da563713cb)
-rw-r--r--rts/linker/PEi386.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/rts/linker/PEi386.c b/rts/linker/PEi386.c
index 04ae20a032..0e41f34ce2 100644
--- a/rts/linker/PEi386.c
+++ b/rts/linker/PEi386.c
@@ -769,12 +769,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());
+ IF_DEBUG(linker, 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());
+ IF_DEBUG(linker, debugBelch("addLibrarySearchPath[GetFullPathNameW]: %" PATH_FMT " (Win32 error %lu)", dll_path, GetLastError()));
}
}