Similar to what is already done for Linux, make clang not complain about
unused -g, -emit-llvm or -w arguments when doing linking. E.g. invoking "clang -g foo.o -o foo" will now be silent. Reported by: Jakub Lach <jakub_lach@mailplus.pl> MFC after: 1 week
This commit is contained in:
parent
52c874269a
commit
fe2cf87e27
@ -4745,6 +4745,14 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
const Driver &D = getToolChain().getDriver();
|
||||
ArgStringList CmdArgs;
|
||||
|
||||
// Silence warning for "clang -g foo.o -o foo"
|
||||
Args.ClaimAllArgs(options::OPT_g_Group);
|
||||
// and "clang -emit-llvm foo.o -o foo"
|
||||
Args.ClaimAllArgs(options::OPT_emit_llvm);
|
||||
// and for "clang -w foo.o -o foo". Other warning options are already
|
||||
// handled somewhere else.
|
||||
Args.ClaimAllArgs(options::OPT_w);
|
||||
|
||||
if (!D.SysRoot.empty())
|
||||
CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user