build: Disable libstdc++ TBB backend to avoid unnecessary dependency#14509
Merged
Ericson2314 merged 1 commit intoNixOS:masterfrom Nov 7, 2025
Merged
build: Disable libstdc++ TBB backend to avoid unnecessary dependency#14509Ericson2314 merged 1 commit intoNixOS:masterfrom
Ericson2314 merged 1 commit intoNixOS:masterfrom
Conversation
boost::concurrent_flat_map (used in libutil and libstore) includes the C++17 <execution> header. GCC's libstdc++ implements parallel algorithms using Intel TBB as the backend, which creates a link-time dependency on libtbb even though we don't actually use any parallel algorithms. Disable the TBB backend for libstdc++ by setting _GLIBCXX_USE_TBB_PAR_BACKEND=0. This makes parallel algorithms fall back to serial execution, which is acceptable since we don't use them anyway. This only affects libstdc++ (GCC's standard library); other standard libraries like libc++ (LLVM) are unaffected.
Ericson2314
approved these changes
Nov 7, 2025
|
Backport failed for Please cherry-pick the changes locally and resolve any conflicts. git fetch origin 2.31-maintenance
git worktree add -d .worktree/backport-14509-to-2.31-maintenance origin/2.31-maintenance
cd .worktree/backport-14509-to-2.31-maintenance
git switch --create backport-14509-to-2.31-maintenance
git cherry-pick -x 2f3ec16793b4ad029254be1ae25e7824ec0c1a71 |
|
Successfully created backport PR for |
uninsane
added a commit
to uninsane/nix
that referenced
this pull request
Dec 8, 2025
NixOS#14509 configured meson to not use any onetbb features. nixpkgs exposes an option to blake3 to remove onetbb from the runtime closure as well, so enable that.
uninsane
added a commit
to uninsane/nix
that referenced
this pull request
Dec 8, 2025
NixOS#14509 configured meson to not use any onetbb features. nixpkgs exposes an option to blake3 to remove onetbb from the runtime closure as well, so enable that. Co-authored-by: Philip Taron <philip.taron@gmail.com>
uninsane
added a commit
to uninsane/nix
that referenced
this pull request
Dec 8, 2025
NixOS#14509 configured meson to not use any onetbb features. nixpkgs exposes an option to blake3 to remove onetbb from the runtime closure as well, so enable that. Co-authored-by: Philip Taron <philip.taron@gmail.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
boost::concurrent_flat_map (used in libutil and libstore) includes the C++17 header. GCC's libstdc++ implements parallel algorithms using Intel TBB as the backend, which creates a link-time dependency on libtbb even though we don't actually use any parallel algorithms.
Disable the TBB backend for libstdc++ by setting
_GLIBCXX_USE_TBB_PAR_BACKEND=0. This makes parallel algorithms fall back to serial execution, which is acceptable since we don't use them anyway.
This only affects libstdc++ (GCC's standard library); other standard libraries like libc++ (LLVM) are unaffected.
Motivation
Context
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.