Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building CoreCLR for iOS/tvOS simulator #98127

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
017f8af
Make it possible to compile CoreCLR on iOS-like platforms with './bui…
filipnavara Jul 25, 2023
684d601
Build the singlefilehost even if we don't currently use it
filipnavara Jul 29, 2023
5cc117b
Make coreclrhost.h compatible v C(not++)
filipnavara Jul 29, 2023
ff2af8a
Fix TargetOS::IsMacOS
filipnavara Jul 29, 2023
24a5a44
WIP: AppleAppBuilder support for CoreCLR
filipnavara Jul 29, 2023
968031f
Make the sample app working: dotnet publish src/mono/sample/iOS/Progr…
filipnavara Jul 29, 2023
1530eba
Cleanup
filipnavara Jul 29, 2023
f9b31b2
Update src/tasks/AppleAppBuilder/AppleAppBuilder.csproj
filipnavara Jul 29, 2023
eaed19b
Use sys_icache_invalidate for all iOS-like platforms
filipnavara Jul 31, 2023
970f34c
Consolidate macOS-only entrypoints in a single #if block
filipnavara Jul 31, 2023
cf686b6
Apply feedback
filipnavara Jul 31, 2023
bd7eaac
Fix jitinterface cross-build
filipnavara Jul 31, 2023
1a34be8
Infer AppleAppBuilderRuntime from UseMonoRuntime and UseNativeAOTRuntime
filipnavara Jul 31, 2023
209a762
Minor changes to test infrastructure
filipnavara Jul 31, 2023
a9778ce
Add basic documentation
filipnavara Jul 31, 2023
f58daa1
Add nearly complete support for building runtime tests
filipnavara Jul 31, 2023
91c2b2e
Fix building seh-unwind with older iOS SDK
filipnavara Jul 31, 2023
1ef8005
Use enum for TargetRuntime in AppleAppBuilder
filipnavara Aug 1, 2023
bdd5119
Fix LibraryBuilder build
filipnavara Aug 1, 2023
d7aa597
Cleanup
filipnavara Sep 2, 2023
f8c704b
Fix after rebase
filipnavara Feb 7, 2024
337751b
Revert accidental change
filipnavara Feb 7, 2024
bb0cde3
Fix tvOS build
filipnavara Feb 7, 2024
8d293e1
Drop CoreCLR tvOS Simulator support for now
filipnavara Apr 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions docs/workflow/building/coreclr/ios.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Cross Compilation for iOS Simulator on macOS

## Requirements

Build requirements are the same as for building native CoreCLR on macOS. iPhone SDK has to be enabled in Xcode installation.

## Cross compiling CoreCLR

Build the runtime pack and tools with

```
./build.sh clr+clr.runtime+libs+packs -os [iossimulator/maccatalyst] -arch [x64/arm64] -cross -c Release
```

## Running the sample iOS app

Build and run the sample app with

```
./dotnet.sh publish src/mono/sample/iOS/Program.csproj -c Release /p:TargetOS=iossimulator /p:TargetArchitecture=arm64 /p:DeployAndRun=true /p:UseMonoRuntime=false /p:RunAOTCompilation=false /p:MonoForceInterpreter=false
```

The command also produces an XCode project that can be opened with `open ./src/mono/sample/iOS/bin/iossimulator-arm64/Bundle/HelloiOS/HelloiOS.xcodeproj` and debugged in Xcode.

## Running the runtime tests

Build the runtime tests with

```
./src/tests/build.sh -os iossimulator arm64 Release -p:UseMonoRuntime=false
```

Running the tests is not implemented yet. It will likely need similar app bundle infrastructure as NativeAOT/iOS uses.
6 changes: 3 additions & 3 deletions eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
</PropertyGroup>

<PropertyGroup>
<RuntimeFlavor Condition="'$(TargetsMobile)' == 'true' and !$(_subset.Contains('+clr.nativeaotlibs+'))">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="('$(TargetsMobile)' == 'true' or '$(TargetsLinuxBionic)' == 'true') and $(_subset.Contains('+clr.nativeaotlibs+'))">CoreCLR</RuntimeFlavor>
<RuntimeFlavor Condition="('$(TargetsMobile)' == 'true' or '$(TargetsLinuxBionic)' == 'true') and ($(_subset.Contains('+clr.nativeaotlibs+')) or $(_subset.Contains('+clr.runtime+')))">CoreCLR</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and '$(TargetsMobile)' == 'true'">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == '' and ($(_subset.Contains('+mono+')) or $(_subset.Contains('+mono.runtime+'))) and (!$(_subset.Contains('+clr+')) and !$(_subset.Contains('+clr.runtime+')))">Mono</RuntimeFlavor>
<RuntimeFlavor Condition="'$(RuntimeFlavor)' == ''">$(PrimaryRuntimeFlavor)</RuntimeFlavor>
</PropertyGroup>
Expand All @@ -65,7 +65,7 @@
<DefaultCoreClrSubsets>clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools+host.native</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets Condition="'$(PackageRID)' == 'linux-armel'">clr.native+linuxdac+clr.corelib+clr.tools+clr.nativecorelib+clr.packages+clr.nativeaotlibs+clr.crossarchtools</DefaultCoreClrSubsets>
<!-- Even on platforms that do not support the CoreCLR runtime, we still want to build ilasm/ildasm. -->
<DefaultCoreClrSubsets Condition="'$(PrimaryRuntimeFlavor)' != 'CoreCLR'">clr.iltools+clr.packages</DefaultCoreClrSubsets>
<DefaultCoreClrSubsets Condition="'$(RuntimeFlavor)' != 'CoreCLR'">clr.iltools+clr.packages</DefaultCoreClrSubsets>

<DefaultNativeAotSubsets>clr.alljits+clr.tools+clr.nativeaotlibs+clr.nativeaotruntime</DefaultNativeAotSubsets>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</ItemGroup>

<ItemGroup>
<PackageFile Include="$(RuntimeBinDir)R2RDump\ILCompiler.Reflection.ReadyToRun.dll">
<PackageFile Include="$(RuntimeBinDir)ILCompiler.Reflection.ReadyToRun.dll">
<TargetPath>\lib\netstandard2.0\</TargetPath>
</PackageFile>
<Dependency Include="System.Reflection.Metadata">
Expand Down
23 changes: 14 additions & 9 deletions src/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if(CORECLR_SET_RPATH)
set(MACOSX_RPATH ON)
endif(CORECLR_SET_RPATH)

if(CLR_CMAKE_HOST_MACCATALYST OR CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS)
if(CLR_CMAKE_HOST_TVOS)
set(FEATURE_STANDALONE_GC 0)
endif()

Expand Down Expand Up @@ -101,8 +101,10 @@ if(CLR_CMAKE_HOST_UNIX)
add_linker_flag(-Wl,-z,notext)
endif()

if(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)
if(NOT CLR_CMAKE_HOST_TVOS)
add_subdirectory(pal)
endif()
if(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)
add_subdirectory(hosts)
endif()
else()
Expand All @@ -125,7 +127,7 @@ add_subdirectory(pal/prebuilt/inc)
set(EP_GENERATED_HEADER_PATH "${GENERATED_INCLUDE_DIR}")
include (${CLR_SRC_NATIVE_DIR}/eventpipe/configure.cmake)

if(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)
if(NOT CLR_CMAKE_HOST_TVOS)
add_subdirectory(debug/debug-pal)
endif()

Expand Down Expand Up @@ -242,12 +244,12 @@ if(CLR_CMAKE_HOST_UNIX)
add_subdirectory(nativeresources)
endif(CLR_CMAKE_HOST_UNIX)

if(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)
if(NOT CLR_CMAKE_HOST_TVOS)
add_subdirectory(utilcode)
add_subdirectory(inc)

if(CLR_CMAKE_HOST_UNIX)
add_subdirectory(palrt)
add_subdirectory(palrt)
endif(CLR_CMAKE_HOST_UNIX)

add_subdirectory(ilasm)
Expand All @@ -260,15 +262,18 @@ if(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_H
add_subdirectory(binder)
add_subdirectory(classlibnative)
add_subdirectory(dlls)
add_subdirectory(tools)
add_subdirectory(unwinder)
add_subdirectory(interop)
endif()

if(CLR_CMAKE_HOST_WIN32)
add_subdirectory(hosts)
endif(CLR_CMAKE_HOST_WIN32)
if(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)
add_subdirectory(tools)
endif(NOT CLR_CMAKE_HOST_MACCATALYST AND NOT CLR_CMAKE_HOST_IOS AND NOT CLR_CMAKE_HOST_TVOS)

if(CLR_CMAKE_HOST_WIN32)
add_subdirectory(hosts)
endif(CLR_CMAKE_HOST_WIN32)

#----------------------------------------------------
# Cross target Component install configuration
#----------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/debug/daccess/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ target_link_libraries(daccess PRIVATE cdacreader_api)

add_dependencies(daccess eventing_headers)

if(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS)
if(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_APPLE)
add_definitions(-DUSE_DAC_TABLE_RVA)

set(args $<$<NOT:$<BOOL:${CLR_CMAKE_HOST_OSX}>>:--dynamic> $<TARGET_FILE:coreclr> ${GENERATED_INCLUDE_DIR}/dactablerva.h)
set(args $<$<NOT:$<BOOL:${CLR_CMAKE_HOST_APPLE}>>:--dynamic> $<TARGET_FILE:coreclr> ${GENERATED_INCLUDE_DIR}/dactablerva.h)

add_custom_command(
OUTPUT ${GENERATED_INCLUDE_DIR}/dactablerva.h
Expand All @@ -72,4 +72,4 @@ if(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS)
)

add_dependencies(daccess dactablerva_header)
endif(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS)
endif(CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_APPLE)
4 changes: 2 additions & 2 deletions src/coreclr/dlls/mscordac/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ else(CLR_CMAKE_HOST_WIN32)
# Add dependency on export file
add_custom_target(mscordaccore_exports DEPENDS ${EXPORTS_FILE})

if(CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_HAIKU)
if(CLR_CMAKE_HOST_APPLE OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_HAIKU)
generate_exports_file(${DEF_SOURCES} ${EXPORTS_FILE})
endif(CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_HAIKU)
endif(CLR_CMAKE_HOST_APPLE OR CLR_CMAKE_HOST_FREEBSD OR CLR_CMAKE_HOST_NETBSD OR CLR_CMAKE_HOST_SUNOS OR CLR_CMAKE_HOST_HAIKU)

if(CORECLR_SET_RPATH AND CLR_CMAKE_HOST_OSX AND CLR_CMAKE_HOST_ARCH_ARM64)
set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON)
Expand Down
3 changes: 3 additions & 0 deletions src/coreclr/dlls/mscoree/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ endif(CLR_CMAKE_TARGET_WIN32)

# add the install targets
install_clr(TARGETS coreclr DESTINATIONS . sharedFramework COMPONENT runtime)
if(CLR_CMAKE_HOST_MACCATALYST OR CLR_CMAKE_HOST_IOS)
install_clr(TARGETS coreclr_static DESTINATIONS . sharedFramework COMPONENT runtime)
endif()

# Enable profile guided optimization
add_pgo(coreclr)
6 changes: 6 additions & 0 deletions src/coreclr/hosts/inc/coreclrhost.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,15 @@
// For each hosting API, we define a function prototype and a function pointer
// The prototype is useful for implicit linking against the dynamic coreclr
// library and the pointer for explicit dynamic loading (dlopen, LoadLibrary)
#ifdef __cplusplus
#define CORECLR_HOSTING_API(function, ...) \
extern "C" int CORECLR_CALLING_CONVENTION function(__VA_ARGS__); \
typedef int (CORECLR_CALLING_CONVENTION *function##_ptr)(__VA_ARGS__)
#else
#define CORECLR_HOSTING_API(function, ...) \
int CORECLR_CALLING_CONVENTION function(__VA_ARGS__); \
typedef int (CORECLR_CALLING_CONVENTION *function##_ptr)(__VA_ARGS__)
#endif

//
// Initialize the CoreCLR. Creates and starts CoreCLR host and creates an app domain
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/inc/crosscomp.h
Original file line number Diff line number Diff line change
Expand Up @@ -686,9 +686,9 @@ typedef struct _T_KNONVOLATILE_CONTEXT_POINTERS {

#if defined(TARGET_OSX) && defined(TARGET_X86)
#define DAC_CS_NATIVE_DATA_SIZE 76
#elif defined(TARGET_OSX) && defined(TARGET_AMD64)
#elif defined(TARGET_APPLE) && defined(TARGET_AMD64)
#define DAC_CS_NATIVE_DATA_SIZE 120
#elif defined(TARGET_OSX) && defined(TARGET_ARM64)
#elif defined(TARGET_APPLE) && defined(TARGET_ARM64)
#define DAC_CS_NATIVE_DATA_SIZE 120
#elif defined(TARGET_FREEBSD) && defined(TARGET_X86)
#define DAC_CS_NATIVE_DATA_SIZE 12
Expand Down
4 changes: 2 additions & 2 deletions src/coreclr/inc/executableallocator.h
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class ExecutableWriterHolder

void Unmap()
{
#if defined(HOST_OSX) && defined(HOST_ARM64) && !defined(DACCESS_COMPILE)
#if defined(HOST_APPLE) && defined(HOST_ARM64) && !defined(DACCESS_COMPILE)
if (m_addressRX != NULL)
{
PAL_JitWriteProtect(false);
Expand Down Expand Up @@ -321,7 +321,7 @@ class ExecutableWriterHolder
ExecutableWriterHolder(T* addressRX, size_t size, ExecutableAllocator::CacheableMapping cacheMapping = ExecutableAllocator::AddToCache)
{
m_addressRX = addressRX;
#if defined(HOST_OSX) && defined(HOST_ARM64)
#if defined(HOST_APPLE) && defined(HOST_ARM64)
m_addressRW = addressRX;
PAL_JitWriteProtect(true);
#else
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/targetosarch.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class TargetOS
static bool OSSettingConfigured;
static bool IsApplePlatform;
#else
#if defined(TARGET_OSX)
#if defined(TARGET_APPLE)
static const bool IsApplePlatform = true;
#else
static const bool IsApplePlatform = false;
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ set(JIT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
# Creates a static library "clrjit_static" to link into the VM.
add_subdirectory(static)

if (CLR_CMAKE_TARGET_OSX)
if (CLR_CMAKE_TARGET_APPLE)
set(TARGET_OS_NAME unix_osx)
elseif (CLR_CMAKE_TARGET_UNIX)
set(TARGET_OS_NAME unix)
Expand Down
36 changes: 18 additions & 18 deletions src/coreclr/minipal/Unix/doublemapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#endif // TARGET_LINUX && !MFD_CLOEXEC
#include "minipal.h"

#if defined(TARGET_OSX) && defined(TARGET_AMD64)
#if defined(TARGET_APPLE) && defined(TARGET_AMD64)
#include <mach/mach.h>
#include <sys/sysctl.h>

Expand All @@ -35,21 +35,21 @@ bool IsProcessTranslated()
}
return ret == 1;
}
#endif // TARGET_OSX && TARGET_AMD64
#endif // TARGET_APPLE && TARGET_AMD64

#ifndef TARGET_OSX
#ifndef TARGET_APPLE

#ifdef TARGET_64BIT
static const off_t MaxDoubleMappedSize = 2048ULL*1024*1024*1024;
#else
static const off_t MaxDoubleMappedSize = UINT_MAX;
#endif

#endif // TARGET_OSX
#endif // TARGET_APPLE

bool VMToOSInterface::CreateDoubleMemoryMapper(void** pHandle, size_t *pMaxExecutableCodeSize)
{
#ifndef TARGET_OSX
#ifndef TARGET_APPLE

#ifdef TARGET_FREEBSD
int fd = shm_open(SHM_ANON, O_RDWR | O_CREAT, S_IRWXU);
Expand All @@ -76,7 +76,7 @@ bool VMToOSInterface::CreateDoubleMemoryMapper(void** pHandle, size_t *pMaxExecu

*pMaxExecutableCodeSize = MaxDoubleMappedSize;
*pHandle = (void*)(size_t)fd;
#else // !TARGET_OSX
#else // !TARGET_APPLE

#ifdef TARGET_AMD64
if (IsProcessTranslated())
Expand All @@ -88,21 +88,21 @@ bool VMToOSInterface::CreateDoubleMemoryMapper(void** pHandle, size_t *pMaxExecu

*pMaxExecutableCodeSize = SIZE_MAX;
*pHandle = NULL;
#endif // !TARGET_OSX
#endif // !TARGET_APPLE

return true;
}

void VMToOSInterface::DestroyDoubleMemoryMapper(void *mapperHandle)
{
#ifndef TARGET_OSX
#ifndef TARGET_APPLE
close((int)(size_t)mapperHandle);
#endif
}

extern "C" void* PAL_VirtualReserveFromExecutableMemoryAllocatorWithinRange(const void* lpBeginAddress, const void* lpEndAddress, size_t dwSize, int fStoreAllocationInfo);

#ifdef TARGET_OSX
#ifdef TARGET_APPLE
bool IsMapJitFlagNeeded()
{
static volatile int isMapJitFlagNeeded = -1;
Expand Down Expand Up @@ -133,7 +133,7 @@ bool IsMapJitFlagNeeded()

return (bool)isMapJitFlagNeeded;
}
#endif // TARGET_OSX
#endif // TARGET_APPLE

void* VMToOSInterface::ReserveDoubleMappedMemory(void *mapperHandle, size_t offset, size_t size, const void *rangeStart, const void* rangeEnd)
{
Expand All @@ -147,7 +147,7 @@ void* VMToOSInterface::ReserveDoubleMappedMemory(void *mapperHandle, size_t offs
}

void* result = PAL_VirtualReserveFromExecutableMemoryAllocatorWithinRange(rangeStart, rangeEnd, size, 0 /* fStoreAllocationInfo */);
#ifndef TARGET_OSX
#ifndef TARGET_APPLE
if (result != NULL)
{
// Map the shared memory over the range reserved from the executable memory allocator.
Expand All @@ -158,15 +158,15 @@ void* VMToOSInterface::ReserveDoubleMappedMemory(void *mapperHandle, size_t offs
result = NULL;
}
}
#endif // TARGET_OSX
#endif // TARGET_APPLE

// For requests with limited range, don't try to fall back to reserving at any address
if ((result != NULL) || !isUnlimitedRange)
{
return result;
}

#ifndef TARGET_OSX
#ifndef TARGET_APPLE
result = mmap(NULL, size, PROT_NONE, MAP_SHARED, fd, offset);
#else
int mmapFlags = MAP_ANON | MAP_PRIVATE;
Expand Down Expand Up @@ -196,28 +196,28 @@ void *VMToOSInterface::CommitDoubleMappedMemory(void* pStart, size_t size, bool

bool VMToOSInterface::ReleaseDoubleMappedMemory(void *mapperHandle, void* pStart, size_t offset, size_t size)
{
#ifndef TARGET_OSX
#ifndef TARGET_APPLE
int fd = (int)(size_t)mapperHandle;
if (mmap(pStart, size, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_FIXED, fd, offset) == MAP_FAILED)
{
return false;
}
memset(pStart, 0, size);
#endif // TARGET_OSX
#endif // TARGET_APPLE
return munmap(pStart, size) != -1;
}

void* VMToOSInterface::GetRWMapping(void *mapperHandle, void* pStart, size_t offset, size_t size)
{
#ifndef TARGET_OSX
#ifndef TARGET_APPLE
int fd = (int)(size_t)mapperHandle;
void* result = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, offset);
if (result == MAP_FAILED)
{
result = NULL;
}
return result;
#else // TARGET_OSX
#else // TARGET_APPLE
#ifdef TARGET_AMD64
vm_address_t startRW;
vm_prot_t curProtection, maxProtection;
Expand All @@ -242,7 +242,7 @@ void* VMToOSInterface::GetRWMapping(void *mapperHandle, void* pStart, size_t off
assert(false);
return NULL;
#endif // TARGET_AMD64
#endif // TARGET_OSX
#endif // TARGET_APPLE
}

bool VMToOSInterface::ReleaseRWMapping(void* pStart, size_t size)
Expand Down
Loading
Loading