EngineBuilder: support for custom TargetOptions. Fixes the
[oota-llvm.git] / lib / ExecutionEngine / TargetSelect.cpp
index 9a0d41d48e51b2c27644bcf75e1ce6dda1b812c8..ea93a77287cb038e10bcb06cd2532c1b808c58aa 100644 (file)
@@ -30,6 +30,7 @@ TargetMachine *EngineBuilder::selectTarget(Module *Mod,
                               StringRef MArch,
                               StringRef MCPU,
                               const SmallVectorImpl<std::string>& MAttrs,
+                              const TargetOptions &Options,
                               Reloc::Model RM,
                               CodeModel::Model CM,
                               CodeGenOpt::Level OL,
@@ -86,7 +87,6 @@ TargetMachine *EngineBuilder::selectTarget(Module *Mod,
   }
 
   // Allocate a target...
-  TargetOptions Options;
   TargetMachine *Target = TheTarget->createTargetMachine(TheTriple.getTriple(),
                                                          MCPU, FeaturesStr,
                                                          Options,