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

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

Issue 1834813002: Support -rdynamic option in the new driver (Closed) Base URL: https://chromium.googlesource.com/a/native_client/pnacl-clang.git@master
Patch Set: Created 4 years, 9 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===--- Tools.cpp - Tools Implementations --------------------------------===// 1 //===--- Tools.cpp - Tools 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 "Tools.h" 10 #include "Tools.h"
(...skipping 8205 matching lines...) Expand 10 before | Expand all | Expand 10 after
8216 // handled somewhere else. 8216 // handled somewhere else.
8217 Args.ClaimAllArgs(options::OPT_w); 8217 Args.ClaimAllArgs(options::OPT_w);
8218 // Silence warning for libgcc since we only support compiler-rt. 8218 // Silence warning for libgcc since we only support compiler-rt.
8219 Args.ClaimAllArgs(options::OPT_shared_libgcc); 8219 Args.ClaimAllArgs(options::OPT_shared_libgcc);
8220 Args.ClaimAllArgs(options::OPT_static_libgcc); 8220 Args.ClaimAllArgs(options::OPT_static_libgcc);
8221 8221
8222 if (!D.SysRoot.empty()) 8222 if (!D.SysRoot.empty())
8223 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot)); 8223 CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
8224 8224
8225 if (Arg *A = Args.getLastArg(options::OPT_shared, 8225 if (Arg *A = Args.getLastArg(options::OPT_shared,
8226 options::OPT_dynamic, 8226 options::OPT_dynamic))
8227 options::OPT_rdynamic))
8228 D.Diag(diag::err_drv_unsupported_opt) << A->getOption().getName(); 8227 D.Diag(diag::err_drv_unsupported_opt) << A->getOption().getName();
8229 8228
8229 // This option does not currently have any effect for bitcode linking,
8230 // but we support it for backwards compatibility with the legacy driver
8231 // and existing software packages.
8232 if (Args.hasArg(options::OPT_rdynamic))
8233 CmdArgs.push_back("-export-dynamic");
8234
8230 std::string TripleStr = ToolChain.ComputeEffectiveClangTriple(Args); 8235 std::string TripleStr = ToolChain.ComputeEffectiveClangTriple(Args);
8231 if (ToolChain.getArch() != llvm::Triple::le32) 8236 if (ToolChain.getArch() != llvm::Triple::le32)
8232 D.Diag(diag::err_target_unsupported_arch) << ToolChain.getArchName() 8237 D.Diag(diag::err_target_unsupported_arch) << ToolChain.getArchName()
8233 << TripleStr; 8238 << TripleStr;
8234 8239
8235 Args.AddAllArgs(CmdArgs, options::OPT_static); 8240 Args.AddAllArgs(CmdArgs, options::OPT_static);
8236 if (!Args.hasArg(options::OPT_static)) 8241 if (!Args.hasArg(options::OPT_static))
8237 CmdArgs.push_back("-static"); 8242 CmdArgs.push_back("-static");
8238 8243
8239 bool EH = exceptionSettings(Args, ToolChain.getTriple()); 8244 bool EH = exceptionSettings(Args, ToolChain.getTriple());
(...skipping 882 matching lines...) Expand 10 before | Expand all | Expand 10 after
9122 CmdArgs.push_back("-lmsvcrt"); 9127 CmdArgs.push_back("-lmsvcrt");
9123 AddRunTimeLibs(TC, D, CmdArgs, Args); 9128 AddRunTimeLibs(TC, D, CmdArgs, Args);
9124 } 9129 }
9125 } 9130 }
9126 9131
9127 const std::string Linker = TC.GetProgramPath("ld"); 9132 const std::string Linker = TC.GetProgramPath("ld");
9128 Exec = Args.MakeArgString(Linker); 9133 Exec = Args.MakeArgString(Linker);
9129 9134
9130 C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs)); 9135 C.addCommand(llvm::make_unique<Command>(JA, *this, Exec, CmdArgs));
9131 } 9136 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698