Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
build, deps, tools: avoid excessive PGO
Don't build intermediate executables with PGO in order to speed up
overall build time.

Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
  • Loading branch information
rockdrilla committed Aug 8, 2023
commit a9d391dd9e977401ed999b886ba86e1e76e821a6
13 changes: 13 additions & 0 deletions deps/openssl/openssl-cli.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,18 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
}
13 changes: 13 additions & 0 deletions deps/openssl/openssl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
},
],
Expand Down
78 changes: 78 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1126,6 +1126,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
}, # fuzz_env
{
Expand Down Expand Up @@ -1233,6 +1246,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
}, # cctest

Expand Down Expand Up @@ -1293,6 +1319,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
}, # embedtest

Expand All @@ -1315,6 +1354,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
]
}, # overlapped-checker

Expand Down Expand Up @@ -1381,6 +1433,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
}, # mkcodecache
{
Expand Down Expand Up @@ -1436,6 +1501,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
}, # node_mksnapshot
], # end targets
Expand Down
52 changes: 52 additions & 0 deletions tools/icu/icu-generic.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
},
# This tool is used to rebuild res_index.res manifests
Expand All @@ -451,6 +464,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
},
# This tool is used to package, unpackage, repackage .dat files
Expand All @@ -469,6 +495,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
},
# this is used to convert .dat directly into .obj
Expand All @@ -486,6 +525,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
},
],
Expand Down
13 changes: 13 additions & 0 deletions tools/v8_gypfiles/d8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
},
],
Expand Down
65 changes: 65 additions & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1381,6 +1381,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
'defines!': [
'BUILDING_V8_SHARED=1',
Expand Down Expand Up @@ -1421,6 +1434,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
}, # mksnapshot
{
Expand All @@ -1438,6 +1464,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
'defines!': [
'_HAS_EXCEPTIONS=0',
Expand Down Expand Up @@ -1476,6 +1515,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
'dependencies': [
'torque_base',
Expand Down Expand Up @@ -1512,6 +1564,19 @@
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
# Avoid excessive PGO
['enable_pgo_generate=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-generate' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-generate' ],
}, ],
['enable_pgo_use=="true"', {
'cflags': [ '-fno-profile' ],
'cflags!': [ '-fprofile-use -fprofile-correction' ],
'ldflags': [ '-fno-profile' ],
'ldflags!': [ '-fprofile-use -fprofile-correction' ],
}, ],
],
'sources': [
"<(V8_ROOT)/src/regexp/gen-regexp-special-case.cc",
Expand Down