[Lldb-commits] [lldb] bf65f19 - Revert "[Host.mm] Check for the right macro instead of inlining it"

Vedant Kumar via lldb-commits lldb-commits at lists.llvm.org
Mon Feb 10 14:34:56 PST 2020


Author: Vedant Kumar
Date: 2020-02-10T14:34:48-08:00
New Revision: bf65f19bce88fd9f1a74154d92afe37193ecd7a5

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

LOG: Revert "[Host.mm] Check for the right macro instead of inlining it"

This breaks macOS, because TARGET_OS_EMBEDDED is always defined. Thanks
to Jason Molenda for pointing this out.

Revert "Do not define AcceptPIDFromInferior when it will not be used"

This reverts commit d23c15a687ff15327b88fa64da3184395012c2dc.
This reverts commit 936d1427da1432d724dfa5851097347bcdf7c521.

Added: 
    

Modified: 
    lldb/source/Host/macosx/objcxx/Host.mm

Removed: 
    


################################################################################
diff  --git a/lldb/source/Host/macosx/objcxx/Host.mm b/lldb/source/Host/macosx/objcxx/Host.mm
index 778cf3d90869..233734109c41 100644
--- a/lldb/source/Host/macosx/objcxx/Host.mm
+++ b/lldb/source/Host/macosx/objcxx/Host.mm
@@ -9,10 +9,9 @@
 #include "lldb/Host/Host.h"
 
 #include <AvailabilityMacros.h>
-#include <TargetConditionals.h>
 
 // On device doesn't have supporty for XPC.
-#if defined(__APPLE__) && defined(TARGET_OS_EMBEDDED)
+#if defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__))
 #define NO_XPC_SERVICES 1
 #endif
 
@@ -136,8 +135,6 @@
   return false;
 }
 
-#if !NO_XPC_SERVICES
-
 static void *AcceptPIDFromInferior(void *arg) {
   const char *connect_url = (const char *)arg;
   ConnectionFileDescriptor file_conn;
@@ -156,6 +153,8 @@
   return NULL;
 }
 
+#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
+
 const char *applscript_in_new_tty = "tell application \"Terminal\"\n"
                                     "   activate\n"
                                     "	do script \"/bin/bash -c '%s';exit\"\n"
@@ -308,11 +307,11 @@ repeat with the_window in (get windows)\n\
   return error;
 }
 
-#endif // #if !NO_XPC_SERVICES
+#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
 
 bool Host::OpenFileInExternalEditor(const FileSpec &file_spec,
                                     uint32_t line_no) {
-#if NO_XPC_SERVICES
+#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
   return false;
 #else
   // We attach this to an 'odoc' event to specify a particular selection
@@ -405,7 +404,7 @@ repeat with the_window in (get windows)\n\
   }
 
   return true;
-#endif // #if !NO_XPC_SERVICES
+#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
 }
 
 Environment Host::GetEnvironment() { return Environment(*_NSGetEnviron()); }
@@ -1264,7 +1263,7 @@ static bool ShouldLaunchUsingXPC(ProcessLaunchInfo &launch_info) {
   }
 
   if (launch_info.GetFlags().Test(eLaunchFlagLaunchInTTY)) {
-#if !NO_XPC_SERVICES
+#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
     return LaunchInNewTerminalWithAppleScript(exe_spec.GetPath().c_str(),
                                               launch_info);
 #else


        


More information about the lldb-commits mailing list