mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-23 16:19:52 +00:00
Make it possible to set the flags passed to the assembler.
Nick, please review. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110705 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -126,6 +126,14 @@ void LTOCodeGenerator::setAssemblerPath(const char* path)
|
||||
_assemblerPath = new sys::Path(path);
|
||||
}
|
||||
|
||||
void LTOCodeGenerator::setAssemblerArgs(const char** args, int nargs)
|
||||
{
|
||||
for (int i = 0; i < nargs; ++i) {
|
||||
const char *arg = args[i];
|
||||
_assemblerArgs.push_back(arg);
|
||||
}
|
||||
}
|
||||
|
||||
void LTOCodeGenerator::addMustPreserveSymbol(const char* sym)
|
||||
{
|
||||
_mustPreserveSymbols[sym] = 1;
|
||||
@@ -257,6 +265,11 @@ bool LTOCodeGenerator::assemble(const std::string& asmPath,
|
||||
args.push_back("-c");
|
||||
args.push_back("-x");
|
||||
args.push_back("assembler");
|
||||
} else {
|
||||
for (std::vector<std::string>::iterator I = _assemblerArgs.begin(),
|
||||
E = _assemblerArgs.end(); I != E; ++I) {
|
||||
args.push_back(I->c_str());
|
||||
}
|
||||
}
|
||||
args.push_back("-o");
|
||||
args.push_back(objPath.c_str());
|
||||
|
||||
Reference in New Issue
Block a user