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-04-27 16:31:23 -0400
commit24af9f30681444380c25465f555599da563713cb (patch)
tree3889650cc7665e0bdb5c21408c80af8b75a5f7a4
parent0ac29c885fba7ed69de83a597cdbd03696c9ed13 (diff)
downloadhaskell-wip/T18105.tar.gz
rts: Make non-existent linker search path merely a warningwip/T18105
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.
-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 d57b2cbb12..9392db93e1 100644
--- a/rts/linker/PEi386.c
+++ b/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());
+ 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()));
}
}