Skip to content

Commit

Permalink
Update sqlcipher linkage hack to appease Rust 1.50 (fixes SYNC-1999)
Browse files Browse the repository at this point in the history
  • Loading branch information
dmose committed Mar 8, 2021
1 parent c0cc3c7 commit d789b75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 21 deletions.
8 changes: 3 additions & 5 deletions components/autofill/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ fn main() {
uniffi_build::generate_scaffolding("./src/autofill.udl").unwrap();

println!("cargo:rerun-if-changed=build.rs");
// Ugh. This is really really dumb. We don't care about sqlcipher at all. really
if nss_build_common::env_str("DEP_SQLITE3_LINK_TARGET") == Some("sqlcipher".into()) {
// If NSS_DIR isn't set, we don't really care, ignore the Err case.
let _ = nss_build_common::link_nss();
}

// If NSS_DIR isn't set, we don't really care, ignore the Err case.
let _ = nss_build_common::link_nss();
}
29 changes: 13 additions & 16 deletions components/webext-storage/build.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

//! Work around the fact that `sqlcipher` might get enabled by a cargo feature
//! another crate in the workspace needs, without setting up nss. (This is a
//! gross hack).

fn main() {
println!("cargo:rerun-if-changed=build.rs");
// Ugh. This is really really dumb. We don't care about sqlcipher at all. really
if nss_build_common::env_str("DEP_SQLITE3_LINK_TARGET") == Some("sqlcipher".into()) {
// If NSS_DIR isn't set, we don't really care, ignore the Err case.
let _ = nss_build_common::link_nss();
}
}
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */

//! Work around the fact that `sqlcipher` might get enabled by a cargo feature
//! another crate in the workspace needs, without setting up nss. (This is a
//! gross hack).
fn main() {
println!("cargo:rerun-if-changed=build.rs");

// If NSS_DIR isn't set, we don't really care, ignore the Err case.
let _ = nss_build_common::link_nss();
}

0 comments on commit d789b75

Please sign in to comment.