llvm.org GIT mirror llvm / 3015e60
provide an option to override the target triple in a module from the commandline. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24730 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 7 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
3535 cl::opt ForceInterpreter("force-interpreter",
3636 cl::desc("Force interpretation: disable JIT"),
3737 cl::init(false));
38
38 cl::opt
39 TargetTriple("triple", cl::desc("Override target triple for module"));
40
3941 cl::opt
4042 FakeArgv0("fake-argv0",
4143 cl::desc("Override the 'argv[0]' value passed into the executing"
6163 exit(1);
6264 }
6365
66 // If we are supposed to override the target triple, do so now.
67 if (!TargetTriple.empty())
68 MP->getModule()->setTargetTriple(TargetTriple);
69
6470 ExecutionEngine *EE = ExecutionEngine::create(MP, ForceInterpreter);
6571 assert(EE && "Couldn't create an ExecutionEngine, not even an interpreter?");
6672