Make clang default to DWARF2 debug info format for FreeBSD 10.x and
earlier. For head, this commit does not change anything, but it is purely meant to be MFC'd. MFC after: 3 days
This commit is contained in:
parent
0fd9448514
commit
3dd17d8d4a
@ -2635,8 +2635,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
CmdArgs.push_back("-gdwarf-4");
|
||||
else if (!A->getOption().matches(options::OPT_g0) &&
|
||||
!A->getOption().matches(options::OPT_ggdb0)) {
|
||||
// Default is dwarf-2 for darwin.
|
||||
if (getToolChain().getTriple().isOSDarwin())
|
||||
// Default is dwarf-2 for darwin and FreeBSD <= 10.
|
||||
const llvm::Triple &Triple = getToolChain().getTriple();
|
||||
if (Triple.isOSDarwin() || (Triple.getOS() == llvm::Triple::FreeBSD &&
|
||||
Triple.getOSMajorVersion() <= 10))
|
||||
CmdArgs.push_back("-gdwarf-2");
|
||||
else
|
||||
CmdArgs.push_back("-g");
|
||||
|
Loading…
x
Reference in New Issue
Block a user