This is an archive of the discontinued LLVM Phabricator instance.

[examples] Skip building the Bye pass plugin on windows
ClosedPublic

Authored by mstorsjo on May 12 2020, 2:00 AM.

Details

Summary

Windows doesn't properly support pass plugins (as a shared library can't have undefined references, which pass plugins assume, being loaded into a host process that contains provides them), thus disable building it and the corresponding test.

This matches what was done for the passes unit test in bc8e44218810c0db6328b9809c959ceb7d43e3f5.

Diff Detail

Event Timeline

mstorsjo created this revision.May 12 2020, 2:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 12 2020, 2:00 AM
Herald added a subscriber: mgorny. · View Herald Transcript

Windows doesn't properly support pass plugins (as a shared library can't have undefined references, which pass plugins assume, being loaded into a host process that contains provides them)

This sounds like a problem with the plugin design. Is this patch intended as a temporary workaround until the inherent layering problem is resolved?

Windows doesn't properly support pass plugins (as a shared library can't have undefined references, which pass plugins assume, being loaded into a host process that contains provides them)

This sounds like a problem with the plugin design. Is this patch intended as a temporary workaround until the inherent layering problem is resolved?

I'm not planning on addressing the general pass plugin design, I just want builds with -DBUILD_SHARED_LIBS=TRUE. The fact that pass plugin can't work on windows is known since https://reviews.llvm.org/D47082 at least, without any plans from others to do anything about it.

thakis accepted this revision.May 12 2020, 11:05 AM
thakis added a subscriber: serge-sans-paille.
This revision is now accepted and ready to land.May 12 2020, 11:05 AM
This revision was automatically updated to reflect the committed changes.

@mstorsjo Sorry for jumping late on that review, I'd think that the REQUIRES: plugins would be enough, but it turns out LLVM_ENABLE_PLUGINS isset to ON by default on Windows if BUILD_SHARED_LIBS is ON too, which seems to contradict your report. Can you give it a look (I don't have an easy access to a Windows machine)