Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build, deps, tools: avoid excessive LTO #47313

Merged
merged 1 commit into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions deps/openssl/openssl-cli.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,9 @@
],
},
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}
4 changes: 4 additions & 0 deletions deps/openssl/openssl.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@
}, {
'includes': ['./openssl-cl_asm.gypi'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
]
}, {
# openssl-fipsmodule target
Expand Down
20 changes: 20 additions & 0 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -966,6 +966,10 @@
[ 'OS!="linux" or ossfuzz!="true"', {
'type': 'none',
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # fuzz_env
{
Expand Down Expand Up @@ -1067,6 +1071,10 @@
'Ws2_32.lib',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # cctest

Expand Down Expand Up @@ -1120,6 +1128,10 @@
'Ws2_32.lib',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # embedtest

Expand All @@ -1138,6 +1150,10 @@
'test/overlapped-checker/main_unix.c'
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
]
}, # overlapped-checker
{
Expand Down Expand Up @@ -1194,6 +1210,10 @@
'Ws2_32.lib',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # node_mksnapshot
], # end targets
Expand Down
24 changes: 24 additions & 0 deletions tools/icu/icu-generic.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,12 @@
'<@(icu_src_derb)',
'no-op.cc',
],
'conditions': [
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
# This tool is used to rebuild res_index.res manifests
{
Expand All @@ -439,6 +445,12 @@
'iculslocs.cc',
'no-op.cc',
],
'conditions': [
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
# This tool is used to package, unpackage, repackage .dat files
# and convert endianesses
Expand All @@ -451,6 +463,12 @@
'<@(icu_src_icupkg)',
'no-op.cc',
],
'conditions': [
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
# this is used to convert .dat directly into .obj
{
Expand All @@ -462,6 +480,12 @@
'<@(icu_src_genccode)',
'no-op.cc',
],
'conditions': [
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
],
}
4 changes: 4 additions & 0 deletions tools/v8_gypfiles/d8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
'<(icu_gyp_path):icudata',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
},
],
Expand Down
24 changes: 24 additions & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1397,6 +1397,10 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'defines!': [
'BUILDING_V8_SHARED=1',
Expand Down Expand Up @@ -1441,6 +1445,10 @@
'<(_msvs_precompiled_source)',
],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
}, # mksnapshot
{
Expand All @@ -1454,6 +1462,10 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'defines!': [
'_HAS_EXCEPTIONS=0',
Expand Down Expand Up @@ -1488,6 +1500,10 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'dependencies': [
'torque_base',
Expand Down Expand Up @@ -1520,6 +1536,10 @@
['want_separate_host_toolset', {
'toolsets': ['host'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'sources': [
"<(V8_ROOT)/src/regexp/gen-regexp-special-case.cc",
Expand All @@ -1536,6 +1556,10 @@
}, {
'dependencies': ['gen-regexp-special-case#target'],
}],
# Avoid excessive LTO
['enable_lto=="true"', {
'ldflags': [ '-fno-lto' ],
}],
],
'actions': [
{
Expand Down