@@ -327,26 +327,8 @@ fn main() {
327
327
}
328
328
}
329
329
330
- let llvm_static_stdcpp = tracked_env_var_os ( "LLVM_STATIC_STDCPP" ) ;
331
330
let llvm_use_libcxx = tracked_env_var_os ( "LLVM_USE_LIBCXX" ) ;
332
331
333
- let stdcppname = if target. contains ( "openbsd" ) {
334
- if target. contains ( "sparc64" ) { "estdc++" } else { "c++" }
335
- } else if target. contains ( "darwin" )
336
- || target. contains ( "freebsd" )
337
- || target. contains ( "windows-gnullvm" )
338
- || target. contains ( "aix" )
339
- {
340
- "c++"
341
- } else if target. contains ( "netbsd" ) && llvm_static_stdcpp. is_some ( ) {
342
- // NetBSD uses a separate library when relocation is required
343
- "stdc++_p"
344
- } else if llvm_use_libcxx. is_some ( ) {
345
- "c++"
346
- } else {
347
- "stdc++"
348
- } ;
349
-
350
332
// RISC-V GCC erroneously requires libatomic for sub-word
351
333
// atomic operations. Some BSD uses Clang as its system
352
334
// compiler and provides no libatomic in its base system so
@@ -355,24 +337,6 @@ fn main() {
355
337
println ! ( "cargo:rustc-link-lib=atomic" ) ;
356
338
}
357
339
358
- // C++ runtime library
359
- if !target. contains ( "msvc" ) {
360
- if let Some ( s) = llvm_static_stdcpp {
361
- assert ! ( !cxxflags. contains( "stdlib=libc++" ) ) ;
362
- let path = PathBuf :: from ( s) ;
363
- println ! ( "cargo:rustc-link-search=native={}" , path. parent( ) . unwrap( ) . display( ) ) ;
364
- if target. contains ( "windows" ) {
365
- println ! ( "cargo:rustc-link-lib=static:-bundle={stdcppname}" ) ;
366
- } else {
367
- println ! ( "cargo:rustc-link-lib=static={stdcppname}" ) ;
368
- }
369
- } else if cxxflags. contains ( "stdlib=libc++" ) {
370
- println ! ( "cargo:rustc-link-lib=c++" ) ;
371
- } else {
372
- println ! ( "cargo:rustc-link-lib={stdcppname}" ) ;
373
- }
374
- }
375
-
376
340
// libc++abi and libunwind have to be specified explicitly on AIX.
377
341
if target. contains ( "aix" ) {
378
342
println ! ( "cargo:rustc-link-lib=c++abi" ) ;
0 commit comments