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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/Driver/Tools.cpp
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index f4f7c4e1d36c937ab54a185d76b6fc53721683fb..6df472c336efb58c7d0436c518e6d170fb2f6182 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -8223,10 +8223,15 @@ void pnacltools::Link::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
if (Arg *A = Args.getLastArg(options::OPT_shared,
- options::OPT_dynamic,
- options::OPT_rdynamic))
+ options::OPT_dynamic))
D.Diag(diag::err_drv_unsupported_opt) << A->getOption().getName();
+ // This option does not currently have any effect for bitcode linking,
+ // but we support it for backwards compatibility with the legacy driver
+ // and existing software packages.
+ if (Args.hasArg(options::OPT_rdynamic))
+ CmdArgs.push_back("-export-dynamic");
+
std::string TripleStr = ToolChain.ComputeEffectiveClangTriple(Args);
if (ToolChain.getArch() != llvm::Triple::le32)
D.Diag(diag::err_target_unsupported_arch) << ToolChain.getArchName()
« 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