diff --git a/src/support/dtypes.h b/src/support/dtypes.h index 2df897c7ba554..9e3e17015e135 100644 --- a/src/support/dtypes.h +++ b/src/support/dtypes.h @@ -116,7 +116,13 @@ # define NOINLINE_DECL(f) f __attribute__((noinline)) #endif -#if defined(__GNUC__) +#ifdef _COMPILER_MICROSOFT_ +# ifdef _P64 +# define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) __declspec(align(8)) x +# else +# define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) __declspec(align(4)) x +# endif +#elif defined(__GNUC__) # define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) x __attribute__ ((aligned (sizeof(void*)))) #else # define JL_ATTRIBUTE_ALIGN_PTRSIZE(x) diff --git a/src/support/platform.h b/src/support/platform.h index bb960f54d3c4e..cf65fa01423fe 100644 --- a/src/support/platform.h +++ b/src/support/platform.h @@ -37,6 +37,8 @@ #define _COMPILER_CLANG_ #elif defined(__GNUC__) #define _COMPILER_GCC_ +#elif defined(_MSC_VER) +#define _COMPILER_MICROSOFT_ #else #error Unsupported compiler #endif