mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
allow opt to take a -mtriple option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154959 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d16ce17711
commit
e652b521f9
@ -114,6 +114,9 @@ static cl::opt<bool>
|
||||
OptLevelO3("O3",
|
||||
cl::desc("Optimization level 3. Similar to llvm-gcc -O3"));
|
||||
|
||||
static cl::opt<std::string>
|
||||
TargetTriple("mtriple", cl::desc("Override target triple for module"));
|
||||
|
||||
static cl::opt<bool>
|
||||
UnitAtATime("funit-at-a-time",
|
||||
cl::desc("Enable IPO. This is same as llvm-gcc's -funit-at-a-time"),
|
||||
@ -512,6 +515,10 @@ int main(int argc, char **argv) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
// If we are supposed to override the target triple, do so now.
|
||||
if (!TargetTriple.empty())
|
||||
M->setTargetTriple(Triple::normalize(TargetTriple));
|
||||
|
||||
// Figure out what stream we are supposed to write to...
|
||||
OwningPtr<tool_output_file> Out;
|
||||
if (NoOutput) {
|
||||
|
Loading…
Reference in New Issue
Block a user