OLD | NEW |
---|---|
1 //===-- pnacl-llc.cpp - PNaCl-specific llc: pexe ---> nexe ---------------===// | 1 //===-- pnacl-llc.cpp - PNaCl-specific llc: pexe ---> nexe ---------------===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // pnacl-llc: the core of the PNaCl translator, compiling a pexe into a nexe. | 10 // pnacl-llc: the core of the PNaCl translator, compiling a pexe into a nexe. |
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
698 std::string Error; | 698 std::string Error; |
699 const Target *TheTarget = TargetRegistry::lookupTarget(MArch, TheTriple, | 699 const Target *TheTarget = TargetRegistry::lookupTarget(MArch, TheTriple, |
700 Error); | 700 Error); |
701 if (!TheTarget) { | 701 if (!TheTarget) { |
702 errs() << ProgramName << ": " << Error; | 702 errs() << ProgramName << ": " << Error; |
703 return 1; | 703 return 1; |
704 } | 704 } |
705 | 705 |
706 TargetOptions Options = InitTargetOptionsFromCodeGenFlags(); | 706 TargetOptions Options = InitTargetOptionsFromCodeGenFlags(); |
707 Options.DisableIntegratedAS = NoIntegratedAssembler; | 707 Options.DisableIntegratedAS = NoIntegratedAssembler; |
708 #if defined(__native_client__) | |
709 Options.MCOptions.MCRelaxAll = true; | |
Mark Seaborn
2015/05/15 14:03:42
Can you add a comment explaining that this reduces
Petr Hosek
2015/05/15 19:27:39
Done.
| |
710 #endif | |
708 | 711 |
709 if (GenerateSoftFloatCalls) | 712 if (GenerateSoftFloatCalls) |
710 FloatABIForCalls = FloatABI::Soft; | 713 FloatABIForCalls = FloatABI::Soft; |
711 | 714 |
712 // Package up features to be passed to target/subtarget | 715 // Package up features to be passed to target/subtarget |
713 std::string FeaturesStr; | 716 std::string FeaturesStr; |
714 if (MAttrs.size()) { | 717 if (MAttrs.size()) { |
715 SubtargetFeatures Features; | 718 SubtargetFeatures Features; |
716 for (unsigned i = 0; i != MAttrs.size(); ++i) | 719 for (unsigned i = 0; i != MAttrs.size(); ++i) |
717 Features.AddFeature(MAttrs[i]); | 720 Features.AddFeature(MAttrs[i]); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
769 return 0; | 772 return 0; |
770 } | 773 } |
771 | 774 |
772 int main(int argc, char **argv) { | 775 int main(int argc, char **argv) { |
773 #if defined(PNACL_BROWSER_TRANSLATOR) | 776 #if defined(PNACL_BROWSER_TRANSLATOR) |
774 return srpc_main(argc, argv); | 777 return srpc_main(argc, argv); |
775 #else | 778 #else |
776 return llc_main(argc, argv); | 779 return llc_main(argc, argv); |
777 #endif // PNACL_BROWSER_TRANSLATOR | 780 #endif // PNACL_BROWSER_TRANSLATOR |
778 } | 781 } |
OLD | NEW |