Mercurial > projects > ldc
comparison gen/toobj.cpp @ 815:35de5ba7d36d
Added error when gcc cannot be found.
author | Tomas Lindquist Olsen <tomas.l.olsen@gmail.com> |
---|---|
date | Mon, 01 Dec 2008 15:21:33 +0100 |
parents | 05f2651caa6c |
children | b972fec8a5f5 |
comparison
equal
deleted
inserted
replaced
814:05f2651caa6c | 815:35de5ba7d36d |
---|---|
407 void assemble(const llvm::sys::Path& asmpath, const llvm::sys::Path& objpath, char** envp) | 407 void assemble(const llvm::sys::Path& asmpath, const llvm::sys::Path& objpath, char** envp) |
408 { | 408 { |
409 using namespace llvm; | 409 using namespace llvm; |
410 | 410 |
411 sys::Path gcc = llvm::sys::Program::FindProgramByName("gcc"); | 411 sys::Path gcc = llvm::sys::Program::FindProgramByName("gcc"); |
412 if (gcc.empty()) | |
413 { | |
414 error("failed to locate gcc"); | |
415 fatal(); | |
416 } | |
412 | 417 |
413 // Remove these environment variables from the environment of the | 418 // Remove these environment variables from the environment of the |
414 // programs that we will execute. It appears that GCC sets these | 419 // programs that we will execute. It appears that GCC sets these |
415 // environment variables so that the programs it uses can configure | 420 // environment variables so that the programs it uses can configure |
416 // themselves identically. | 421 // themselves identically. |