File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -233,16 +233,21 @@ fn main() {
233233 }
234234 }
235235
236- // OpenBSD has a particular C++ runtime library name
236+ let llvm_static_stdcpp = env:: var_os ( "LLVM_STATIC_STDCPP" ) ;
237+
237238 let stdcppname = if target. contains ( "openbsd" ) {
239+ // OpenBSD has a particular C++ runtime library name
238240 "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"
239244 } else {
240245 "stdc++"
241246 } ;
242247
243248 // C++ runtime library
244249 if !target. contains ( "msvc" ) {
245- if let Some ( s) = env :: var_os ( "LLVM_STATIC_STDCPP" ) {
250+ if let Some ( s) = llvm_static_stdcpp {
246251 assert ! ( !cxxflags. contains( "stdlib=libc++" ) ) ;
247252 let path = PathBuf :: from ( s) ;
248253 println ! ( "cargo:rustc-link-search=native={}" ,
You can’t perform that action at this time.
0 commit comments