-
-
Notifications
You must be signed in to change notification settings - Fork 32k
GH-107585: fix the stable API .lib file name in debug builds on MSVC #107761
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
base: main
Are you sure you want to change the base?
Conversation
FFY00
commented
Aug 8, 2023
•
edited by bedevere-bot
Loading
edited by bedevere-bot
- Issue: Windows + MSVC: using debug + limited API does not inject a pragma to link to python3_d.lib #107585
… MSVC Signed-off-by: Filipe Laíns <[email protected]>
Signed-off-by: Filipe Laíns <[email protected]>
Would it be simpler just to enumerate all the cases and stick with complete strings? Rather than doing the concatenation tricks and potentially invading the macro namespace? At the very least, we should use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely don't want to use preprocessor variables without a _Py_
prefix.
It might be possible to use a single multiline #pragma comment
to avoid having to create variables at all, though that'll make it harder to search for this bit of code (which I know people do when they hit link errors).
Also, this code has changed recently for nogil, so it'll need reworking to account for the extra set of names.
@@ -307,13 +307,19 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */ | |||
/* So MSVC users need not specify the .lib | |||
file in their Makefile (other compilers are | |||
generally taken care of by distutils.) */ | |||
# if defined(Py_LIMITED_API) | |||
# define PINNED_VER "3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_Py_
prefixes on the variables, please.
# if defined(Py_LIMITED_API) | ||
# define PINNED_VER "3" | ||
# else | ||
# define PINNED_VER "313" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure exactly how the release manager finds these variables to update them, but we might need to update some of their docs/tools for this change.
When you're done making the requested changes, leave the comment: |