[v24.x backport] build,win: replace LTCG with Thin LTO for releases - #66170
StefanStojanovic wants to merge 1 commit into
Conversation
PR-URL: nodejs#63114 Refs: nodejs#61964 Reviewed-By: Michaël Zasso <targos@protonmail.com> Signed-off-by: StefanStojanovic <stefan.stojanovic@janeasystems.com>
|
Review requested:
|
I'm a little worried about addons and the breakage that occurred with Node.js 26 when LTO was enabled.
While nodejs/node-gyp#3331 has fixed that, it was fixed in node-gyp@13 and AFAIK that is not yet in npm (or at least not in a version of npm that is in Node.js 26/24). |
|
Thanks for the feedback @richardlau. I remember the node-gyp issue, but as you said, it is fixed, and there is a workaround: updating node-gyp. Since this wasn't a blocker for v26, I didn't think it would be for v24 either. Although v24 is an LTS, v26 is not there yet, so maybe that makes it harder to backport this? |
|
I naturally lean towards not knowingly breaking users on a release line. While the user could manually update node-gyp, it's not exactly trivial to do so. cc @nodejs/releasers thoughts? |
This effectively backports enabling thin LTO for Windows releases on v24. This has been enabled on v26 since version 26.3.0 and has been stable. It includes 2 PRs previously landed on main. The main one, and a follow-up. I have tested this in the release CI in this custom build and it works.
One more thing to add here: PGO changes were already backported to v24 earlier, and with my latest release CI changes, they will be effectively from the next release. It would be good to have both enabled in time for the next release, and merging this backport will do just that.
cc @nodejs/releasers, @nodejs/platform-windows.