You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* fix: Link `freebl_static` on static link
* More static
* Less
* More
* pk11wrap
* More
* sqlite3
* sqlite
* More
* More
* Finalize
* Debug Windows
* Fix
* Minimize
Copy file name to clipboardExpand all lines: neqo-crypto/build.rs
+42-8
Original file line number
Diff line number
Diff line change
@@ -149,11 +149,11 @@ fn dynamic_link() {
149
149
}
150
150
151
151
fnstatic_link(){
152
-
let static_libs = [
152
+
letmutstatic_libs = vec![
153
153
"certdb",
154
154
"certhi",
155
155
"cryptohi",
156
-
"freebl",
156
+
"freebl_static",
157
157
if env::consts::OS == "windows"{
158
158
"libnspr4"
159
159
} else {
@@ -164,9 +164,7 @@ fn static_link() {
164
164
"nssdev",
165
165
"nsspki",
166
166
"nssutil",
167
-
"pk11wrap",
168
-
"pkcs12",
169
-
"pkcs7",
167
+
"pk11wrap_static",
170
168
if env::consts::OS == "windows"{
171
169
"libplc4"
172
170
} else {
@@ -177,10 +175,46 @@ fn static_link() {
177
175
} else {
178
176
"plds4"
179
177
},
180
-
"smime",
181
178
"softokn_static",
182
179
"ssl",
183
180
];
181
+
// macOS always dynamically links against the system sqlite library.
182
+
// See https://github.com/nss-dev/nss/blob/a8c22d8fc0458db3e261acc5e19b436ab573a961/coreconf/Darwin.mk#L130-L135
183
+
if env::consts::OS == "macos"{
184
+
println!("cargo:rustc-link-lib=dylib=sqlite3");
185
+
}else{
186
+
static_libs.push("sqlite");
187
+
}
188
+
// Hardware specific libs.
189
+
// See https://github.com/mozilla/application-services/blob/0a2dac76f979b8bcfb6bacb5424b50f58520b8fe/components/support/rc_crypto/nss/nss_build_common/src/lib.rs#L127-L157
190
+
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
191
+
let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap();
0 commit comments