Skip to content

Commit

Permalink
FLUXUI-34161 [AppleTV] Migrate Flutter from 3.0.5 to 3.3.0 version Ap…
Browse files Browse the repository at this point in the history
…pleTV
  • Loading branch information
AndreiKulbeda authored and Epam-EPik-dev committed Jul 13, 2023
1 parent 8d5b878 commit 4d9e1b8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
8 changes: 8 additions & 0 deletions runtime/bin/process_macos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ class ExitCodeHandler {
running_ = false;

// Fork to wake up waitpid.
#if !(defined(TARGET_OS_TV) && TARGET_OS_TV)
if (TEMP_FAILURE_RETRY(fork()) == 0) {
_Exit(0);
}
#endif

monitor_->Notify();

Expand Down Expand Up @@ -300,6 +302,7 @@ class ProcessStarter {
}

int Start() {
#if !(defined(TARGET_OS_TV) && TARGET_OS_TV)
// Create pipes required.
int err = CreatePipes();
if (err != 0) {
Expand Down Expand Up @@ -389,6 +392,7 @@ class ProcessStarter {
ASSERT(exec_control_[1] == -1);

*id_ = pid;
#endif
return 0;
}

Expand Down Expand Up @@ -447,6 +451,7 @@ class ProcessStarter {
}

void ExecProcess() {
#if !(defined(TARGET_OS_TV) && TARGET_OS_TV)
if (mode_ == kNormal) {
if (TEMP_FAILURE_RETRY(dup2(write_out_[0], STDIN_FILENO)) == -1) {
ReportChildError();
Expand Down Expand Up @@ -479,9 +484,11 @@ class ProcessStarter {

execvp(path_, const_cast<char* const*>(program_arguments_));
ReportChildError();
#endif
}

void ExecDetachedProcess() {
#if !(defined(TARGET_OS_TV) && TARGET_OS_TV)
if (mode_ == kDetached) {
ASSERT(write_out_[0] == -1);
ASSERT(write_out_[1] == -1);
Expand Down Expand Up @@ -545,6 +552,7 @@ class ProcessStarter {
// to prevent deadlocks.
_Exit(0);
}
#endif
}

int RegisterProcess(pid_t pid) {
Expand Down
2 changes: 1 addition & 1 deletion runtime/platform/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
// Define the flavor of Mac OS we are running on.
#include <TargetConditionals.h>
#define DART_HOST_OS_MACOS 1
#if TARGET_OS_IPHONE
#if defined(TARGET_OS_IPHONE) || defined(TARGET_OS_TV)
#define DART_HOST_OS_IOS 1
#endif

Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/compiler/ffi/abi.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ static_assert(offsetof(AbiAlignmentUint64, i) == 8,
#elif defined(DART_TARGET_OS_LINUX)
#define DART_TARGET_OS_NAME Linux
#elif defined(DART_TARGET_OS_MACOS)
#if DART_TARGET_OS_MACOS_IOS
#if defined(DART_TARGET_OS_MACOS_IOS) || defined(TARGET_OS_TV)
#define DART_TARGET_OS_NAME IOS
#else
#define DART_TARGET_OS_NAME MacOS
Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/cpu_arm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ DEFINE_FLAG(bool,
"Use integer division instruction if supported");

#if defined(TARGET_HOST_MISMATCH)
#if defined(DART_TARGET_OS_ANDROID) || defined(DART_TARGET_OS_MACOS_IOS)
#if defined(DART_TARGET_OS_ANDROID) || defined(DART_TARGET_OS_MACOS_IOS) || defined(TARGET_OS_TV)
DEFINE_FLAG(bool, sim_use_hardfp, false, "Use the hardfp ABI.");
#else
DEFINE_FLAG(bool, sim_use_hardfp, true, "Use the hardfp ABI.");
Expand Down

0 comments on commit 4d9e1b8

Please sign in to comment.