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

Unix arm64 atomics #71512

Merged
merged 10 commits into from
Jul 7, 2022
4 changes: 4 additions & 0 deletions eng/native/configurecompiler.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,10 @@ if (CLR_CMAKE_HOST_UNIX)
if(CLR_CMAKE_HOST_OSX OR CLR_CMAKE_HOST_MACCATALYST)
# We cannot enable "stack-protector-strong" on OS X due to a bug in clang compiler (current version 7.0.2)
add_compile_options(-fstack-protector)
if(CLR_CMAKE_HOST_UNIX_ARM64)
# For OSX-Arm64, LSE instructions are enabled by default
add_definitions(-DLSE_INSTRUCTIONS_ENABLED_BY_DEFAULT)
endif(CLR_CMAKE_HOST_UNIX_ARM64)
elseif(NOT CLR_CMAKE_HOST_BROWSER)
check_c_compiler_flag(-fstack-protector-strong COMPILER_SUPPORTS_F_STACK_PROTECTOR_STRONG)
if (COMPILER_SUPPORTS_F_STACK_PROTECTOR_STRONG)
Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/debug/createdump/datatarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@

#include "createdump.h"

#if defined(HOST_ARM64)
// Flag to check if atomics feature is available on
// the machine
bool g_arm64_atomics_present = false;
#endif

DumpDataTarget::DumpDataTarget(CrashInfo& crashInfo) :
m_ref(1),
m_crashInfo(crashInfo)
Expand Down
7 changes: 7 additions & 0 deletions src/coreclr/dlls/mscordbi/mscordbi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@ extern BOOL WINAPI DbgDllMain(HINSTANCE hInstance, DWORD dwReason,
//*****************************************************************************
extern "C"
#ifdef TARGET_UNIX

#if defined(HOST_ARM64)
// Flag to check if atomics feature is available on
// the machine
bool g_arm64_atomics_present = false;
#endif

DLLEXPORT // For Win32 PAL LoadLibrary emulation
#endif
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
Expand Down
Loading