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 8b9cc63 commit b8c1210
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
25 changes: 25 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,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 @@ -1340,6 +1345,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 @@ -1413,6 +1423,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 @@ -1448,6 +1463,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 @@ -1521,6 +1541,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 @@ -1418,6 +1418,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 @@ -1479,6 +1484,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 @@ -1509,6 +1519,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 @@ -1560,6 +1575,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 @@ -1609,6 +1629,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 b8c1210

Please sign in to comment.