mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-06 13:09:50 +00:00
Update the llvm/clang patch for r264345.
This commit is contained in:
parent
577853e676
commit
f567f56ebf
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=264350
@ -1,22 +1,20 @@
|
||||
This patch makes clang default to DWARF2 debug info format for FreeBSD
|
||||
10.x and earlier.
|
||||
This patch makes clang default to DWARF2 debug info format for FreeBSD.
|
||||
|
||||
Introduced here: http://svnweb.freebsd.org/changeset/base/263891
|
||||
Introduced here: http://svnweb.freebsd.org/changeset/base/264345
|
||||
|
||||
Index: tools/clang/lib/Driver/Tools.cpp
|
||||
===================================================================
|
||||
--- tools/clang/lib/Driver/Tools.cpp
|
||||
+++ tools/clang/lib/Driver/Tools.cpp
|
||||
@@ -2628,8 +2628,10 @@ void Clang::ConstructJob(Compilation &C, const Job
|
||||
@@ -2627,8 +2635,9 @@ void Clang::ConstructJob(Compilation &C, const Job
|
||||
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.
|
||||
+ // Default is dwarf-2 for darwin and FreeBSD.
|
||||
+ const llvm::Triple &Triple = getToolChain().getTriple();
|
||||
+ if (Triple.isOSDarwin() || (Triple.getOS() == llvm::Triple::FreeBSD &&
|
||||
+ Triple.getOSMajorVersion() <= 10))
|
||||
+ if (Triple.isOSDarwin() || Triple.getOS() == llvm::Triple::FreeBSD)
|
||||
CmdArgs.push_back("-gdwarf-2");
|
||||
else
|
||||
CmdArgs.push_back("-g");
|
Loading…
Reference in New Issue
Block a user