-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
src: implement backtrace-on-abort for windows #16951
Conversation
src/backtrace_win32.cc
Outdated
@@ -1,8 +1,41 @@ | |||
#include "node.h" | |||
#define _WIN32_WINNT 0x0600 |
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.
@nodejs/platform-windows What’s the right way to do this? That’s basically the only question I have left here…
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.
This is actually an interesting question. We have multiple version targeting macros:
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.
(shirt-return is not the right key-chord. it's not new line, it's Submit)
- From V8
node/deps/v8/src/base/win32-headers.h
Lines 32 to 34 in 73ae2d1
#ifndef _WIN32_WINNT #define _WIN32_WINNT 0x0600 #endif
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.
(grrrr, shift-return again)
- From uv
Lines 22 to 24 in 766cd1f
#ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0502 #endif - Our:
Lines 42 to 47 in a36aa04
// This should be defined in make system. // See issue https://github.com/joyent/node/issues/1236 #if defined(__MINGW32__) || defined(_MSC_VER) #ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0501 #endif
tl;dr this should be injected by the build system, so you should ifndef
around it. Also semantically it's used for targeting a minimum platform requirements, and 0x0600
is anyway our platform minimum.
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 at my laptop rn but if it's really just ifdef'ing it feel free to push that to this branch
src/backtrace_win32.cc
Outdated
@@ -1,8 +1,41 @@ | |||
#include "node.h" | |||
#define _WIN32_WINNT 0x0600 |
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.
(grrrr, shift-return again)
- From uv
Lines 22 to 24 in 766cd1f
#ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0502 #endif - Our:
Lines 42 to 47 in a36aa04
// This should be defined in make system. // See issue https://github.com/joyent/node/issues/1236 #if defined(__MINGW32__) || defined(_MSC_VER) #ifndef _WIN32_WINNT # define _WIN32_WINNT 0x0501 #endif
tl;dr this should be injected by the build system, so you should ifndef
around it. Also semantically it's used for targeting a minimum platform requirements, and 0x0600
is anyway our platform minimum.
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.
LGTM if CI is green
@refack Please take a look at the squashed commit and see if that’s what you had in mind. I don’t think this would be semver-major because it just aligns the actual values with what our documentation says but, uh, really not enough Windows knowledge to tell that for sure. |
Landed in 7d8fe7d |
PR-URL: #16951 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Just saw this. It looks 💯 to me. |
PR-URL: #16951 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
PR-URL: #16951 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This was landed on Does it make sense to land on v6.x? If so please submit a manual backport, if not please change the label appropriately |
PR-URL: #16951 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
src