Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(libsql-ffi): dead code #122

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions libsql-ffi/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,18 +463,6 @@ mod bindings {
}
}

// Are we generating the bundled bindings? Used to avoid emitting things
// that would be problematic in bundled builds. This env var is set by
// `upgrade.sh`.
fn generating_bundled_bindings() -> bool {
// Hacky way to know if we're generating the bundled bindings
println!("cargo:rerun-if-env-changed=LIBSQLITE3_SYS_BUNDLING");
match std::env::var("LIBSQLITE3_SYS_BUNDLING") {
Ok(v) => v != "0",
Err(_) => false,
}
}

pub fn write_to_out_dir(header: HeaderLocation, out_path: &Path) {
let header: String = header.into();
let mut output = Vec::new();
Expand Down Expand Up @@ -550,7 +538,7 @@ mod bindings {

// Note that when generating the bundled file, we're essentially always
// cross compiling.
if generating_bundled_bindings() || is_cross_compiling {
if is_cross_compiling {
// Get rid of va_list, as it's not
bindings = bindings
.blocklist_function("sqlite3_vmprintf")
Expand Down
Loading