Skip to content

Commit 78715d7

Browse files
committed
Update static linking build step after GCM changes
1 parent 2ecf788 commit 78715d7

1 file changed

Lines changed: 4 additions & 12 deletions

File tree

build.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -242,31 +242,23 @@ fn static_link() {
242242
// See https://github.com/mozilla/application-services/blob/0a2dac76f979b8bcfb6bacb5424b50f58520b8fe/components/support/rc_crypto/nss/nss_build_common/src/lib.rs#L127-L157
243243
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
244244
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
245-
// https://searchfox.org/nss/rev/0d5696b3edce5124353f03159d2aa15549db8306/lib/freebl/freebl.gyp#508-542
245+
// Newer NSS uses consolidated gcm library
246+
static_libs.push("gcm");
246247
if target_arch == "arm" || target_arch == "aarch64" {
247248
static_libs.push("armv8_c_lib");
249+
static_libs.push("ghash-aes-aarch64_c_lib");
248250
}
249251
if target_arch == "x86_64" || target_arch == "x86" {
250-
static_libs.push("gcm-aes-x86_c_lib");
251252
static_libs.push("sha-x86_c_lib");
252253
}
253-
if target_arch == "arm" {
254-
static_libs.push("gcm-aes-arm32-neon_c_lib");
255-
}
256-
if target_arch == "aarch64" {
257-
static_libs.push("gcm-aes-aarch64_c_lib");
258-
}
259254
if target_arch == "x86_64" {
260255
static_libs.push("hw-acc-crypto-avx");
261256
static_libs.push("hw-acc-crypto-avx2");
262257
}
263258
// https://searchfox.org/nss/rev/08c4d05078d00089f8d7540651b0717a9d66f87e/lib/freebl/freebl.gyp#315-324
264259
if (target_os == "android" || target_os == "linux") && target_arch == "x86_64" {
265260
static_libs.push("intel-gcm-wrap_c_lib");
266-
// https://searchfox.org/nss/rev/08c4d05078d00089f8d7540651b0717a9d66f87e/lib/freebl/freebl.gyp#43-47
267-
if (target_os == "android" || target_os == "linux") && target_arch == "x86_64" {
268-
static_libs.push("intel-gcm-s_lib");
269-
}
261+
static_libs.push("intel-gcm-s_lib");
270262
}
271263
for lib in static_libs {
272264
println!("cargo:rustc-link-lib=static={lib}");

0 commit comments

Comments
 (0)