Mercurial > projects > ldc
comparison gen/toobj.cpp @ 814:05f2651caa6c
Added error when invoking gcc fails
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 01 Dec 2008 15:18:22 +0100 |
parents | 8e6135be6999 |
children | 35de5ba7d36d |
comparison
equal
deleted
inserted
replaced
813:2eaefe4a550b | 814:05f2651caa6c |
---|---|
464 | 464 |
465 // Run the compiler to assembly the program. | 465 // Run the compiler to assembly the program. |
466 std::string ErrMsg; | 466 std::string ErrMsg; |
467 int R = sys::Program::ExecuteAndWait( | 467 int R = sys::Program::ExecuteAndWait( |
468 gcc, &Args[0], (const char**)clean_env, 0, 0, 0, &ErrMsg); | 468 gcc, &Args[0], (const char**)clean_env, 0, 0, 0, &ErrMsg); |
469 if (R) | |
470 { | |
471 error("failed to invoke gcc"); | |
472 fatal(); | |
473 } | |
469 delete [] clean_env; | 474 delete [] clean_env; |
470 } | 475 } |
471 | 476 |
472 | 477 |
473 /* ================================================================== */ | 478 /* ================================================================== */ |