This is an archive of the discontinued LLVM Phabricator instance.

[MinGW] Add the profiling library when necessary
ClosedPublic

Authored by mstorsjo on Feb 12 2019, 12:47 AM.

Details

Summary

Profiling still doesn't seem to work properly, but this at least hooks up the library and eases completing whatever is missing.

Diff Detail

Event Timeline

mstorsjo created this revision.Feb 12 2019, 12:47 AM
mstorsjo set the repository for this revision to rC Clang.Feb 12 2019, 12:48 AM
mstorsjo added a subscriber: cfe-commits.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2019, 12:48 AM
rnk accepted this revision.Feb 12 2019, 10:43 AM

lgtm

This revision is now accepted and ready to land.Feb 12 2019, 10:43 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptFeb 12 2019, 11:26 PM

This change breaks building/testing the compiler with CLANG_DEFAULT_LINKER set to lld. Was this intentional? What should people do if they want to use CLANG_DEFAULT_LINKER and run the test suite?

This change breaks building/testing the compiler with CLANG_DEFAULT_LINKER set to lld. Was this intentional? What should people do if they want to use CLANG_DEFAULT_LINKER and run the test suite?

It wasn't intentional. Originally I added -fuse-ld=lld to the test, but this broke buildbots that didn't have lld available. My fixup in rC353922 avoided this by removing the -fuse-ld=lld (where I noted in the commit message that I guess that it would break such configurations). At that point I thought the other tests in this same file also would be equally broken in such a setup then. But I see that most other tests use -fuse-ld=ld, to work around this. (This option doesn't check if the named tool exists, contrary to -fuse-ld=<any-other-string>.)

But if a linker named <triplet>-ld exists, that will be used instead, so I'll need to make the regex a bit looser as well. I'll commit a fix for this soon.