This is an archive of the discontinued LLVM Phabricator instance.

[CMake][compiler-rt] Support clang-cl in CompilerRTMockLLVMCMakeConfig
ClosedPublic

Authored by thieta on Feb 8 2023, 12:30 AM.

Details

Summary

clang-cl doesn't support -dumpmachine directly, so we need to
preface it with /clang: in order to get this probing function
to work.

This is needed in order to run cmake directly on the runtimes
directory.

Diff Detail

Event Timeline

thieta created this revision.Feb 8 2023, 12:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 12:30 AM
Herald added subscribers: Enna1, dberris. · View Herald Transcript
thieta requested review of this revision.Feb 8 2023, 12:30 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 8 2023, 12:30 AM
Herald added a subscriber: Restricted Project. · View Herald Transcript

This seems reasonable and fine to me.
Though I'd feel better if someone familiar with MSVC/Windows gave approval.

compiler-rt/cmake/Modules/CompilerRTMockLLVMCMakeConfig.cmake
52

NIT: Single line comment suggestion:

# Use /clang:-dumpmachine for clang-cl.
thieta added a reviewer: hans.Feb 8 2023, 9:55 AM
hans accepted this revision.Feb 10 2023, 1:56 AM

I'm not familiar with this cmake code, but it seems reasonable to lgtm if it works :)

This revision is now accepted and ready to land.Feb 10 2023, 1:56 AM
thieta added a comment.EditedFeb 10 2023, 5:43 AM

This seems reasonable and fine to me.
Though I'd feel better if someone familiar with MSVC/Windows gave approval.

Whoops forgot your comment suggestion. Fixed that after I had landed this and pushed it as a NFC. Thanks!