Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: lib/Driver/ToolChains.cpp

Issue 838933004: Inject gnueabihf environment into the effective clang triple for NaCl (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-clang.git@master
Patch Set: review Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/Driver/ToolChains.h ('k') | lib/Driver/Tools.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===--- ToolChains.cpp - ToolChain Implementations -----------------------===// 1 //===--- ToolChains.cpp - ToolChain Implementations -----------------------===//
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 #include "ToolChains.h" 10 #include "ToolChains.h"
(...skipping 2511 matching lines...) Expand 10 before | Expand all | Expand 10 after
2522 StringRef Value = A->getValue(); 2522 StringRef Value = A->getValue();
2523 if (Value == "libc++") 2523 if (Value == "libc++")
2524 return ToolChain::CST_Libcxx; 2524 return ToolChain::CST_Libcxx;
2525 getDriver().Diag(diag::err_drv_invalid_stdlib_name) 2525 getDriver().Diag(diag::err_drv_invalid_stdlib_name)
2526 << A->getAsString(Args); 2526 << A->getAsString(Args);
2527 } 2527 }
2528 2528
2529 return ToolChain::CST_Libcxx; 2529 return ToolChain::CST_Libcxx;
2530 } 2530 }
2531 2531
2532 std::string NaCl_TC::ComputeEffectiveClangTriple(
2533 const ArgList &Args, types::ID InputType) const {
2534 llvm::Triple TheTriple(ComputeLLVMTriple(Args, InputType));
2535 if (TheTriple.getArch() == llvm::Triple::arm &&
2536 TheTriple.getEnvironment() == llvm::Triple::UnknownEnvironment)
2537 TheTriple.setEnvironment(llvm::Triple::GNUEABIHF);
2538 return TheTriple.getTriple();
2539 }
2540
2532 Tool *NaCl_TC::buildLinker() const { 2541 Tool *NaCl_TC::buildLinker() const {
2533 return new tools::nacltools::Link(*this); 2542 return new tools::nacltools::Link(*this);
2534 } 2543 }
2535 2544
2536 Tool *NaCl_TC::buildAssembler() const { 2545 Tool *NaCl_TC::buildAssembler() const {
2537 if (getTriple().getArch() == llvm::Triple::arm) 2546 if (getTriple().getArch() == llvm::Triple::arm)
2538 return new tools::nacltools::AssembleARM(*this); 2547 return new tools::nacltools::AssembleARM(*this);
2539 return new tools::gnutools::Assemble(*this); 2548 return new tools::gnutools::Assemble(*this);
2540 } 2549 }
2541 // End NaCl 2550 // End NaCl
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
3739 StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr)); 3748 StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr));
3740 ArrayRef<StringRef> DirVec(Dirs); 3749 ArrayRef<StringRef> DirVec(Dirs);
3741 addSystemIncludes(DriverArgs, CC1Args, DirVec); 3750 addSystemIncludes(DriverArgs, CC1Args, DirVec);
3742 } 3751 }
3743 } 3752 }
3744 3753
3745 void XCore::AddCXXStdlibLibArgs(const ArgList &Args, 3754 void XCore::AddCXXStdlibLibArgs(const ArgList &Args,
3746 ArgStringList &CmdArgs) const { 3755 ArgStringList &CmdArgs) const {
3747 // We don't output any lib args. This is handled by xcc. 3756 // We don't output any lib args. This is handled by xcc.
3748 } 3757 }
OLDNEW
« no previous file with comments | « lib/Driver/ToolChains.h ('k') | lib/Driver/Tools.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698