mirror of https://github.com/python/cpython
gh-88267: Avoid DLL exporting functions from static builds on Windows(GH-99888)
This commit is contained in:
parent
748c6c0921
commit
3c5355496b
|
@ -2,9 +2,15 @@
|
|||
#define Py_EXPORTS_H
|
||||
|
||||
#if defined(_WIN32) || defined(__CYGWIN__)
|
||||
#if defined(Py_ENABLE_SHARED)
|
||||
#define Py_IMPORTED_SYMBOL __declspec(dllimport)
|
||||
#define Py_EXPORTED_SYMBOL __declspec(dllexport)
|
||||
#define Py_LOCAL_SYMBOL
|
||||
#else
|
||||
#define Py_IMPORTED_SYMBOL
|
||||
#define Py_EXPORTED_SYMBOL
|
||||
#define Py_LOCAL_SYMBOL
|
||||
#endif
|
||||
#else
|
||||
/*
|
||||
* If we only ever used gcc >= 5, we could use __has_attribute(visibility)
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Avoid exporting Python symbols in linked Windows applications when the core is built as static.
|
Loading…
Reference in New Issue