@@ -374,28 +374,13 @@ impl Step for Llvm {
374
374
cfg. define ( "LLVM_LINK_LLVM_DYLIB" , "ON" ) ;
375
375
}
376
376
377
- if target. starts_with ( "riscv" )
377
+ if ( target. starts_with ( "riscv" )
378
+ || target. starts_with ( "csky" ) )
378
379
&& !target. contains ( "freebsd" )
379
380
&& !target. contains ( "openbsd" )
380
381
&& !target. contains ( "netbsd" )
381
382
{
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
399
384
// `libatomic` when using 1-byte and 2-byte C++
400
385
// atomics but the LLVM build system check cannot
401
386
// detect this. Therefore it is set manually here.
0 commit comments