-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Windows PlatformToolset: Provide stable C++ API to addons #6045
Comments
/cc @nodejs/platform-windows @joaocgreis? |
@saper To clear up any misunderstandings: you're suggesting to put We don't currently set it (i.e., |
Sounds reasonable to have this exposed. |
@saper I also encountered similar problems |
Fixing the I've been trying to get Given this, I don't see a pressing reason to force all users to use the same version of VS, since doing that would cause major pain to users. If we ever find some issue like the one in |
@joacgreis this is not about "fixing" |
As discussed in #7989 , we should move ahead with this and include When a mismatch is detected when building a module, there should only be a warning instead of a failure (if possible, use the correct the correct platform if available). We can change this later if we find a pressing reason. |
@nodejs/n-api ... does this need to remain open? |
This won't be a problem for modules using N-API, because all N-API exported functions are "extern C", so the ABI is unaffected by the PlatformToolset version. However I'm not sure that means this issue can be closed, because Node needs to continue supporting non-N-API modules for a long time. |
@jasongin Correct. But whenever N-API module decides to use C++ (via the wrapper or just for itself), we come back to square one and the requirement to use the same C++ compiler and runtime libraries. |
This issue has been inactive for almost a year, but I suspect the issue is still valid and not yet addressed. If anyone has information to the contrary, by all means, close this or leave a comment. I'll also ping one more possibly-relevant group: @nodejs/addon-api |
Let me check this. Even with N-API if the addon is using C++ for some other reason (wrapping C++ library) it still needs C++ compiler and the runtime environment, which should be the same as node's. |
@saper why should it be the same as Node.js' if the N-API only ever calls |
... and I build my module against Node.js 4, 5.5.0, 6, and 8. So, unless all those Node.js versions were built using the same version of the C++ compiler, which is also the same version that my module is built with, I don't think the versions have to line up. |
What is the status on this? Does this need to remain open? |
I'm going to close this out since there's basically no movement here and I can't really parse the conversation very well. If someone still feels strongly about this, do feel free to reopen but it would be good to have more information so that this conversation can move forward. |
This is a followup to #2365
When building nodejs addons it is very important to use the same C++ ABI as the original node engine installed. Currently node releases are done with Visual Studio 2013 so I'd propose we add
v120
as thePlatformToolset
.Maybe we could store the
PlatformToolset
used in theconfig.gypi
file, so that all add-ons can pick it up and configure themselves accordingly?Example of a real problem caused by this issue: sass/node-sass#1326
The text was updated successfully, but these errors were encountered: