mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
Actually return an error if something bad happens, don't just exit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9119 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8deb5814a1
commit
1798e4ade8
@ -306,8 +306,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
|
||||
return ProgramResult;
|
||||
}
|
||||
|
||||
int GCC::MakeSharedObject(const std::string &InputFile,
|
||||
FileType fileType,
|
||||
int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
|
||||
std::string &OutputFile) {
|
||||
OutputFile = getUniqueFilename(InputFile+".so");
|
||||
// Compile the C/asm file into a shared object
|
||||
@ -327,10 +326,10 @@ int GCC::MakeSharedObject(const std::string &InputFile,
|
||||
};
|
||||
|
||||
std::cout << "<gcc>" << std::flush;
|
||||
if(RunProgramWithTimeout(GCCPath, GCCArgs, "/dev/null", "/dev/null",
|
||||
"/dev/null")) {
|
||||
if (RunProgramWithTimeout(GCCPath, GCCArgs, "/dev/null", "/dev/null",
|
||||
"/dev/null")) {
|
||||
ProcessFailure(GCCArgs);
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -306,8 +306,7 @@ int GCC::ExecuteProgram(const std::string &ProgramFile,
|
||||
return ProgramResult;
|
||||
}
|
||||
|
||||
int GCC::MakeSharedObject(const std::string &InputFile,
|
||||
FileType fileType,
|
||||
int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType,
|
||||
std::string &OutputFile) {
|
||||
OutputFile = getUniqueFilename(InputFile+".so");
|
||||
// Compile the C/asm file into a shared object
|
||||
@ -327,10 +326,10 @@ int GCC::MakeSharedObject(const std::string &InputFile,
|
||||
};
|
||||
|
||||
std::cout << "<gcc>" << std::flush;
|
||||
if(RunProgramWithTimeout(GCCPath, GCCArgs, "/dev/null", "/dev/null",
|
||||
"/dev/null")) {
|
||||
if (RunProgramWithTimeout(GCCPath, GCCArgs, "/dev/null", "/dev/null",
|
||||
"/dev/null")) {
|
||||
ProcessFailure(GCCArgs);
|
||||
exit(1);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user