nixpkgs/pkgs/development/tools/misc/netcoredbg/darwin.patch
Konrad Malik e34328aa3a
netcoredbg: 2.0.0-895 -> 2.2.0-961
* arm64.patch for compilation on aarch64-*
* darwin.patch for properly detecting possible arm64 darwin architectures
* coreclr is now in dotnet/runtime repo (using 7.x branch as per netcoredbg recommendation)
* netcoredbg now depends (during runtime) on DbgShim which was moved to a separate repo (dotnet/diagnostic). We need to pass -p:UseDbgShimDependency=true in order to include it in a list of deps.
* needed to enable selfContainedBuild for the managed part since it seems like it's the easiest way to force dotnet to copy relevant binaries to the out folder as well (like libdbgshim.so retrieved via the abovementioned nuget dependency)
* use autoPatchelfHook to add stdenv.cc.cc.lib to binaries
2023-03-07 11:28:44 +01:00

17 lines
646 B
Diff

diff --git a/detectplatform.cmake b/detectplatform.cmake
index 7b93bbf..6fa6e9e 100644
--- a/detectplatform.cmake
+++ b/detectplatform.cmake
@@ -56,7 +56,11 @@ endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
set(CLR_CMAKE_PLATFORM_UNIX 1)
- set(CLR_CMAKE_PLATFORM_UNIX_AMD64 1)
+ if(CMAKE_SYSTEM_PROCESSOR STREQUAL arm64)
+ set(CLR_CMAKE_PLATFORM_UNIX_ARM64 1)
+ else()
+ set(CLR_CMAKE_PLATFORM_UNIX_AMD64 1)
+ endif()
set(CLR_CMAKE_PLATFORM_DARWIN 1)
if(CMAKE_VERSION VERSION_LESS "3.4.0")
set(CMAKE_ASM_COMPILE_OBJECT "${CMAKE_C_COMPILER} <FLAGS> <DEFINES> -o <OBJECT> -c <SOURCE>")