Using LINK_COMPONENTS with add_llvm_loadable_module

Hello.

I’m developing a pass and I wanted to use ExecutionEngine functionality inside it. Including ExecutionEngine.h in pass sources results in undefined reference errors to EE stuff, so I added “LINK_COMPONENTS executionengine” line to add_llvm_loadable_module() call. The code compiles now, but running my pass with opt gives

opt: CommandLine Error: Option ‘track-memory’ registered more than once!
LLVM ERROR: inconsistency in registered CommandLine options

I seem to understand why the option is duplicated, but not sure how to work-around that. So, is there a way to use arbitrary components from within a pass?

Thanks in advance.