This is an archive of the discontinued LLVM Phabricator instance.

Allow build without __c11_atomic_fetch_nand
ClosedPublic

Authored by brooks on May 31 2022, 10:29 AM.

Details

Summary

Don't build atomic fetch nand libcall functions when the required
compiler builtin isn't available. Without this compiler-rt can't be
built with LLVM 13 or earlier.

Not building the libcall functions isn't optimal, but aligns with the
usecase in FreeBSD where compiler-rt from LLVM 14 is built with an LLVM
13 clang and no LLVM 14 clang is built.

Diff Detail

Event Timeline

brooks created this revision.May 31 2022, 10:29 AM
brooks requested review of this revision.May 31 2022, 10:29 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 31 2022, 10:29 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Fine with me from a FreeBSD perspective

efriedma accepted this revision.May 31 2022, 4:45 PM

Maybe leave a short note explaining that this is a temporary hack to allow building compiler-rt with older versions of clang.

Otherwise LGTM

This revision is now accepted and ready to land.May 31 2022, 4:45 PM
brooks updated this revision to Diff 433228.May 31 2022, 4:53 PM
  • Add an explanatory comment
brooks updated this revision to Diff 433229.May 31 2022, 4:54 PM
  • Hopefully use arc correctly
efriedma accepted this revision.May 31 2022, 4:56 PM
This revision was automatically updated to reflect the committed changes.