Skip to content

Commit bf65f19

Browse files
committed
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 d23c15a. This reverts commit 936d142.
1 parent 480eea4 commit bf65f19

File tree

1 file changed

+7
-8
lines changed
  • lldb/source/Host/macosx/objcxx

1 file changed

+7
-8
lines changed

Diff for: lldb/source/Host/macosx/objcxx/Host.mm

+7-8
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99
#include "lldb/Host/Host.h"
1010

1111
#include <AvailabilityMacros.h>
12-
#include <TargetConditionals.h>
1312

1413
// On device doesn't have supporty for XPC.
15-
#if defined(__APPLE__) && defined(TARGET_OS_EMBEDDED)
14+
#if defined(__APPLE__) && (defined(__arm64__) || defined(__aarch64__))
1615
#define NO_XPC_SERVICES 1
1716
#endif
1817

@@ -136,8 +135,6 @@
136135
return false;
137136
}
138137

139-
#if !NO_XPC_SERVICES
140-
141138
static void *AcceptPIDFromInferior(void *arg) {
142139
const char *connect_url = (const char *)arg;
143140
ConnectionFileDescriptor file_conn;
@@ -156,6 +153,8 @@
156153
return NULL;
157154
}
158155

156+
#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
157+
159158
const char *applscript_in_new_tty = "tell application \"Terminal\"\n"
160159
" activate\n"
161160
" do script \"/bin/bash -c '%s';exit\"\n"
@@ -308,11 +307,11 @@ repeat with the_window in (get windows)\n\
308307
return error;
309308
}
310309

311-
#endif // #if !NO_XPC_SERVICES
310+
#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
312311

313312
bool Host::OpenFileInExternalEditor(const FileSpec &file_spec,
314313
uint32_t line_no) {
315-
#if NO_XPC_SERVICES
314+
#if defined(__arm__) || defined(__arm64__) || defined(__aarch64__)
316315
return false;
317316
#else
318317
// We attach this to an 'odoc' event to specify a particular selection
@@ -405,7 +404,7 @@ repeat with the_window in (get windows)\n\
405404
}
406405

407406
return true;
408-
#endif // #if !NO_XPC_SERVICES
407+
#endif // #if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
409408
}
410409

411410
Environment Host::GetEnvironment() { return Environment(*_NSGetEnviron()); }
@@ -1264,7 +1263,7 @@ static bool ShouldLaunchUsingXPC(ProcessLaunchInfo &launch_info) {
12641263
}
12651264

12661265
if (launch_info.GetFlags().Test(eLaunchFlagLaunchInTTY)) {
1267-
#if !NO_XPC_SERVICES
1266+
#if !defined(__arm__) && !defined(__arm64__) && !defined(__aarch64__)
12681267
return LaunchInNewTerminalWithAppleScript(exe_spec.GetPath().c_str(),
12691268
launch_info);
12701269
#else

0 commit comments

Comments
 (0)