Skip to content

Commit

Permalink
Add AMD64 to sys config so msvccompiler get_build_version works
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexpux authored and lazka committed Jul 19, 2023
1 parent 7af446f commit f74deea
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Python/getcompiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,22 @@
#if defined(__clang__)
#define COMPILER "[Clang " __clang_version__ "]"
#elif defined(__GNUC__)
#define COMPILER "[GCC " __VERSION__ "]"
/* To not break compatibility with things that determine
CPU arch by calling get_build_version in msvccompiler.py
(such as NumPy) add "32 bit" or "64 bit (AMD64)" on Windows
and also use a space as a separator rather than a newline. */
#if defined(_WIN32)
#define COMP_SEP " "
#if defined(__x86_64__)
#define ARCH_SUFFIX " 64 bit (AMD64)"
#else
#define ARCH_SUFFIX " 32 bit"
#endif
#else
#define COMP_SEP "\n"
#define ARCH_SUFFIX ""
#endif
#define COMPILER COMP_SEP "[GCC " __VERSION__ ARCH_SUFFIX "]"
// Generic fallbacks.
#elif defined(__cplusplus)
#define COMPILER "[C++]"
Expand Down

0 comments on commit f74deea

Please sign in to comment.