FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

build: define `NOMINMAX` in common.gypi by legendecas · Pull Request #52794 · nodejs/node · GitHub

/ node Public

build: define NOMINMAX in common.gypi - #52794

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
legendecas:addon/minmax
May 4, 2024
Merged

build: define NOMINMAX in common.gypi#52794
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
legendecas:addon/minmax

Conversation

Copy link
Copy Markdown
Member

V8 and Node.js had defined NOMINMAX on Windows for a long time. In
recent changes, V8 added std::numeric_limits::min usages in its
header files which caused addons without NOMINMAX defines failed
to compile.

Define NOMINMAX in common.gypi so that addons can be compiled with
the latest V8 header files.

NAN includes uv.h before node.h, which makes
these defines effectiveless. Nevertheless, the include order should not be
significant.

Fixes: nodejs/nan#968
Refs: nodejs/gyp-next#244

V8 and Node.js had defined `NOMINMAX` on Windows for a long time.  In
recent changes, V8 added `std::numeric_limits::min` usages in its
header files which caused addons without `NOMINMAX` defines failed
to compile.

Define `NOMINMAX` in common.gypi so that addons can be compiled with
the latest V8 header files.

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp

nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels May 2, 2024

agnat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

legendecas added the request-ci Add this label to start a Jenkins CI on a PR. label May 2, 2024
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label May 2, 2024

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

legendecas added commit-queue Add this label to land a pull request using GitHub Actions. dont-land-on-v20.x labels May 4, 2024
nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label May 4, 2024
nodejs-github-bot merged commit 8b2011a into nodejs:main May 4, 2024

Copy link
Copy Markdown
Collaborator

Landed in 8b2011a

legendecas deleted the addon/minmax branch May 4, 2024 14:42

mureinik commented May 5, 2024

Copy link
Copy Markdown
Contributor

Thanks @legendecas !

Any idea when there'll be a 22.2.0 (or even 22.1.1) release that includes this so that nan users on Windows can be unblocked?

legendecas commented May 7, 2024
edited
Loading

Copy link
Copy Markdown
Member Author

@mureinik Addons can be unblocked immediately with their own NOMINMAX definition.

I didn't find any upcoming release plan at nodejs/Release#1001. @nodejs/releasers would you mind chiming in on this? Thank you!

targos pushed a commit that referenced this pull request May 8, 2024
V8 and Node.js had defined `NOMINMAX` on Windows for a long time.  In
recent changes, V8 added `std::numeric_limits::min` usages in its
header files which caused addons without `NOMINMAX` defines failed
to compile.

Define `NOMINMAX` in common.gypi so that addons can be compiled with
the latest V8 header files.

PR-URL: #52794
Fixes: nodejs/nan#968
Refs: nodejs/gyp-next#244
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
soophoo pushed a commit to soophoo/node that referenced this pull request Jun 20, 2024
V8 and Node.js had defined `NOMINMAX` on Windows for a long time.  In
recent changes, V8 added `std::numeric_limits::min` usages in its
header files which caused addons without `NOMINMAX` defines failed
to compile.

Define `NOMINMAX` in common.gypi so that addons can be compiled with
the latest V8 header files.

PR-URL: nodejs#52794
Fixes: nodejs/nan#968
Refs: nodejs/gyp-next#244
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
codebytere added a commit to electron/electron that referenced this pull request Mar 3, 2025
codebytere added a commit to electron/electron that referenced this pull request Mar 3, 2025
codebytere added a commit to electron/electron that referenced this pull request Mar 3, 2025
codebytere added a commit to electron/electron that referenced this pull request Mar 3, 2025
jkleinsc pushed a commit to electron/electron that referenced this pull request Mar 3, 2025
build: define NOMINMAX in common.gypi

nodejs/node#52794
codebytere added a commit to electron/electron that referenced this pull request Mar 3, 2025
build: define NOMINMAX in common.gypi

nodejs/node#52794
codebytere added a commit to electron/electron that referenced this pull request Mar 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't compile simple program on Windows with Node.js 22

9 participants


Back | FazBrowse Home | New Git URL