summaryrefslogtreecommitdiff
path: root/rts/Linker.c
diff options
context:
space:
mode:
Diffstat (limited to 'rts/Linker.c')
-rw-r--r--rts/Linker.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/rts/Linker.c b/rts/Linker.c
index a98f0bd2cb..88734bd597 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -1356,7 +1356,7 @@ preloadObjectFile (pathchar *path)
image = stgMallocBytes(fileSize, "loadObj(image)");
-#endif
+#endif /* !defined(darwin_HOST_OS) */
int n;
n = fread ( image, 1, fileSize, f );
@@ -1401,6 +1401,15 @@ static HsInt loadObj_ (pathchar *path)
return 1; // success
}
+ if (isArchive(path)) {
+ if (loadArchive_(path)) {
+ return 1; // success
+ } else {
+ IF_DEBUG(linker,
+ debugBelch("tried and failed to load %" PATH_FMT " as an archive\n", path));
+ }
+ }
+
ObjectCode *oc = preloadObjectFile(path);
if (oc == NULL) return 0;