continuwuity-bsd/freebsd/files/patch-continuwuity_vendor_rust-librocksdb-sys_build.rs

42 lines
1.8 KiB
Rust

--- continuwuity/vendor/rust-librocksdb-sys/build.rs.orig 2026-06-17 16:05:01 UTC
+++ continuwuity/vendor/rust-librocksdb-sys/build.rs
@@ -123,25 +123,6 @@ impl Backend {
/// Decide the backend and emit any needed link directives for the
/// system path. Vendored compilation is deferred to [`vendor::build`].
fn resolve(target: &Target) -> Self {
- // Highest priority: explicit "force compile" override. FreeBSD
- // can't build RocksDB from these submodule sources, so the
- // combination is rejected up front rather than failing midway
- // through a long C++ compile.
- if env_truthy("ROCKSDB_COMPILE") {
- if target.os == "freebsd" {
- panic!(
- "ROCKSDB_COMPILE=1 is not supported on FreeBSD: the \
- bundled RocksDB sources don't build on FreeBSD. \
- Unset ROCKSDB_COMPILE and let the build script link \
- against the system RocksDB (install via `pkg install \
- rocksdb`)."
- );
- }
- return Backend::Vendored {
- include: vendored_include(),
- };
- }
-
// Opt-in pkg-config probe.
if env_truthy("ROCKSDB_USE_PKG_CONFIG") {
return system::probe_pkg_config();
@@ -150,13 +131,6 @@ impl Backend {
// Explicit lib-dir override.
if env::var_os("ROCKSDB_LIB_DIR").is_some() {
return system::from_lib_dir_env();
- }
-
- // FreeBSD historically can't build RocksDB from these submodule
- // sources (see PR #908). Fall through to the system library at the
- // platform's conventional location.
- if target.os == "freebsd" {
- return system::from_freebsd_defaults();
}
// Default: build vendored.