This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Set __GCC_HAVE_SYNC_COMPARE_AND_SWAP_x defines
ClosedPublic

Authored by kprovost on Nov 19 2020, 4:37 AM.

Details

Summary

The RISCV target did not set the GCC atomic compare and swap defines,
unlike other targets.
This broke builds for things like glib on RISCV.

Diff Detail

Event Timeline

kprovost created this revision.Nov 19 2020, 4:37 AM
kprovost requested review of this revision.Nov 19 2020, 4:37 AM
jrtc27 accepted this revision.Nov 19 2020, 4:47 AM
jrtc27 added reviewers: asb, lenary, luismarques.

This seems correct. GCC doesn't define the 1 and 2 variants but it implements those with libcalls rather than inline like LLVM so that's to be expected, just something to be aware of.

This revision is now accepted and ready to land.Nov 19 2020, 4:47 AM

Thanks for the review.

I don't have commit access to the LLVM repo, so I'd appreciate it if someone who does can commit this.

This revision was landed with ongoing or failed builds.Nov 24 2020, 2:51 PM
This revision was automatically updated to reflect the committed changes.