Skip to content

Commit d1c6375

Browse files
committed
build, tools: avoid extra debug information
Don't build intermediate executables with debug information in order to save some disk space during build. Signed-off-by: Konstantin Demin <[email protected]>
1 parent d8750cc commit d1c6375

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

node.gyp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,6 +1008,11 @@
10081008
'ldflags': [ '-fno-profile' ],
10091009
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
10101010
}, ],
1011+
# Avoid extra debug information
1012+
['v8_enable_handle_zapping==0', {
1013+
'cflags': [ '-g0' ],
1014+
'ldflags': [ '-s' ],
1015+
}],
10111016
],
10121017
}, # fuzz_env
10131018
{
@@ -1128,6 +1133,11 @@
11281133
'ldflags': [ '-fno-profile' ],
11291134
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
11301135
}, ],
1136+
# Avoid extra debug information
1137+
['v8_enable_handle_zapping==0', {
1138+
'cflags': [ '-g0' ],
1139+
'ldflags': [ '-s' ],
1140+
}],
11311141
],
11321142
}, # cctest
11331143

@@ -1198,6 +1208,11 @@
11981208
'ldflags': [ '-fno-profile' ],
11991209
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
12001210
}, ],
1211+
# Avoid extra debug information
1212+
['v8_enable_handle_zapping==0', {
1213+
'cflags': [ '-g0' ],
1214+
'ldflags': [ '-s' ],
1215+
}],
12011216
],
12021217
}, # embedtest
12031218

@@ -1233,6 +1248,11 @@
12331248
'ldflags': [ '-fno-profile' ],
12341249
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
12351250
}, ],
1251+
# Avoid extra debug information
1252+
['v8_enable_handle_zapping==0', {
1253+
'cflags': [ '-g0' ],
1254+
'ldflags': [ '-s' ],
1255+
}],
12361256
]
12371257
}, # overlapped-checker
12381258
{
@@ -1283,6 +1303,11 @@
12831303
'ldflags': [ '-fno-profile' ],
12841304
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
12851305
}, ],
1306+
# Avoid extra debug information
1307+
['v8_enable_handle_zapping==0', {
1308+
'cflags': [ '-g0' ],
1309+
'ldflags': [ '-s' ],
1310+
}],
12861311
]
12871312
},
12881313
{
@@ -1356,6 +1381,11 @@
13561381
'ldflags': [ '-fno-profile' ],
13571382
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
13581383
}, ],
1384+
# Avoid extra debug information
1385+
['v8_enable_handle_zapping==0', {
1386+
'cflags': [ '-g0' ],
1387+
'ldflags': [ '-s' ],
1388+
}],
13591389
],
13601390
}, # node_mksnapshot
13611391
], # end targets

tools/v8_gypfiles/v8.gyp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1515,6 +1515,11 @@
15151515
'ldflags': [ '-fno-profile' ],
15161516
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
15171517
}, ],
1518+
# Avoid extra debug information
1519+
['v8_enable_handle_zapping==0', {
1520+
'cflags': [ '-g0' ],
1521+
'ldflags': [ '-s' ],
1522+
}],
15181523
],
15191524
'defines!': [
15201525
'BUILDING_V8_SHARED=1',
@@ -1570,6 +1575,11 @@
15701575
'ldflags': [ '-fno-profile' ],
15711576
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
15721577
}, ],
1578+
# Avoid extra debug information
1579+
['v8_enable_handle_zapping==0', {
1580+
'cflags': [ '-g0' ],
1581+
'ldflags': [ '-s' ],
1582+
}],
15731583
],
15741584
}, # mksnapshot
15751585
{
@@ -1600,6 +1610,11 @@
16001610
'ldflags': [ '-fno-profile' ],
16011611
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
16021612
}, ],
1613+
# Avoid extra debug information
1614+
['v8_enable_handle_zapping==0', {
1615+
'cflags': [ '-g0' ],
1616+
'ldflags': [ '-s' ],
1617+
}],
16031618
],
16041619
'defines!': [
16051620
'_HAS_EXCEPTIONS=0',
@@ -1651,6 +1666,11 @@
16511666
'ldflags': [ '-fno-profile' ],
16521667
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
16531668
}, ],
1669+
# Avoid extra debug information
1670+
['v8_enable_handle_zapping==0', {
1671+
'cflags': [ '-g0' ],
1672+
'ldflags': [ '-s' ],
1673+
}],
16541674
],
16551675
'dependencies': [
16561676
'torque_base',
@@ -1700,6 +1720,11 @@
17001720
'ldflags': [ '-fno-profile' ],
17011721
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
17021722
}, ],
1723+
# Avoid extra debug information
1724+
['v8_enable_handle_zapping==0', {
1725+
'cflags': [ '-g0' ],
1726+
'ldflags': [ '-s' ],
1727+
}],
17031728
],
17041729
'sources': [
17051730
"<(V8_ROOT)/src/regexp/gen-regexp-special-case.cc",

0 commit comments

Comments
 (0)