[Lldb-commits] [lldb] fa95e35 - [lldb] Pass -fno-objc-exceptions for objcxx targets

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 2 21:59:58 PDT 2020


Author: Jonas Devlieghere
Date: 2020-09-02T21:59:48-07:00
New Revision: fa95e35593353810c1b26e3641451fa82089d792

URL: https://github.com/llvm/llvm-project/commit/fa95e35593353810c1b26e3641451fa82089d792
DIFF: https://github.com/llvm/llvm-project/commit/fa95e35593353810c1b26e3641451fa82089d792.diff

LOG: [lldb] Pass -fno-objc-exceptions for objcxx targets

When compiling an Objective-C++ file, __has_feature(cxx_exceptions) will
return true with -fno-exceptions but without -fno-objc-exceptions. This
was causing LLVM_ENABLE_EXCEPTIONS to be defined for a subset of files.

Added: 
    

Modified: 
    lldb/source/Host/macosx/objcxx/CMakeLists.txt
    lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/lldb/source/Host/macosx/objcxx/CMakeLists.txt b/lldb/source/Host/macosx/objcxx/CMakeLists.txt
index e55b094c0c30..9db24f306418 100644
--- a/lldb/source/Host/macosx/objcxx/CMakeLists.txt
+++ b/lldb/source/Host/macosx/objcxx/CMakeLists.txt
@@ -14,3 +14,5 @@ add_lldb_library(lldbHostMacOSXObjCXX
   LINK_COMPONENTS
     Support
   )
+
+target_compile_options(lldbHostMacOSXObjCXX PRIVATE -fno-objc-exceptions)

diff  --git a/lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt b/lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt
index 946ff0a64c26..7d094a5865c4 100644
--- a/lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt
+++ b/lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt
@@ -15,3 +15,6 @@ add_lldb_library(lldbPluginPlatformMacOSXObjCXX
     Object
     Support
   )
+
+
+target_compile_options(lldbPluginPlatformMacOSXObjCXX PRIVATE -fno-objc-exceptions)


        


More information about the lldb-commits mailing list