facebookarchive / facebook-clang-plugins

Plugins to clang-analyzer and clang-frontend
MIT License
482 stars 85 forks source link

Compatibility with Xcode toolchain #9

Closed mkr-plse closed 6 years ago

mkr-plse commented 6 years ago

I am able to use the plugin (PrintTopDeclarations) on simple Objective-C programs. However, when trying to load the .dylib file and use it as part of a project which is built using Xcode toolchain, it results in build errors. This seems to be an issue because the plugin is built using custom clang versus the project using Xcode clang. This is also likely related to this question.

Do you have any suggestions on how to generate the dylib using the Xcode clang without using the provided sources from the clang directory in the current repo?

ma2bd commented 6 years ago

I personally never managed to run clang plugins against the binary of clang shipped with Xcode, mainly because this binary is stripped (or at least was when I tried), yet plugins want to call into its symbols. It would definitely be nice if we could make it work somehow.