From 42eca04683bdb3d7b132bfe6cd52214d66013081 Mon Sep 17 00:00:00 2001 From: Robert Clipsham Date: Mon, 28 Dec 2009 02:23:41 +0000 Subject: [PATCH] Folded in a patch by Troy Straszheim to better report errors with -run. --- gen/linker.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gen/linker.cpp b/gen/linker.cpp index 3bbdd9bf..ae0a03c2 100644 --- a/gen/linker.cpp +++ b/gen/linker.cpp @@ -387,6 +387,12 @@ int runExecutable() // 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");