Skip to content

Commit 6c1f5e8

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 <rockdrilla@gmail.com>
1 parent 510a3da commit 6c1f5e8

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

node.gyp

+25
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,11 @@
12201220
'ldflags': [ '-fno-profile' ],
12211221
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
12221222
}, ],
1223+
# Avoid extra debug information
1224+
['v8_enable_handle_zapping==0', {
1225+
'cflags': [ '-g0' ],
1226+
'ldflags': [ '-s' ],
1227+
}],
12231228
],
12241229
}, # fuzz_env
12251230
{
@@ -1340,6 +1345,11 @@
13401345
'ldflags': [ '-fno-profile' ],
13411346
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
13421347
}, ],
1348+
# Avoid extra debug information
1349+
['v8_enable_handle_zapping==0', {
1350+
'cflags': [ '-g0' ],
1351+
'ldflags': [ '-s' ],
1352+
}],
13431353
],
13441354
}, # cctest
13451355

@@ -1413,6 +1423,11 @@
14131423
'ldflags': [ '-fno-profile' ],
14141424
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
14151425
}, ],
1426+
# Avoid extra debug information
1427+
['v8_enable_handle_zapping==0', {
1428+
'cflags': [ '-g0' ],
1429+
'ldflags': [ '-s' ],
1430+
}],
14161431
],
14171432
}, # embedtest
14181433

@@ -1448,6 +1463,11 @@
14481463
'ldflags': [ '-fno-profile' ],
14491464
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
14501465
}, ],
1466+
# Avoid extra debug information
1467+
['v8_enable_handle_zapping==0', {
1468+
'cflags': [ '-g0' ],
1469+
'ldflags': [ '-s' ],
1470+
}],
14511471
]
14521472
}, # overlapped-checker
14531473
{
@@ -1521,6 +1541,11 @@
15211541
'ldflags': [ '-fno-profile' ],
15221542
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
15231543
}, ],
1544+
# Avoid extra debug information
1545+
['v8_enable_handle_zapping==0', {
1546+
'cflags': [ '-g0' ],
1547+
'ldflags': [ '-s' ],
1548+
}],
15241549
],
15251550
}, # node_mksnapshot
15261551
], # end targets

tools/v8_gypfiles/v8.gyp

+25
Original file line numberDiff line numberDiff line change
@@ -1418,6 +1418,11 @@
14181418
'ldflags': [ '-fno-profile' ],
14191419
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
14201420
}, ],
1421+
# Avoid extra debug information
1422+
['v8_enable_handle_zapping==0', {
1423+
'cflags': [ '-g0' ],
1424+
'ldflags': [ '-s' ],
1425+
}],
14211426
],
14221427
'defines!': [
14231428
'BUILDING_V8_SHARED=1',
@@ -1479,6 +1484,11 @@
14791484
'ldflags': [ '-fno-profile' ],
14801485
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
14811486
}, ],
1487+
# Avoid extra debug information
1488+
['v8_enable_handle_zapping==0', {
1489+
'cflags': [ '-g0' ],
1490+
'ldflags': [ '-s' ],
1491+
}],
14821492
],
14831493
}, # mksnapshot
14841494
{
@@ -1509,6 +1519,11 @@
15091519
'ldflags': [ '-fno-profile' ],
15101520
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
15111521
}, ],
1522+
# Avoid extra debug information
1523+
['v8_enable_handle_zapping==0', {
1524+
'cflags': [ '-g0' ],
1525+
'ldflags': [ '-s' ],
1526+
}],
15121527
],
15131528
'defines!': [
15141529
'_HAS_EXCEPTIONS=0',
@@ -1560,6 +1575,11 @@
15601575
'ldflags': [ '-fno-profile' ],
15611576
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
15621577
}, ],
1578+
# Avoid extra debug information
1579+
['v8_enable_handle_zapping==0', {
1580+
'cflags': [ '-g0' ],
1581+
'ldflags': [ '-s' ],
1582+
}],
15631583
],
15641584
'dependencies': [
15651585
'torque_base',
@@ -1609,6 +1629,11 @@
16091629
'ldflags': [ '-fno-profile' ],
16101630
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
16111631
}, ],
1632+
# Avoid extra debug information
1633+
['v8_enable_handle_zapping==0', {
1634+
'cflags': [ '-g0' ],
1635+
'ldflags': [ '-s' ],
1636+
}],
16121637
],
16131638
'sources': [
16141639
"<(V8_ROOT)/src/regexp/gen-regexp-special-case.cc",

0 commit comments

Comments
 (0)