mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
closes bpo-31696: don't mention GCC in sys.version when building with clang (#3891)
This commit is contained in:
parent
ac317700ce
commit
7faf7e5075
2 changed files with 9 additions and 8 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
Improve compiler version information in :data:`sys.version` when Python is
|
||||||
|
built with Clang.
|
|
@ -5,15 +5,14 @@
|
||||||
|
|
||||||
#ifndef COMPILER
|
#ifndef COMPILER
|
||||||
|
|
||||||
#ifdef __GNUC__
|
// Note the __clang__ conditional has to come before the __GNUC__ one because
|
||||||
|
// clang pretends to be GCC.
|
||||||
|
#if defined(__clang__)
|
||||||
|
#define COMPILER "\n[Clang " __clang_version__ "]"
|
||||||
|
#elif defined(__GNUC__)
|
||||||
#define COMPILER "\n[GCC " __VERSION__ "]"
|
#define COMPILER "\n[GCC " __VERSION__ "]"
|
||||||
#endif
|
// Generic fallbacks.
|
||||||
|
#elif defined(__cplusplus)
|
||||||
#endif /* !COMPILER */
|
|
||||||
|
|
||||||
#ifndef COMPILER
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
|
||||||
#define COMPILER "[C++]"
|
#define COMPILER "[C++]"
|
||||||
#else
|
#else
|
||||||
#define COMPILER "[C]"
|
#define COMPILER "[C]"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue