Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 Nov 2019 23:44:38 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r354418 - head/contrib/llvm/tools/clang/lib/Driver/ToolChains
Message-ID:  <201911062344.xA6NicLE099656@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911062344.xA6NicLE099656>