Mercurial > projects > ldc
comparison gen/linker.cpp @ 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 | 7f728c52e63c |
children | 40bd4a0d4870 |
comparison
equal
deleted
inserted
replaced
1598:20799faa301d | 1600:a60e7d1ce3ee |
---|---|
385 args.push_back(NULL); | 385 args.push_back(NULL); |
386 | 386 |
387 // try to call linker!!! | 387 // try to call linker!!! |
388 std::string errstr; | 388 std::string errstr; |
389 int status = llvm::sys::Program::ExecuteAndWait(gExePath, &args[0], NULL, NULL, 0,0, &errstr); | 389 int status = llvm::sys::Program::ExecuteAndWait(gExePath, &args[0], NULL, NULL, 0,0, &errstr); |
390 if (status < 0) | |
391 { | |
392 error("program received signal %d (%s)", -status, strsignal(-status)); | |
393 return -status; | |
394 } | |
395 | |
390 if (!errstr.empty()) | 396 if (!errstr.empty()) |
391 { | 397 { |
392 error("failed to execute program"); | 398 error("failed to execute program"); |
393 if (!errstr.empty()) | 399 if (!errstr.empty()) |
394 error("error message: %s", errstr.c_str()); | 400 error("error message: %s", errstr.c_str()); |