- Options.NoZerosInBSS = DontPlaceZerosInBSS;
- Options.GuaranteedTailCallOpt = EnableGuaranteedTailCallOpt;
- Options.DisableTailCalls = DisableTailCalls;
- Options.StackAlignmentOverride = OverrideStackAlignment;
- Options.RealignStack = EnableRealignStack;
- Options.TrapFuncName = TrapFuncName;
- Options.PositionIndependentExecutable = EnablePIE;
- Options.EnableSegmentedStacks = SegmentedStacks;
- Options.UseInitArray = UseInitArray;
- Options.SSPBufferSize = SSPBufferSize;
-
- std::auto_ptr<TargetMachine>
- target(TheTarget->createTargetMachine(TheTriple.getTriple(),
- MCPU, FeaturesStr, Options,
- RelocModel, CMModel, OLvl));
- assert(target.get() && "Could not allocate target machine!");
- assert(mod && "Should have exited after outputting help!");
- TargetMachine &Target = *target.get();
-
- if (DisableDotLoc)
- Target.setMCUseLoc(false);
-
- if (DisableCFI)
- Target.setMCUseCFI(false);
-
- if (EnableDwarfDirectory)
- Target.setMCUseDwarfDirectory(true);
-
- if (GenerateSoftFloatCalls)
- FloatABIForCalls = FloatABI::Soft;
-
- // Disable .loc support for older OS X versions.
- if (TheTriple.isMacOSX() &&
- TheTriple.isMacOSXVersionLT(10, 6))
- Target.setMCUseLoc(false);