endif()
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
-check_cxx_compiler_flag(-faligned-new COMPILER_SUPPORTS_F_ALIGNED_NEW)
-
#----------------------------------------
# Detect and set platform variable names
# - for non-windows build platform & architecture is detected using inbuilt CMAKE variables and cross target component configure
# 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)
else()
- add_compile_options(-fstack-protector-strong)
+ check_cxx_compiler_flag(-fstack-protector-strong COMPILER_SUPPORTS_F_STACK_PROTECTOR_STRONG)
+ if (COMPILER_SUPPORTS_F_STACK_PROTECTOR_STRONG)
+ add_compile_options(-fstack-protector-strong)
+ endif()
endif(CLR_CMAKE_PLATFORM_DARWIN)
# Contracts are disabled on UNIX.
else()
add_compile_options(-Wno-unused-but-set-variable)
add_compile_options(-Wno-unknown-pragmas)
+ check_cxx_compiler_flag(-faligned-new COMPILER_SUPPORTS_F_ALIGNED_NEW)
if (COMPILER_SUPPORTS_F_ALIGNED_NEW)
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-faligned-new>)
endif()
PALIMPORT
BOOL
PALAPI
-PAL_IsDebuggerPresent(VOID);
+PAL_IsDebuggerPresent();
/* minimum signed 64 bit value */
#define _I64_MIN (I64(-9223372036854775807) - 1)
PALIMPORT
int
PALAPI
-PAL_InitializeDLL(
- VOID);
+PAL_InitializeDLL();
PALIMPORT
void
PALIMPORT
BOOL
PALAPI
-PAL_NotifyRuntimeStarted(VOID);
+PAL_NotifyRuntimeStarted();
#ifdef __APPLE__
PALIMPORT
PALIMPORT
UINT
PALAPI
-GetConsoleOutputCP(
- VOID);
+GetConsoleOutputCP();
PALIMPORT
DWORD
PALIMPORT
DWORD
PALAPI
-GetCurrentProcessId(
- VOID);
+GetCurrentProcessId();
PALIMPORT
DWORD
PALAPI
-GetCurrentSessionId(
- VOID);
+GetCurrentSessionId();
PALIMPORT
HANDLE
PALAPI
-GetCurrentProcess(
- VOID);
+GetCurrentProcess();
PALIMPORT
DWORD
PALAPI
-GetCurrentThreadId(
- VOID);
+GetCurrentThreadId();
PALIMPORT
size_t
PALAPI
-PAL_GetCurrentOSThreadId(
- VOID);
+PAL_GetCurrentOSThreadId();
// To work around multiply-defined symbols in the Carbon framework.
#define GetCurrentThread PAL_GetCurrentThread
PALIMPORT
HANDLE
PALAPI
-GetCurrentThread(
- VOID);
+GetCurrentThread();
#define STARTF_USESTDHANDLES 0x00000100
PALIMPORT
BOOL
PALAPI
-SwitchToThread(
- VOID);
+SwitchToThread();
#define DEBUG_PROCESS 0x00000001
#define DEBUG_ONLY_THIS_PROCESS 0x00000002
PALIMPORT
PVOID
PALAPI
-PAL_GetStackBase(VOID);
+PAL_GetStackBase();
PALIMPORT
PVOID
PALAPI
-PAL_GetStackLimit(VOID);
+PAL_GetStackLimit();
PALIMPORT
DWORD
PALAPI
-PAL_GetLogicalCpuCountFromOS(VOID);
+PAL_GetLogicalCpuCountFromOS();
PALIMPORT
DWORD
PALAPI
-PAL_GetTotalCpuCount(VOID);
+PAL_GetTotalCpuCount();
PALIMPORT
size_t
PALAPI
-PAL_GetRestrictedPhysicalMemoryLimit(VOID);
+PAL_GetRestrictedPhysicalMemoryLimit();
PALIMPORT
BOOL
PALIMPORT
size_t
PALAPI
-PAL_GetLogicalProcessorCacheSizeFromOS(VOID);
+PAL_GetLogicalProcessorCacheSizeFromOS();
typedef BOOL(*UnwindReadMemoryCallback)(PVOID address, PVOID buffer, SIZE_T size);
PALIMPORT
HANDLE
PALAPI
-GetProcessHeap(
- VOID);
+GetProcessHeap();
#define HEAP_ZERO_MEMORY 0x00000008
PALIMPORT
VOID
PALAPI
-DebugBreak(
- VOID);
+DebugBreak();
PALIMPORT
DWORD
PALIMPORT
LPWSTR
PALAPI
-GetEnvironmentStringsW(
- VOID);
+GetEnvironmentStringsW();
#ifdef UNICODE
#define GetEnvironmentStrings GetEnvironmentStringsW
PALIMPORT
DWORD
PALAPI
-GetTickCount(
- VOID);
+GetTickCount();
PALIMPORT
ULONGLONG
PALAPI
-GetTickCount64(VOID);
+GetTickCount64();
PALIMPORT
BOOL
inline
VOID
PALAPI
-MemoryBarrier(
- VOID)
+MemoryBarrier()
{
__sync_synchronize();
}
inline
VOID
PALAPI
-YieldProcessor(
- VOID)
+YieldProcessor()
{
#if defined(_X86_) || defined(_AMD64_)
__asm__ __volatile__(
PALIMPORT
DWORD
PALAPI
-GetCurrentProcessorNumber(VOID);
+GetCurrentProcessorNumber();
/*++
Function:
PALIMPORT
BOOL
PALAPI
-PAL_HasGetCurrentProcessorNumber(VOID);
+PAL_HasGetCurrentProcessorNumber();
#define FORMAT_MESSAGE_ALLOCATE_BUFFER 0x00000100
#define FORMAT_MESSAGE_IGNORE_INSERTS 0x00000200
PALIMPORT
DWORD
PALAPI
-GetLastError(
- VOID);
+GetLastError();
PALIMPORT
VOID
PALIMPORT
LPWSTR
PALAPI
-GetCommandLineW(
- VOID);
+GetCommandLineW();
#ifdef UNICODE
#define GetCommandLine GetCommandLineW
PALIMPORT
VOID
PALAPI
-FlushProcessWriteBuffers(VOID);
+FlushProcessWriteBuffers();
typedef void (*PAL_ActivationFunction)(CONTEXT *context);
typedef BOOL (*PAL_SafeActivationCheckFunction)(SIZE_T ip, BOOL checkingCurrentThread);
PALIMPORT
VOID
PALAPI
-PAL_EnableProcessProfile(VOID);
+PAL_EnableProcessProfile();
PALIMPORT
VOID
PALAPI
-PAL_DisableProcessProfile(VOID);
+PAL_DisableProcessProfile();
PALIMPORT
BOOL
PALAPI
-PAL_IsProcessProfileEnabled(VOID);
+PAL_IsProcessProfileEnabled();
PALIMPORT
INT64
PALAPI
-PAL_GetCpuTickCount(VOID);
+PAL_GetCpuTickCount();
#endif // PAL_PERF
/******************* PAL functions for SIMD extensions *****************/