File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -17,13 +17,21 @@ extern "C" {
1717
1818// Macros to burn global values in custom sections so out-of-process
1919// profilers can locate them easily.
20- #define GENERATE_DEBUG_SECTION (name , declaration ) \
21- _GENERATE_DEBUG_SECTION_WINDOWS(name) \
22- _GENERATE_DEBUG_SECTION_APPLE(name) \
23- declaration \
24- _GENERATE_DEBUG_SECTION_LINUX(name)
2520
26- #if defined(MS_WINDOWS ) && !defined(__clang__ )
21+ // MSVC+Clang has a bug where it declares it twice.
22+ #if defined(MS_WINDOWS ) && defined(__clang__ )
23+ # define GENERATE_DEBUG_SECTION (name , declaration ) \
24+ _GENERATE_DEBUG_SECTION_WINDOWS(name)
25+ #else
26+ // Everything else
27+ # define GENERATE_DEBUG_SECTION (name , declaration ) \
28+ _GENERATE_DEBUG_SECTION_WINDOWS(name) \
29+ _GENERATE_DEBUG_SECTION_APPLE(name) \
30+ declaration \
31+ _GENERATE_DEBUG_SECTION_LINUX(name)
32+ #endif
33+
34+ #if defined(MS_WINDOWS )
2735#define _GENERATE_DEBUG_SECTION_WINDOWS (name ) \
2836 _Pragma(Py_STRINGIFY(section(Py_STRINGIFY(name), read, write))) \
2937 __declspec(allocate(Py_STRINGIFY(name)))
You can’t perform that action at this time.
0 commit comments