summaryrefslogtreecommitdiff
path: root/node.gyp
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2018-01-23 01:17:21 +0100
committerBen Noordhuis <info@bnoordhuis.nl>2018-01-23 19:17:39 +0100
commit0b1841d83f58caa507f602144a6b7cec831f3235 (patch)
tree7fe1e14c21c9f9e72ed7a742390b95562b22775f /node.gyp
parent914538803da39ad8dc510b756ee10e331ae83b85 (diff)
downloadandroid-node-v8-0b1841d83f58caa507f602144a6b7cec831f3235.tar.gz
android-node-v8-0b1841d83f58caa507f602144a6b7cec831f3235.tar.bz2
android-node-v8-0b1841d83f58caa507f602144a6b7cec831f3235.zip
build: define NOMINMAX on windows
Build with `-DNOMINMAX` to stop `<windows.h>` from defining macros that conflict with `std::min()` and `std::max()`. PR-URL: https://github.com/nodejs/node/pull/18216 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'node.gyp')
-rw-r--r--node.gyp4
1 files changed, 4 insertions, 0 deletions
diff --git a/node.gyp b/node.gyp
index 54bdb87669..ddb8e4c15f 100644
--- a/node.gyp
+++ b/node.gyp
@@ -452,6 +452,10 @@
'FD_SETSIZE=1024',
# we need to use node's preferred "win32" rather than gyp's preferred "win"
'NODE_PLATFORM="win32"',
+ # Stop <windows.h> from defining macros that conflict with
+ # std::min() and std::max(). We don't use <windows.h> (much)
+ # but we still inherit it from uv.h.
+ 'NOMINMAX',
'_UNICODE=1',
],
'libraries': [ '-lpsapi.lib' ]