Skip to content

Commit aba6361

Browse files
committed
C++ 20 changes for Node 24
1 parent 78ca29a commit aba6361

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

binding.gyp

+26-18
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,28 @@
11
{
2-
"targets": [
3-
{
4-
"target_name": "sentry_cpu_profiler",
5-
"sources": [ "bindings/cpu_profiler.cc" ],
6-
# Silence gcc8 deprecation warning https://github.com/nodejs/nan/issues/807#issuecomment-455750192
7-
"cflags": ["-Wno-cast-function-type"]
8-
},
9-
],
10-
'conditions': [
11-
[ 'OS=="win"', {
12-
'defines': [
13-
# Stop <windows.h> from defining macros that conflict with
14-
# std::min() and std::max(). We don't use <windows.h> (much)
15-
# but we still inherit it from uv.h.
16-
'NOMINMAX',
17-
]
18-
}],
19-
],
2+
"targets": [
3+
{
4+
"target_name": "sentry_cpu_profiler",
5+
"sources": ["bindings/cpu_profiler.cc"],
6+
# Silence gcc8 deprecation warning https://github.com/nodejs/nan/issues/807#issuecomment-455750192
7+
"cflags": ["-Wno-cast-function-type"],
8+
"msvs_settings": {"VCCLCompilerTool": {"LanguageStandard": "stdcpp20"}},
9+
"xcode_settings": {"CLANG_CXX_LANGUAGE_STANDARD": "c++20"},
10+
"cflags!": ["-fno-exceptions"],
11+
"cflags_cc!": ["-fno-exceptions"],
12+
"conditions": [['OS!="win"', {"cflags_cc": ["-std=c++20"]}]],
13+
},
14+
],
15+
"conditions": [
16+
[
17+
'OS=="win"',
18+
{
19+
"defines": [
20+
# Stop <windows.h> from defining macros that conflict with
21+
# std::min() and std::max(). We don't use <windows.h> (much)
22+
# but we still inherit it from uv.h.
23+
"NOMINMAX",
24+
]
25+
},
26+
],
27+
],
2028
}

0 commit comments

Comments
 (0)