[PATCH] D16264: For FreeBSD, use _p variants of libraries for linking C++ programs
Dimitry Andric via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 30 13:38:05 PST 2016
dim added a comment.
In http://reviews.llvm.org/D16264#340131, @compnerd wrote:
> `-p` or `-pg` also effects the math library. Please adjust the tests and the driver to reflect that.
This is already handled in `lib/Driver/Tools.cpp`, in `freebsd::Linker::ConstructJob()`:
if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
if (D.CCCIsCXX()) {
getToolChain().AddCXXStdlibLibArgs(Args, CmdArgs);
if (Args.hasArg(options::OPT_pg))
CmdArgs.push_back("-lm_p");
else
CmdArgs.push_back("-lm");
}
http://reviews.llvm.org/D16264
More information about the cfe-commits
mailing list