File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -233,16 +233,21 @@ fn main() {
233
233
}
234
234
}
235
235
236
- // OpenBSD has a particular C++ runtime library name
236
+ let llvm_static_stdcpp = env:: var_os ( "LLVM_STATIC_STDCPP" ) ;
237
+
237
238
let stdcppname = if target. contains ( "openbsd" ) {
239
+ // OpenBSD has a particular C++ runtime library name
238
240
"estdc++"
241
+ } else if target. contains ( "netbsd" ) && llvm_static_stdcpp. is_some ( ) {
242
+ // NetBSD uses a separate library when relocation is required
243
+ "stdc++_pic"
239
244
} else {
240
245
"stdc++"
241
246
} ;
242
247
243
248
// C++ runtime library
244
249
if !target. contains ( "msvc" ) {
245
- if let Some ( s) = env :: var_os ( "LLVM_STATIC_STDCPP" ) {
250
+ if let Some ( s) = llvm_static_stdcpp {
246
251
assert ! ( !cxxflags. contains( "stdlib=libc++" ) ) ;
247
252
let path = PathBuf :: from ( s) ;
248
253
println ! ( "cargo:rustc-link-search=native={}" ,
You can’t perform that action at this time.
0 commit comments