MFC r263891:
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.
This commit is contained in:
parent
33929c7923
commit
962d0a5759
@ -2628,8 +2628,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…
Reference in New Issue
Block a user