diff options
| author | Kalle Raiskila <kalle.raiskila@nokia.com> | 2010-05-10 07:38:37 +0000 |
|---|---|---|
| committer | Kalle Raiskila <kalle.raiskila@nokia.com> | 2010-05-10 07:38:37 +0000 |
| commit | 6be582992529addb3b74d565ab81a32a9b183915 (patch) | |
| tree | b5a500f2a8502a8bae5a51265fa97bb056fe2246 /llvm/tools/bugpoint/ToolRunner.cpp | |
| parent | e4d6670f6bed2d933664eff37e4dc73c0fa7c933 (diff) | |
| download | bcm5719-llvm-6be582992529addb3b74d565ab81a32a9b183915.tar.gz bcm5719-llvm-6be582992529addb3b74d565ab81a32a9b183915.zip | |
Add command line option --gcc to bugpoint.
Remove sending duplicate of the --gcc-tool-args parameters to gcc.
llvm-svn: 103397
Diffstat (limited to 'llvm/tools/bugpoint/ToolRunner.cpp')
| -rw-r--r-- | llvm/tools/bugpoint/ToolRunner.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/llvm/tools/bugpoint/ToolRunner.cpp b/llvm/tools/bugpoint/ToolRunner.cpp index 7ade7784023..1ff44c72ecf 100644 --- a/llvm/tools/bugpoint/ToolRunner.cpp +++ b/llvm/tools/bugpoint/ToolRunner.cpp @@ -413,7 +413,6 @@ int LLC::ExecuteProgram(const std::string &Bitcode, std::vector<std::string> GCCArgs(ArgsForGCC); GCCArgs.insert(GCCArgs.end(), SharedLibs.begin(), SharedLibs.end()); - GCCArgs.insert(GCCArgs.end(), gccArgs.begin(), gccArgs.end()); // Assuming LLC worked, compile the result with GCC and run it. return gcc->ExecuteProgram(OutputAsmFile.str(), Args, FileKind, @@ -425,6 +424,7 @@ int LLC::ExecuteProgram(const std::string &Bitcode, /// LLC *AbstractInterpreter::createLLC(const char *Argv0, std::string &Message, + const std::string &GCCBinary, const std::vector<std::string> *Args, const std::vector<std::string> *GCCArgs, bool UseIntegratedAssembler) { @@ -436,12 +436,12 @@ LLC *AbstractInterpreter::createLLC(const char *Argv0, } Message = "Found llc: " + LLCPath + "\n"; - GCC *gcc = GCC::create(Message, GCCArgs); + GCC *gcc = GCC::create(Message, GCCBinary, GCCArgs); if (!gcc) { errs() << Message << "\n"; exit(1); } - return new LLC(LLCPath, gcc, Args, GCCArgs, UseIntegratedAssembler); + return new LLC(LLCPath, gcc, Args, UseIntegratedAssembler); } //===---------------------------------------------------------------------===// @@ -593,6 +593,7 @@ int CBE::ExecuteProgram(const std::string &Bitcode, /// CBE *AbstractInterpreter::createCBE(const char *Argv0, std::string &Message, + const std::string &GCCBinary, const std::vector<std::string> *Args, const std::vector<std::string> *GCCArgs) { sys::Path LLCPath = @@ -604,7 +605,7 @@ CBE *AbstractInterpreter::createCBE(const char *Argv0, } Message = "Found llc: " + LLCPath.str() + "\n"; - GCC *gcc = GCC::create(Message, GCCArgs); + GCC *gcc = GCC::create(Message, GCCBinary, GCCArgs); if (!gcc) { errs() << Message << "\n"; exit(1); @@ -852,10 +853,11 @@ int GCC::MakeSharedObject(const std::string &InputFile, FileType fileType, /// create - Try to find the `gcc' executable /// GCC *GCC::create(std::string &Message, + const std::string &GCCBinary, const std::vector<std::string> *Args) { - sys::Path GCCPath = sys::Program::FindProgramByName("gcc"); + sys::Path GCCPath = sys::Program::FindProgramByName(GCCBinary); if (GCCPath.isEmpty()) { - Message = "Cannot find `gcc' in executable directory or PATH!\n"; + Message = "Cannot find `"+ GCCBinary +"' in executable directory or PATH!\n"; return 0; } |

