This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Fix atomic_test.c on macOS
ClosedPublic

Authored by arichardson on Dec 8 2020, 4:19 AM.

Details

Summary

The macOS name mangling adds another underscore. Therefore, on macOS
the atomic_* functions are actually _atomic_* in libcompiler_rt.dylib.
To handle this case, prepend the asm() argument with USER_LABEL_PREFIX
in the same way that atomic.c does.

Diff Detail

Event Timeline

arichardson created this revision.Dec 8 2020, 4:19 AM
arichardson requested review of this revision.Dec 8 2020, 4:19 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2020, 4:19 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript
ldionne accepted this revision.Dec 8 2020, 8:06 AM
This revision is now accepted and ready to land.Dec 8 2020, 8:06 AM
This revision was landed with ongoing or failed builds.Dec 22 2020, 3:58 AM
This revision was automatically updated to reflect the committed changes.