This is an archive of the discontinued LLVM Phabricator instance.

Add the thread sanitizer support for X86_64 WatchOS simulators
ClosedPublic

Authored by yfyang on Dec 8 2022, 10:22 AM.

Details

Summary

Allow TSan in clang driver for X86_64 WatchOS simulator.

It was already functional, and Apple's downstream fork of clang allows it, but that change had not made it upstream yet.

Diff Detail

Event Timeline

yfyang created this revision.Dec 8 2022, 10:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 10:22 AM
Herald added a subscriber: pengfei. · View Herald Transcript
yfyang requested review of this revision.Dec 8 2022, 10:22 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 8 2022, 10:22 AM
jyknight accepted this revision.Dec 8 2022, 10:39 AM
jyknight added a subscriber: yln.

Thanks for the change.

The description is a bit misleading, this would be better:

Allow TSan in clang driver for X86_64 WatchOS simulator.

It was already functional, and Apple's downstream fork of clang allows it, but that change had not made it upstream yet.

cc+=yln FYI, though this change seems obvious enough I'm comfortable to approve it directly.

This revision is now accepted and ready to land.Dec 8 2022, 10:41 AM
yfyang edited the summary of this revision. (Show Details)Dec 8 2022, 10:43 AM
yln accepted this revision.EditedDec 8 2022, 4:09 PM
yln added a subscriber: rsundahl.

Thank you! LGTM, with one nit.

@rsundahl: can you keep an eye on this and resolve any potential Apple-internal conflicts? Thanks!

clang/lib/Driver/ToolChains/Darwin.cpp
3279–3284

Yes, for watchOS simulator. I think we can also drop the constraint on x86_64 and then merge the if. TSan should be supported for simulators on Apple Silicon. Can you add additional tests for these 3 cases? Thanks!

@rsundahl: can you keep an eye on this and resolve any potential Apple-internal conflicts? Thanks!

Will do @yln.

yfyang updated this revision to Diff 481679.Dec 9 2022, 10:10 AM

Addressing comments.

yfyang updated this revision to Diff 481682.Dec 9 2022, 10:18 AM

Formatting

yfyang updated this revision to Diff 481684.Dec 9 2022, 10:25 AM
  • Add TSAN support for Apple arm64 simulators
  • Formatting
This revision was landed with ongoing or failed builds.Dec 9 2022, 10:33 AM
This revision was automatically updated to reflect the committed changes.