llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.92k stars 11.52k forks source link

Support building zstd in tree #106010

Open keith opened 2 weeks ago

keith commented 2 weeks ago

Currently for zstd support we search for a shared or static version of the zstd library. This works great in many cases, but in some cases that zstd might have compatibility issues.

For one when producing macOS binaries the zstd that you're likely to use is one installed via homebrew. Homebrew doesn't set a minimum macOS version for the things it builds, so by default the built zstd ends up targeting the current macOS version. This conflicts with us trying to produce binaries that support older macOS versions and could potentially cause runtime crashes.

This would also potentially allow folks to build with zstd even without having it installed.

I believe doing this would also fix this type of issue:

I imagine this could be another option in the current zstd configuration, although it's possible the current configuration could be replaced by this instead if that was preferred.

keith commented 2 weeks ago

@MaskRay definitely interested in your take on this