mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-28 02:40:50 +00:00
onetbb: never treat warnings as fatal
onetbb often triggers compiler warnings upstream, and works around them in an ad-hoc, per version manner:88482f5f1abdbec20606we encountered this failing while preparing for a gcc 16 upgrade in Nixpkgs, and the same issue came up for gcc 15 and similar (#446139). it is likely to come up again, as -Werror is extremely susceptible to compiler and library changes (though onetbb admittedly has few dependencies). additionally, while it may be useful for upstream onetbb, it seems to provide little value to us downstream; we just end up working around it. thus, we never treat warnings as errors by disabling upstream's cmake flag for this purpose.
This commit is contained in:
@@ -76,6 +76,9 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
|
||||
cmakeFlags = [
|
||||
(lib.cmakeBool "TBB_DISABLE_HWLOC_AUTOMATIC_SEARCH" false)
|
||||
# Treating compiler errors as warnings creates churn each compiler update,
|
||||
# and provides little utility to us downstream.
|
||||
(lib.cmakeBool "TBB_STRICT" false)
|
||||
(lib.cmakeBool "TBB_TEST" finalAttrs.finalPackage.doCheck)
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
@@ -83,10 +86,6 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
];
|
||||
|
||||
env = {
|
||||
# Fix build with modern gcc
|
||||
# In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
|
||||
NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isGNU "-Wno-error=stringop-overflow";
|
||||
|
||||
# Fix undefined reference errors with version script under LLVM.
|
||||
NIX_LDFLAGS = lib.optionalString (
|
||||
stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17"
|
||||
|
||||
Reference in New Issue
Block a user