Description
Version
v17.0.0-pre
Platform
Linux b4436f7227be 4.18.0-240.10.1.el8_3.x86_64 #1 SMP Wed Dec 16 03:30:52 EST 2020 x86_64 GNU/Linux (the gcc:11 container)
Subsystem
No response
What steps will reproduce the bug?
./configure --enable-lto --ninja
ninja -C out/Release
out/Release/node -p process.versions
How often does it reproduce? Is there a required condition?
Every time
What is the expected behavior?
Node.js prints the contents of process.versions
and exits.
What do you see instead?
Contents of process.versions
is printed but the process does not exit.
Additional information
Doesn't happen with regular non-LTO builds.
I've been testing inside the gcc:11 container (following the steps in /~https://github.com/nodejs/node/blob/master/.github/workflows/daily.yml). Please note that the build is succeeds but the GitHub workflow doesn't attempt to run the built binary (or run any tests). Interestingly the repl
will exit but running scripts or tests does not.
Use of ninja
isn't the issue -- the problem replicates if building with make
.
Earlier versions of gcc can't build Node.js with LTO enabled (see #38570).
AFAICT this also occurs with the current v16.x-staging (e.g. before the V8 9.4 update). I haven't gone back any further yet.