From d789b75a406af725beef60a01e4ef2e51b38c0b5 Mon Sep 17 00:00:00 2001 From: Dan Mosedale Date: Mon, 8 Mar 2021 11:28:19 -0800 Subject: [PATCH] Update sqlcipher linkage hack to appease Rust 1.50 (fixes SYNC-1999) --- components/autofill/build.rs | 8 +++----- components/webext-storage/build.rs | 29 +++++++++++++---------------- 2 files changed, 16 insertions(+), 21 deletions(-) diff --git a/components/autofill/build.rs b/components/autofill/build.rs index 84e2c1d290..cffd1addca 100644 --- a/components/autofill/build.rs +++ b/components/autofill/build.rs @@ -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(); } diff --git a/components/webext-storage/build.rs b/components/webext-storage/build.rs index b53386be4b..59a845e5d3 100644 --- a/components/webext-storage/build.rs +++ b/components/webext-storage/build.rs @@ -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(); +}