Completely disable rust build for FreeBSD

This commit is contained in:
Raúl Marín 2024-04-10 12:39:44 +02:00
parent 9d8ce0a5f1
commit 20458b3e69
2 changed files with 18 additions and 17 deletions

View File

@ -1,3 +1,21 @@
if (OS_FREEBSD)
# Right nix/libc requires fspacectl and it had been added only since FreeBSD14.
# And since sysroot has older libraries you will got undefined reference for clickhouse binary.
#
# But likely everything should work without this syscall, however it is not
# possible right now to gently override libraries versions for dependencies,
# and forking rust modules is a little bit too much for this thing.
#
# You can take a look at the details in the following issue [1].
#
# [1]: https://github.com/rust-lang/cargo/issues/5640
#
# Update 2024-04: Now prql also requires getrandom() via std::sys::pal::unix::rand::imp::getrandom_fill_bytes
message(STATUS "Rust build is disabled for FreeBSD because we use old sysroot files")
return()
endif()
# NOTE: should be macro to export RUST_CXXFLAGS/RUST_CFLAGS for subfolders
macro(configure_rustc)
# NOTE: this can also be done by overriding rustc, but it not trivial with rustup.

View File

@ -37,23 +37,6 @@ clickhouse_import_crate(MANIFEST_PATH Cargo.toml)
target_include_directories(_ch_rust_prql INTERFACE prql/include)
add_library(ch_rust::prql ALIAS _ch_rust_prql)
if (OS_FREEBSD)
# Right nix/libc requires fspacectl and it had been added only since FreeBSD14.
# And since sysroot has older libraries you will got undefined reference for clickhouse binary.
#
# But likely everything should work without this syscall, however it is not
# possible right now to gently override libraries versions for dependencies,
# and forking rust modules is a little bit too much for this thing.
#
# You can take a look at the details in the following issue [1].
#
# [1]: https://github.com/rust-lang/cargo/issues/5640
#
message(STATUS "skim is disabled for FreeBSD")
return()
endif()
target_include_directories(_ch_rust_skim_rust INTERFACE skim/include)
add_library(ch_rust::skim ALIAS _ch_rust_skim_rust)