mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 17:24:48 +00:00
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
This commit is contained in:
@ -300,6 +300,7 @@ int llvm::GenerateAssembly(const std::string &OutputFilename,
|
|||||||
const sys::Path &llc) {
|
const sys::Path &llc) {
|
||||||
// Run LLC to convert the bytecode file into assembly code.
|
// Run LLC to convert the bytecode file into assembly code.
|
||||||
std::vector<const char*> args;
|
std::vector<const char*> args;
|
||||||
|
args.push_back(llc.c_str());
|
||||||
args.push_back("-f");
|
args.push_back("-f");
|
||||||
args.push_back("-o");
|
args.push_back("-o");
|
||||||
args.push_back(OutputFilename.c_str());
|
args.push_back(OutputFilename.c_str());
|
||||||
@ -313,9 +314,10 @@ int llvm::GenerateAssembly(const std::string &OutputFilename,
|
|||||||
/// specified bytecode file.
|
/// specified bytecode file.
|
||||||
int llvm::GenerateCFile(const std::string &OutputFile,
|
int llvm::GenerateCFile(const std::string &OutputFile,
|
||||||
const std::string &InputFile,
|
const std::string &InputFile,
|
||||||
const sys::Path &llc ) {
|
const sys::Path &llc) {
|
||||||
// Run LLC to convert the bytecode file into C.
|
// Run LLC to convert the bytecode file into C.
|
||||||
std::vector<const char*> args;
|
std::vector<const char*> args;
|
||||||
|
args.push_back(llc.c_str());
|
||||||
args.push_back("-march=c");
|
args.push_back("-march=c");
|
||||||
args.push_back("-f");
|
args.push_back("-f");
|
||||||
args.push_back("-o");
|
args.push_back("-o");
|
||||||
@ -372,6 +374,7 @@ int llvm::GenerateNative(const std::string &OutputFilename,
|
|||||||
// and linker because we don't know where to put the _start symbol.
|
// and linker because we don't know where to put the _start symbol.
|
||||||
// GCC mysteriously knows how to do it.
|
// GCC mysteriously knows how to do it.
|
||||||
std::vector<const char*> args;
|
std::vector<const char*> args;
|
||||||
|
args.push_back(gcc.c_str());
|
||||||
args.push_back("-fno-strict-aliasing");
|
args.push_back("-fno-strict-aliasing");
|
||||||
args.push_back("-O3");
|
args.push_back("-O3");
|
||||||
args.push_back("-o");
|
args.push_back("-o");
|
||||||
|
@ -221,10 +221,11 @@ static int GenerateAssembly(const std::string &OutputFilename,
|
|||||||
const sys::Path &llc) {
|
const sys::Path &llc) {
|
||||||
// Run LLC to convert the bytecode file into assembly code.
|
// Run LLC to convert the bytecode file into assembly code.
|
||||||
std::vector<const char*> args;
|
std::vector<const char*> args;
|
||||||
args.push_back( "-f");
|
args.push_back(llc.c_str());
|
||||||
args.push_back( "-o");
|
args.push_back("-f");
|
||||||
args.push_back( OutputFilename.c_str() );
|
args.push_back("-o");
|
||||||
args.push_back( InputFilename.c_str() );
|
args.push_back(OutputFilename.c_str());
|
||||||
|
args.push_back(InputFilename.c_str());
|
||||||
args.push_back(0);
|
args.push_back(0);
|
||||||
|
|
||||||
return sys::Program::ExecuteAndWait(llc,&args[0]);
|
return sys::Program::ExecuteAndWait(llc,&args[0]);
|
||||||
@ -237,11 +238,12 @@ static int GenerateCFile(const std::string &OutputFile,
|
|||||||
const sys::Path &llc) {
|
const sys::Path &llc) {
|
||||||
// Run LLC to convert the bytecode file into C.
|
// Run LLC to convert the bytecode file into C.
|
||||||
std::vector<const char*> args;
|
std::vector<const char*> args;
|
||||||
args.push_back( "-march=c");
|
args.push_back(llc.c_str());
|
||||||
args.push_back( "-f");
|
args.push_back("-march=c");
|
||||||
args.push_back( "-o");
|
args.push_back("-f");
|
||||||
args.push_back( OutputFile.c_str() );
|
args.push_back("-o");
|
||||||
args.push_back( InputFile.c_str() );
|
args.push_back(OutputFile.c_str());
|
||||||
|
args.push_back(InputFile.c_str());
|
||||||
args.push_back(0);
|
args.push_back(0);
|
||||||
return sys::Program::ExecuteAndWait(llc, &args[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.
|
// and linker because we don't know where to put the _start symbol.
|
||||||
// GCC mysteriously knows how to do it.
|
// GCC mysteriously knows how to do it.
|
||||||
std::vector<const char*> args;
|
std::vector<const char*> args;
|
||||||
|
args.push_back(gcc.c_str());
|
||||||
args.push_back("-fno-strict-aliasing");
|
args.push_back("-fno-strict-aliasing");
|
||||||
args.push_back("-O3");
|
args.push_back("-O3");
|
||||||
args.push_back("-o");
|
args.push_back("-o");
|
||||||
|
Reference in New Issue
Block a user