Skip to content

Commit fa95e35

Browse files
committed
[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.
1 parent e440b49 commit fa95e35

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lldb/source/Host/macosx/objcxx/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ add_lldb_library(lldbHostMacOSXObjCXX
1414
LINK_COMPONENTS
1515
Support
1616
)
17+
18+
target_compile_options(lldbHostMacOSXObjCXX PRIVATE -fno-objc-exceptions)

lldb/source/Plugins/Platform/MacOSX/objcxx/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,6 @@ add_lldb_library(lldbPluginPlatformMacOSXObjCXX
1515
Object
1616
Support
1717
)
18+
19+
20+
target_compile_options(lldbPluginPlatformMacOSXObjCXX PRIVATE -fno-objc-exceptions)

0 commit comments

Comments
 (0)