From 2af0051c894aac4d1a9d6479ad6dd7547a688363 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Wed, 21 Aug 2024 21:34:08 -0700 Subject: [PATCH] Delete check for old PowerPC Rosetta from CoreCLR PAL (#106763) --- src/coreclr/pal/src/init/pal.cpp | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/src/coreclr/pal/src/init/pal.cpp b/src/coreclr/pal/src/init/pal.cpp index a51feb390b44c..44c3d15e92fb1 100644 --- a/src/coreclr/pal/src/init/pal.cpp +++ b/src/coreclr/pal/src/init/pal.cpp @@ -127,21 +127,6 @@ static BOOL INIT_SharedFilesPath(void); extern void PROCDumpThreadList(void); #endif -#if defined(__APPLE__) -static bool RunningNatively() -{ - int ret = 0; - size_t sz = sizeof(ret); - if (sysctlbyname("sysctl.proc_native", &ret, &sz, nullptr, 0) != 0) - { - // if the sysctl failed, we'll assume this OS does not support - // binary translation - so we must be running natively. - return true; - } - return ret != 0; -} -#endif // __APPLE__ - /*++ Function: PAL_Initialize @@ -328,14 +313,6 @@ Initialize( /*Firstly initiate a lastError */ SetLastError(ERROR_GEN_FAILURE); -#ifdef __APPLE__ - if (!RunningNatively()) - { - SetLastError(ERROR_BAD_FORMAT); - goto exit; - } -#endif // __APPLE__ - CriticalSectionSubSysInitialize(); if(nullptr == init_critsec) @@ -740,9 +717,6 @@ Initialize( ASSERT("returning failure, but last error not set\n"); } -#ifdef __APPLE__ -exit : -#endif // __APPLE__ LOGEXIT("PAL_Initialize returns int %d\n", retval); return retval; }