This is an archive of the discontinued LLVM Phabricator instance.

Correctly find builtins library with clang-cl
ClosedPublic

Authored by thieta on Feb 28 2022, 11:21 PM.

Details

Summary

When using COMPILER_RT_USE_BUILTINS_LIBRARY=ON and clang-cl there
where several places where it didn't work as expected.

First -print-libgcc-file-name has to be prefixed with /clang:

Then the regex that matched the builtins library was wrong because
the builtins library is called clang_rt.builtins_<arch>.lib
and the regex only matched libclang_rt.builtins_arch.a

With this commit you can use a runtime build on Windows with this
option enabled.

Diff Detail

Event Timeline

thieta created this revision.Feb 28 2022, 11:21 PM
thieta requested review of this revision.Feb 28 2022, 11:21 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2022, 11:21 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript
thieta updated this revision to Diff 411982.Feb 28 2022, 11:24 PM

Removed erronous change

Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2022, 11:24 PM
thieta added a comment.Mar 7 2022, 5:04 AM

Ping, anyone care to review this one?

Herald added a project: Restricted Project. · View Herald TranscriptMar 7 2022, 5:04 AM
phosek added inline comments.Mar 7 2022, 11:14 AM
cmake/Modules/HandleCompilerRT.cmake
61

Leftover debugging output?

thieta updated this revision to Diff 413732.Mar 8 2022, 1:22 AM

Removed debug print

thieta marked an inline comment as done.Mar 8 2022, 1:22 AM

Removed the debug message()

cmake/Modules/HandleCompilerRT.cmake
61

whoops. yeah fixed.

thieta marked an inline comment as done.Mar 11 2022, 3:02 AM

ping @phosek - I removed the debug line. do you have any other comments on this one?

phosek accepted this revision.Mar 11 2022, 3:18 PM

LGTM

This revision is now accepted and ready to land.Mar 11 2022, 3:18 PM
This revision was landed with ongoing or failed builds.Mar 13 2022, 11:49 PM
This revision was automatically updated to reflect the committed changes.