Skip to content

Commit

Permalink
build, tools: avoid extra debug information
Browse files Browse the repository at this point in the history
Don't build intermediate executables with debug information in order to save some disk space during build.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
  • Loading branch information
rockdrilla committed Aug 8, 2023
1 parent cd1fb9d commit 46e78e0
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
30 changes: 30 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
}, # fuzz_env
{
Expand Down Expand Up @@ -1137,6 +1142,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
}, # cctest

Expand Down Expand Up @@ -1207,6 +1217,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
}, # embedtest

Expand Down Expand Up @@ -1242,6 +1257,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
]
}, # overlapped-checker
{
Expand Down Expand Up @@ -1292,6 +1312,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
]
},
{
Expand Down Expand Up @@ -1365,6 +1390,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
}, # node_mksnapshot
], # end targets
Expand Down
25 changes: 25 additions & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
'defines!': [
'BUILDING_V8_SHARED=1',
Expand Down Expand Up @@ -1570,6 +1575,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
}, # mksnapshot
{
Expand Down Expand Up @@ -1600,6 +1610,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
'defines!': [
'_HAS_EXCEPTIONS=0',
Expand Down Expand Up @@ -1651,6 +1666,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
'dependencies': [
'torque_base',
Expand Down Expand Up @@ -1700,6 +1720,11 @@
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
# Avoid extra debug information
['v8_enable_handle_zapping==0', {
'cflags': [ '-g0' ],
'ldflags': [ '-s' ],
}],
],
'sources': [
"<(V8_ROOT)/src/regexp/gen-regexp-special-case.cc",
Expand Down

0 comments on commit 46e78e0

Please sign in to comment.