forked from OSchip/llvm-project
Also avoid warning on -flto/-fno-lto on linux.
On OS X a .s file is preprocessed, it is not on linux, which is why the warning was still showing up on linux but not OS X. llvm-svn: 225095
This commit is contained in:
parent
2ad2a8b943
commit
16042fc2b9
|
@ -3379,8 +3379,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
D.Diag(diag::warn_ignored_gcc_optimization) << (*it)->getAsString(Args);
|
||||
}
|
||||
|
||||
// Don't warn about unused -f(no-)?lto. This can happen when we're preprocessing,
|
||||
// precompiling or assembling.
|
||||
// Don't warn about unused -f(no-)?lto. This can happen when we're preprocessing or
|
||||
// precompiling.
|
||||
Args.ClaimAllArgs(options::OPT_flto);
|
||||
Args.ClaimAllArgs(options::OPT_fno_lto);
|
||||
|
||||
|
@ -4810,6 +4810,11 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
// and "clang -emit-llvm -c foo.s"
|
||||
Args.ClaimAllArgs(options::OPT_emit_llvm);
|
||||
|
||||
// Don't warn on -flto/-fno-lto
|
||||
// FIXME: Code duplicated with Clang::ConstructJob.
|
||||
Args.ClaimAllArgs(options::OPT_flto);
|
||||
Args.ClaimAllArgs(options::OPT_fno_lto);
|
||||
|
||||
// Invoke ourselves in -cc1as mode.
|
||||
//
|
||||
// FIXME: Implement custom jobs for internal actions.
|
||||
|
|
Loading…
Reference in New Issue