Date: Tue, 1 Apr 2014 08:19:31 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r263984 - in stable: 10/contrib/llvm/tools/clang/lib/Driver 9/contrib/llvm/tools/clang/lib/Driver Message-ID: <201404010819.s318JVJE062578@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: dim Date: Tue Apr 1 08:19:30 2014 New Revision: 263984 URL: http://svnweb.freebsd.org/changeset/base/263984 Log: 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. Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/9/contrib/llvm/ (props changed) stable/9/contrib/llvm/tools/clang/ (props changed) Changes in other areas also in this revision: Modified: stable/10/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Directory Properties: stable/10/ (props changed) Modified: stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue Apr 1 06:46:59 2014 (r263983) +++ stable/9/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue Apr 1 08:19:30 2014 (r263984) @@ -2628,8 +2628,10 @@ void Clang::ConstructJob(Compilation &C, 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");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201404010819.s318JVJE062578>