File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -391,19 +391,23 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR,
391391 cl::ParseCommandLineOptions (argc, argv);
392392 }
393393
394+ Triple Trip (Triple::normalize (triple));
395+
394396 TargetOptions Options;
395397 Options.EnableSegmentedStacks = EnableSegmentedStacks;
396398 Options.FixedStackSegmentSize = 2 * 1024 * 1024 ; // XXX: This is too big.
399+ Options.FloatABIType =
400+ (Trip.getEnvironment () == Triple::GNUEABIHF) ? FloatABI::Hard :
401+ FloatABI::Default;
397402
398403 PassManager *PM = unwrap<PassManager>(PMR);
399404
400405 std::string Err;
401- std::string Trip (Triple::normalize (triple));
402406 std::string FeaturesStr (feature);
403407 std::string CPUStr (cpu);
404- const Target *TheTarget = TargetRegistry::lookupTarget (Trip, Err);
408+ const Target *TheTarget = TargetRegistry::lookupTarget (Trip. getTriple () , Err);
405409 TargetMachine *Target =
406- TheTarget->createTargetMachine (Trip, CPUStr, FeaturesStr,
410+ TheTarget->createTargetMachine (Trip. getTriple () , CPUStr, FeaturesStr,
407411 Options, Reloc::PIC_,
408412 CodeModel::Default, OptLevel);
409413 Target->addAnalysisPasses (*PM);
You can’t perform that action at this time.
0 commit comments