changeset 1600:a60e7d1ce3ee

Folded in a patch by Troy Straszheim to better report errors with -run.
author Robert Clipsham <robert@octarineparrot.com>
date Mon, 28 Dec 2009 02:23:41 +0000
parents 20799faa301d
children 49722e6e6e05
files gen/linker.cpp
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gen/linker.cpp	Sun Dec 20 13:58:08 2009 +0000
+++ b/gen/linker.cpp	Mon Dec 28 02:23:41 2009 +0000
@@ -387,6 +387,12 @@
     // try to call linker!!!
     std::string errstr;
     int status = llvm::sys::Program::ExecuteAndWait(gExePath, &args[0], NULL, NULL, 0,0, &errstr);
+    if (status < 0)
+    {
+        error("program received signal %d (%s)", -status, strsignal(-status));
+        return -status;
+    }
+
     if (!errstr.empty())
     {
         error("failed to execute program");