This is an archive of the discontinued LLVM Phabricator instance.

[msan] Compile the libatomic.c test with a C compiler
ClosedPublic

Authored by arichardson on Jul 24 2020, 4:00 AM.

Details

Summary

Otherwise we end up compiling in C++ mode and on FreeBSD
/usr/include/stdatomic.h is not compatible with C++ since it uses _Bool.

Diff Detail

Event Timeline

arichardson created this revision.Jul 24 2020, 4:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 24 2020, 4:00 AM
Herald added subscribers: Restricted Project, jfb, krytarowski, emaste. · View Herald Transcript

I think we can actually just drop the #include <stdatomic.h> line here. It was used for a previous version of the test but I forgot to remove it after some changes.

Does it help to replace %clangxx_msan with %clang_msan instead?

Does it help to replace %clangxx_msan with %clang_msan instead?

That sounds like the better solution. I wasn't aware that that substitution also existed.

use %clang_msan

arichardson retitled this revision from [msan] Compile the libatomic.c test with -xc to [msan] Compile the libatomic.c test with a C compiler.Jul 27 2020, 3:22 AM
emaste accepted this revision.Jul 27 2020, 7:17 AM

LGTM

This revision is now accepted and ready to land.Jul 27 2020, 7:17 AM
guiand accepted this revision.Jul 27 2020, 9:35 AM

LGTM

vitalybuka accepted this revision.Jul 28 2020, 7:46 PM
eugenis accepted this revision.Jul 31 2020, 10:19 AM
This revision was automatically updated to reflect the committed changes.