[Lldb-commits] [lldb] r374585 - Add -fgnuc-version to ClangModuleCompilationOptions on Darwin.

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 11 12:54:09 PDT 2019


Author: adrian
Date: Fri Oct 11 12:54:09 2019
New Revision: 374585

URL: http://llvm.org/viewvc/llvm-project?rev=374585&view=rev
Log:
Add -fgnuc-version to ClangModuleCompilationOptions on Darwin.

This adapts LLDB for https://reviews.llvm.org/D68055.

Darwin's libC headers expect the GNUC macro to be set.

Modified:
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp?rev=374585&r1=374584&r2=374585&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformDarwin.cpp Fri Oct 11 12:54:09 2019
@@ -1506,7 +1506,8 @@ void PlatformDarwin::AddClangModuleCompi
     Target *target, std::vector<std::string> &options, SDKType sdk_type) {
   const std::vector<std::string> apple_arguments = {
       "-x",       "objective-c++", "-fobjc-arc",
-      "-fblocks", "-D_ISO646_H",   "-D__ISO646_H"};
+      "-fblocks", "-D_ISO646_H",   "-D__ISO646_H",
+      "-fgnuc-version=4.2.1"};
 
   options.insert(options.end(), apple_arguments.begin(), apple_arguments.end());
 




More information about the lldb-commits mailing list