Page MenuHomePhabricator

Do export symbols when LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is on.
ClosedPublic

Authored by simon_tatham on Mar 25 2020, 2:44 AM.

Details

Summary

In D76527, we stopped exporting symbols from clang, opt and llc unless
the LLVM_ENABLE_PLUGINS cmake variable is true (which causes clang's
own plugin collection to be built).

But another reasonable build configuration is to ask clang to export
its symbols for out-of-tree plugins to use, without building the
in-tree ones. That is, you might set LLVM_EXPORT_SYMBOLS_FOR_PLUGINS
without also setting LLVM_ENABLE_PLUGINS (at least if you're using
MSVC, where you need to ask explicitly for the symbols to be
exported).

In that situation, the symbols should still be exported, but after
D76527, they weren't being.

Diff Detail

Event Timeline

simon_tatham created this revision.Mar 25 2020, 2:44 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 25 2020, 2:44 AM
This revision is now accepted and ready to land.Mar 25 2020, 7:30 AM
efriedma accepted this revision.Mar 25 2020, 11:15 AM

LGTM

But another reasonable build configuration is to ask clang to export its symbols for out-of-tree plugins to use, without building the in-tree ones.

This was confusing to me... but then I looked a bit more to figure out what LLVM_EXPORT_SYMBOLS_FOR_PLUGINS actually does. More crazy workarounds for Windows, I guess.

This revision was automatically updated to reflect the committed changes.