Merge pull request #282382 from SomeoneSerge/fix/tests-cuda-eval

cudaPackages.cuda_nvcc: don't inspect the cc wrapper
This commit is contained in:
Someone 2024-01-21 01:44:59 +00:00 committed by GitHub
commit 21788cb7ef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 31 deletions

View File

@ -19,34 +19,6 @@ let
assertCondition = true;
in
/*
# We should use libstdc++ at least as new as nixpkgs' stdenv's one.
assert let
cxxStdlibCuda = cudaStdenv.cc.cxxStdlib.package;
cxxStdlibNixpkgs = stdenv.cc.cxxStdlib.package;
# Expose the C++ standard library we're using. See the comments on "General
# libc++ support". This is also relevant when using older gcc than the
# stdenv's, as may be required e.g. by CUDAToolkit's nvcc.
cxxStdlib = libcxx:
let
givenLibcxx = libcxx != null && (libcxx.isLLVM or false);
givenGccForLibs = libcxx != null && !(libcxx.isLLVM or false) && (libcxx.isGNU or false);
libcxx_solib = "${lib.getLib libcxx}/lib";
in
if (!givenLibcxx) && givenGccForLibs then
{ kind = "libstdc++"; package = libcxx; solib = libcxx_solib; }
else if givenLibcxx then
{ kind = "libc++"; package = libcxx; solib = libcxx_solib;}
else
# We're probably using the `libstdc++` that came with our `gcc`.
# TODO: this is maybe not always correct?
# TODO: what happens when `nativeTools = true`?
{ kind = "libstdc++"; package = cc; solib = cc_solib; }
;
in
((stdenv.cc.cxxStdlib.kind or null) == "libstdc++")
-> lib.versionAtLeast cxxStdlibCuda.version cxxStdlibNixpkgs.version;
*/
/* TODO: Consider testing whether we in fact use the newer libstdc++ */
lib.extendDerivation assertCondition passthruExtra cudaStdenv

View File

@ -112,7 +112,6 @@ attrsets.filterAttrs (attr: _: (builtins.hasAttr attr prev)) {
useCcForLibs = true;
gccForLibs = ccForLibs-wrapper.cc;
};
cxxStdlibDir = ccForLibs-wrapper.cxxStdlib.solib or (throw "necessary to fix CI");
in
{
@ -149,7 +148,6 @@ attrsets.filterAttrs (attr: _: (builtins.hasAttr attr prev)) {
# Fix a compatible backend compiler
PATH += ${lib.getBin cc}/bin:
LIBRARIES += "-L${cxxStdlibDir}/lib"
# Expose the split-out nvvm
LIBRARIES =+ -L''${!outputBin}/nvvm/lib