Skip to content

build: remove redundant -fuse-linker-plugin from GCC LTO flags#62667

Open
robertsLando wants to merge 1 commit intonodejs:mainfrom
robertsLando:build-remove-fuse-linker-plugin
Open

build: remove redundant -fuse-linker-plugin from GCC LTO flags#62667
robertsLando wants to merge 1 commit intonodejs:mainfrom
robertsLando:build-remove-fuse-linker-plugin

Conversation

@robertsLando
Copy link
Copy Markdown

The -fuse-linker-plugin flag has been automatically enabled by GCC
since version 5 when LTO is active, making the explicit flag
redundant. Since Node.js requires GCC >= 13.2, this flag serves no
purpose.

Removing it also improves portability with alternative linkers (mold,
lld) that may not support GCC's linker plugin interface, avoiding
build failures when these linkers are used with GCC LTO builds.

Refs: yao-pkg/pkg#231

The `-fuse-linker-plugin` flag has been automatically enabled by GCC
since version 5 when LTO is active, making the explicit flag
redundant. Since Node.js requires GCC >= 13.2, this flag serves no
purpose.

Removing it also improves portability with alternative linkers (mold,
lld) that may not support GCC's linker plugin interface, avoiding
build failures when these linkers are used with GCC LTO builds.

Refs: yao-pkg/pkg#231
Signed-off-by: Daniel Lando <daniel.sorridi@gmail.com>
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. labels Apr 10, 2026
@richardlau richardlau added the request-ci Add this label to start a Jenkins CI on a PR. label Apr 10, 2026
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Apr 10, 2026
@nodejs-github-bot
Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants