Skip to content

Partially revert PR 42703 to fix embedding with MSVC #44842

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

Merged
merged 1 commit into from
Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion src/support/dtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 2 additions & 0 deletions src/support/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down