Skip to content

Commit 712f448

Browse files
committed
Update llvm.rs
1 parent c0f2041 commit 712f448

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

src/bootstrap/llvm.rs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)