diff options
author | Chris Lattner <sabre@nondot.org> | 2005-04-10 20:59:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-04-10 20:59:38 +0000 |
commit | bf9add47452cb413263e61ffe4db21f73118e40b (patch) | |
tree | f992504c9137def0c482039c5496dce40008da17 /tools/llvm-ld | |
parent | 1a130b9a03bc41523366078dd98b485ab832424f (diff) | |
download | external_llvm-bf9add47452cb413263e61ffe4db21f73118e40b.zip external_llvm-bf9add47452cb413263e61ffe4db21f73118e40b.tar.gz external_llvm-bf9add47452cb413263e61ffe4db21f73118e40b.tar.bz2 |
The first argument to ExecuteAndWait should be the program name, but pointed
out by Markus F.X.J. Oberhumer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21211 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-ld')
-rw-r--r-- | tools/llvm-ld/llvm-ld.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/tools/llvm-ld/llvm-ld.cpp b/tools/llvm-ld/llvm-ld.cpp index f19c079..944f23d 100644 --- a/tools/llvm-ld/llvm-ld.cpp +++ b/tools/llvm-ld/llvm-ld.cpp @@ -221,10 +221,11 @@ static int GenerateAssembly(const std::string &OutputFilename, const sys::Path &llc) { // Run LLC to convert the bytecode file into assembly code. std::vector<const char*> args; - args.push_back( "-f"); - args.push_back( "-o"); - args.push_back( OutputFilename.c_str() ); - args.push_back( InputFilename.c_str() ); + args.push_back(llc.c_str()); + args.push_back("-f"); + args.push_back("-o"); + args.push_back(OutputFilename.c_str()); + args.push_back(InputFilename.c_str()); args.push_back(0); return sys::Program::ExecuteAndWait(llc,&args[0]); @@ -237,11 +238,12 @@ static int GenerateCFile(const std::string &OutputFile, const sys::Path &llc) { // Run LLC to convert the bytecode file into C. std::vector<const char*> args; - args.push_back( "-march=c"); - args.push_back( "-f"); - args.push_back( "-o"); - args.push_back( OutputFile.c_str() ); - args.push_back( InputFile.c_str() ); + args.push_back(llc.c_str()); + args.push_back("-march=c"); + args.push_back("-f"); + args.push_back("-o"); + args.push_back(OutputFile.c_str()); + args.push_back(InputFile.c_str()); args.push_back(0); return sys::Program::ExecuteAndWait(llc, &args[0]); } @@ -290,6 +292,7 @@ static int GenerateNative(const std::string &OutputFilename, // and linker because we don't know where to put the _start symbol. // GCC mysteriously knows how to do it. std::vector<const char*> args; + args.push_back(gcc.c_str()); args.push_back("-fno-strict-aliasing"); args.push_back("-O3"); args.push_back("-o"); |