ffmpeg: don't clobber clang build with unwrapped compiler
This is my SNAFU from 817b0e1338.
In a clang stdenv the host compiler would be the unwrapped clang,
obviously breaking things.
This has caused issues on darwin [1]. pkgsLLVM.ffmpeg-headless
seems broken, but I tested this on darwin without #531960 fix
and it did the trick.
[1]: https://github.com/NixOS/nixpkgs/pull/531960
This commit is contained in:
@@ -249,7 +249,6 @@
|
||||
celt,
|
||||
chromaprint,
|
||||
codec2,
|
||||
clang,
|
||||
dav1d,
|
||||
davs2,
|
||||
fdk_aac,
|
||||
@@ -805,6 +804,10 @@ stdenv.mkDerivation (
|
||||
"--cc=${stdenv.cc.targetPrefix}clang"
|
||||
"--cxx=${stdenv.cc.targetPrefix}clang++"
|
||||
]
|
||||
++ optionals withCudaLLVM [
|
||||
# Unwrapped compiler because it will be retargeted and used freestanding with --cuda-device-only.
|
||||
"--nvcc=${lib.getExe buildPackages.clang.cc}"
|
||||
]
|
||||
++ optionals withMetal [
|
||||
"--metalcc=${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metal"
|
||||
"--metallib=${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/metallib"
|
||||
@@ -834,7 +837,6 @@ stdenv.mkDerivation (
|
||||
++ optionals stdenv.hostPlatform.isx86 [ nasm ]
|
||||
# Texinfo version 7.1 introduced breaking changes, which older versions of ffmpeg do not handle.
|
||||
++ optionals (lib.versionAtLeast version "6") [ texinfo ]
|
||||
++ optionals withCudaLLVM [ clang.cc ]
|
||||
++ optionals withCudaNVCC [ cuda_nvcc ]
|
||||
# TODO: Clean up on `staging`.
|
||||
++ optionals stdenv.hostPlatform.isDarwin [ llvmPackages.lld ];
|
||||
|
||||
Reference in New Issue
Block a user