@@ -374,28 +374,13 @@ impl Step for Llvm {
374374 cfg. define ( "LLVM_LINK_LLVM_DYLIB" , "ON" ) ;
375375 }
376376
377- if target. starts_with ( "riscv" )
377+ if ( target. starts_with ( "riscv" )
378+ || target. starts_with ( "csky" ) )
378379 && !target. contains ( "freebsd" )
379380 && !target. contains ( "openbsd" )
380381 && !target. contains ( "netbsd" )
381382 {
382- // RISC-V GCC erroneously requires linking against
383- // `libatomic` when using 1-byte and 2-byte C++
384- // atomics but the LLVM build system check cannot
385- // detect this. Therefore it is set manually here.
386- // Some BSD uses Clang as its system compiler and
387- // provides no libatomic in its base system so does
388- // not want this.
389- ldflags. exe . push ( " -latomic" ) ;
390- ldflags. shared . push ( " -latomic" ) ;
391- }
392-
393- if target. starts_with ( "csky" )
394- && !target. contains ( "freebsd" )
395- && !target. contains ( "openbsd" )
396- && !target. contains ( "netbsd" )
397- {
398- // CSKY GCC erroneously requires linking against
383+ // RISC-V and CSKY GCC erroneously requires linking against
399384 // `libatomic` when using 1-byte and 2-byte C++
400385 // atomics but the LLVM build system check cannot
401386 // detect this. Therefore it is set manually here.
0 commit comments