Skip to content

Commit

Permalink
llvm: use static version of zstd when built on static platform
Browse files Browse the repository at this point in the history
  • Loading branch information
SaltyKitkat committed Jun 21, 2023
1 parent 7e0e77d commit 1552eba
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/development/compilers/llvm/15/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,11 @@ in stdenv.mkDerivation (rec {
# file and doesn't link zlib as well.
# https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
"-DLLVM_ENABLE_LIBXML2=OFF"
] ++ optionals enableZstd [
# We can use this option to make llvm to use static version of zstd.
#
# This option was backported to LLVM 15: https://github.com/llvm/llvm-project/commit/4bd3f3759259548e159aeba5c76efb9a0864e6fa
"-DLLVM_USE_STATIC_ZSTD=${toString stdenv.hostPlatform.isStatic}"
] ++ optionals enableManpages [
"-DLLVM_BUILD_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
Expand Down
3 changes: 3 additions & 0 deletions pkgs/development/compilers/llvm/16/llvm/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,9 @@ in
# file and doesn't link zlib as well.
# https://github.com/ClangBuiltLinux/tc-build/issues/150#issuecomment-845418812
"-DLLVM_ENABLE_LIBXML2=OFF"
] ++ optionals enableZstd [
# Since llvm 16, we can use this option to make llvm to use static version of zstd.
"-DLLVM_USE_STATIC_ZSTD=${toString stdenv.hostPlatform.isStatic}"
] ++ optionals enableManpages [
"-DLLVM_BUILD_DOCS=ON"
"-DLLVM_ENABLE_SPHINX=ON"
Expand Down

0 comments on commit 1552eba

Please sign in to comment.