svn commit: r354418 - head/contrib/llvm/tools/clang/lib/Driver/ToolChains

Conrad Meyer cem at FreeBSD.org
Wed Nov 6 23:44:39 UTC 2019


Author: cem
Date: Wed Nov  6 23:44:38 2019
New Revision: 354418
URL: https://svnweb.freebsd.org/changeset/base/354418

Log:
  clang: Enable unwind tables on !amd64
  
  There doesn't seem to be much sense in defaulting "on" unwind tables on
  amd64 and not on other arches.  It causes surprising differences between
  platforms, such as the PR below.
  
  Prior to this change, FreeBSD inherited the default implementation of the
  method from the Gnu.h Generic_Elf => Generic_GCC parent class, which
  returned true only for amd64 targets.  Override that and opt on always,
  similar to, e.g., NetBSD.
  
  PR:		241562
  Reported by:	lwhsu
  Reviewed by:	dim
  Discussed with:	emaste
  MFC after:	I'm not going to, but you should feel free
  Relnotes:	yes
  Differential Revision:	https://reviews.freebsd.org/D22252

Modified:
  head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.cpp
  head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.h

Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.cpp
==============================================================================
--- head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.cpp	Wed Nov  6 23:40:09 2019	(r354417)
+++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.cpp	Wed Nov  6 23:44:38 2019	(r354418)
@@ -409,6 +409,8 @@ llvm::ExceptionHandling FreeBSD::GetExceptionModel(con
 
 bool FreeBSD::HasNativeLLVMSupport() const { return true; }
 
+bool FreeBSD::IsUnwindTablesDefault(const ArgList &Args) const { return true; }
+
 bool FreeBSD::isPIEDefault() const { return getSanitizerArgs().requiresPIE(); }
 
 SanitizerMask FreeBSD::getSupportedSanitizers() const {

Modified: head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.h
==============================================================================
--- head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.h	Wed Nov  6 23:40:09 2019	(r354417)
+++ head/contrib/llvm/tools/clang/lib/Driver/ToolChains/FreeBSD.h	Wed Nov  6 23:44:38 2019	(r354418)
@@ -67,6 +67,7 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic
 
   llvm::ExceptionHandling GetExceptionModel(
       const llvm::opt::ArgList &Args) const override;
+  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
   bool isPIEDefault() const override;
   SanitizerMask getSupportedSanitizers() const override;
   unsigned GetDefaultDwarfVersion() const override;


More information about the svn-src-head mailing list