forked from OSchip/llvm-project
clang-cl: use -fno-rtti by default
Generating RTTI in the MS ABI is currently not supported, and the failures are confusing to users, so let's disable it by default for now. llvm-svn: 202178
This commit is contained in:
parent
b1ae3d4937
commit
7b0dcef072
|
@ -4112,6 +4112,10 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const {
|
|||
if (Arg *A = Args.getLastArg(options::OPT_show_includes))
|
||||
A->render(Args, CmdArgs);
|
||||
|
||||
// RTTI is currently not supported, so disable it by default.
|
||||
if (!Args.hasArg(options::OPT_frtti, options::OPT_fno_rtti))
|
||||
CmdArgs.push_back("-fno-rtti");
|
||||
|
||||
const Driver &D = getToolChain().getDriver();
|
||||
Arg *MostGeneralArg = Args.getLastArg(options::OPT__SLASH_vmg);
|
||||
Arg *BestCaseArg = Args.getLastArg(options::OPT__SLASH_vmb);
|
||||
|
|
|
@ -250,5 +250,11 @@
|
|||
// We support -m32 and -m64.
|
||||
// RUN: %clang_cl /Zs /WX -m32 -m64 -- %s
|
||||
|
||||
// Use -fno-rtti by default.
|
||||
// RUN: %clang_cl /c -### -- %s 2>&1 | FileCheck -check-prefix=NoRTTI %s
|
||||
// NoRTTI: "-fno-rtti"
|
||||
// RUN: %clang_cl /c /GR -### -- %s 2>&1 | FileCheck -check-prefix=RTTI %s
|
||||
// RTTI-NOT: "-fno-rtti"
|
||||
|
||||
|
||||
void f() { }
|
||||
|
|
Loading…
Reference in New Issue